Do not mark .reloc sections as containing debug info.
[binutils-gdb.git] / bfd / ChangeLog
1 2003-12-19 Danny Smith <dannysmith@users.sourceforge.net>
2
3 * coffcode.h (styp_to_sec_flags): Don't treat .reloc section
4 as SEC_DEBUGGING.
5
6 2003-12-18 Richard Sandiford <rsandifo@redhat.com>
7
8 * elf32-mips.c (elf_mips_howto_table_rel): Replace all uses of
9 mips_elf_generic_reloc with _bfd_mips_elf_generic_reloc. Use
10 _bfd_mips_elf_hi16_reloc for R_MIPS_HI16 and R_MIPS_GNU_REL_HI16,
11 _bfd_mips_elf_lo16_reloc for R_MIPS_LO16 and R_MIPS_GNU_REL_LO16,
12 and _bfd_mips_elf_got16_reloc for R_MIPS_GOT16. Change rightshift
13 to 16 for R_MIPS_HI16 and R_MIPS_GNU_REL_HI16.
14 (mips_elf_generic_reloc, struct mips_hi16, mips_elf_hi16_reloc)
15 (mips_elf_lo16_reloc, mips_elf_got16_reloc): Delete.
16 (_bfd_mips_elf32_gprel16_reloc): Remove special case.
17 (mips_elf_gprel32_reloc, mips32_64bit_reloc): Likewise.
18
19 * elf64-mips.c (mips_elf64_howto_table_rel): Replace all uses of
20 mips_elf_generic_reloc with _bfd_mips_elf_generic_reloc. Use
21 _bfd_mips_elf_hi16_reloc for R_MIPS_HI16, _bfd_mips_elf_lo16_reloc
22 for R_MIPS_LO16 and _bfd_mips_elf_got16_reloc for R_MIPS_GOT16.
23 Change R_MIPS_HI16's rightshift to 16.
24 (mips_elf64_howto_table_rela): Replace all uses of
25 mips_elf_generic_reloc with _bfd_mips_elf_generic_reloc.
26 Use _bfd_mips_elf_generic_reloc for R_MIPS_GOT16 as well.
27 (mips_elf64_hi16_reloc, mips_elf64_got16_reloc): Delete.
28 (mips_elf64_shift6_reloc): Remove special case. Use
29 _bfd_mips_elf_generic_reloc instead of returning bfd_reloc_continue.
30
31 * elfn32-mips.c (prev_reloc_section): Delete.
32 (prev_reloc_address, prev_reloc_addend): Delete.
33 (elf_mips_howto_table_rel, elf_mips_howto_table_rela): As for
34 elf64-mips.c
35 (GET_RELOC_ADDEND, SET_RELOC_ADDEND): Delete.
36 (mips_elf_generic_reloc, struct mips_hi16, mips_elf_hi16_reloc)
37 (mips_elf_lo16_reloc, mips_elf_got16_reloc): Delete.
38 (mips_elf_gprel16_reloc): Delete use of GET_RELOC_ADDEND.
39 (mips_elf_literal_reloc, mips_elf_gprel32_reloc): Likewise.
40 (mips16_jump_reloc, mips16_gprel_reloc): Likewise.
41 (mips_elf_shift6_reloc): Likewise. Delete use of SET_RELOC_ADDEND.
42
43 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Use
44 _bfd_relocate_contents to install an in-place addend.
45 (mips_hi16): New structure.
46 (mips_hi16_list): Moved from elf32-mips.c.
47 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_got16_reloc): New functions.
48 (_bfd_mips_elf_lo16_reloc, _bfd_mips_elf_generic_reloc): New functions.
49 (mips_elf_calculate_relocation): Assume addend is unshifted.
50 (_bfd_mips_elf_relocate_section): Don't apply the howto rightshift
51 on top of the usual high-part shift. Don't shift the addend right
52 before calling mips_elf_calculate_relocation.
53
54 * elfxx-mips.h (_bfd_mips_elf_hi16_reloc): Declare.
55 (_bfd_mips_elf_got16_reloc, _bfd_mips_elf_lo16_reloc): Declare.
56 (_bfd_mips_elf_generic_reloc): Declare.
57
58 2003-12-16 Eric Youngdale <eric@mkssoftware.com>
59 Nick Clifton <nickc@redhat.com>
60
61 * peicode.h (pe_ILF_build_a_bfd): Only skip one instance of each
62 prefix character, if they are present.
63
64 2003-12-15 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
65 Nick Clifton <nickc@redhat.com>
66
67 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Ensure that correct flags
68 are set on known section types.
69
70 2003-12-12 Nick Clifton <nickc@redhat.com>
71
72 * po/ro.po: Updated translation.
73
74 2003-12-12 Alan Modra <amodra@bigpond.net.au>
75
76 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Check for
77 NULL dyn_h.
78
79 2003-12-11 Nick Clifton <nickc@redhat.com>
80
81 * elf.c (INCLUDE_SECTION_IN_SEGMENT): Skip PT_GNU_STACK segments.
82
83 2003-12-08 Richard Sandiford <rsandifo@redhat.com>
84
85 * elfxx-mips.h, elfxx-mips.c, cpu-mips.c: Convert prototypes.
86 Remove casts that were only needed for K&R compatibility.
87
88 2003-12-08 Alan Modra <amodra@bigpond.net.au>
89
90 * elf-bfd.h (struct elf_backend_data): Remove "bfd *" and add
91 "elflink_hash_entry *" param to elf_backend_link_output_symbol_hook.
92 Add "elflink_hash_entry *" param to elf_backend_output_arch_syms.
93 * elflink.h (elf_link_output_sym): Add "elflink_hash_entry *" param,
94 and pass to output_symbol_hook.
95 (elf_bfd_final_link): Adjust elf_link_output_sym calls.
96 (elf_link_output_extsym): Likewise.
97 (elf_link_input_bfd): Likewise.
98 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Adjust.
99 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
100 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
101 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
102 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
103 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
104 * elf64-sparc.c (sparc64_elf_output_arch_syms): Likewise.
105 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
106 Validate dynh->h against h.
107 * elf64-ppc.c (struct ppc_link_hash_entry): Add adjust_done bitfield.
108 (link_hash_newfunc): Init it.
109 (adjust_opd_syms): New function.
110 (ppc64_elf_edit_opd): Set adjust_done when global .opd sym adjusted.
111 Set opd.adjust for all .opd relocs. Call adjust_opd_syms.
112 (ppc64_elf_tls_optimize): Adjust possible .opd sym values here.
113 (ppc64_elf_relocate_section): Also adjust syms not a multiple of 24.
114 (ppc64_elf_output_symbol_hook): New function.
115 (elf_backend_link_output_symbol_hook): Define.
116
117 2003-12-07 Richard Sandiford <rsandifo@redhat.com>
118
119 * elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
120 Remove casts that were only needed for K&R compatibility.
121
122 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
123
124 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
125 partial_inplace for these relocs to FALSE for comptability with
126 the MS linker.
127 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
128 generated by MS linker, and brings the relocation in line the MS
129 PE documentation.
130
131 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
132
133 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
134
135 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
136
137 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
138 need_relax_finalize field in link_info instead of
139 relax_finalizing to check if the relax finalize pass is being
140 done.
141
142 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
143
144 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
145 Change ARM26* to ARM_26* in comments to match definitions.
146 (coff_arm_adjust_symndx): Replace hard-coded constants with
147 appropriate definitions (ARM_26*).
148
149 2003-12-04 Alan Modra <amodra@bigpond.net.au>
150
151 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
152 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
153 (mn10300_elf_relax_section): Likewise.
154 * nlm32-alpha.c (ONES): Define.
155 (nlm32_alpha_howto_table): Use it to avoid warnings.
156
157 2003-12-04 Alan Modra <amodra@bigpond.net.au>
158
159 * elf32-i386.c (elf_i386_object_p): Delete.
160 (elf_backend_object_p): Don't define.
161 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
162 * elf32-sh.c (sh_elf_object_p): Likewise.
163 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
164 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
165 * elf64-s390.c (elf_s390_object_p): Likewise.
166 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
167
168 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
169
170 * archures.c (bfd_mach_m32r2): Add new machine type.
171 * bfd-in2.h: Regenerate.
172 * cpu-m32r.c : Add new machine type.
173 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
174 m32r_elf_merge_private_bfd_data): Add support for new machine
175 type.
176
177 2003-12-03 Dave Airlie <airlied@linux.ie>
178
179 * config.bfd: Add vax-linux-gnu target.
180 * configure.in: Likewise.
181 * configure: Regenerate.
182
183 2003-12-03 Alan Modra <amodra@bigpond.net.au>
184
185 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
186 bfd_link_hash_entry field "next" -> "und_next".
187 * linker.c (_bfd_link_hash_newfunc): Likewise.
188 (bfd_link_add_undef): Likewise.
189 (_bfd_generic_link_add_archive_symbols): Likewise.
190 (_bfd_generic_link_add_one_symbol): Likewise.
191 * xcofflink.c (xcoff_link_add_symbols): Likewise.
192
193 2003-12-02 Nick Clifton <nickc@redhat.com>
194
195 * configure.in (ALL_LINGUAS): Add ro.
196 * po/ro.po: New Romanian translation.
197
198 2003-12-02 Alan Modra <amodra@bigpond.net.au>
199
200 * Makefile.am: Run "make dep-am".
201 * Makefile.in: Regenerate.
202
203 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
204
205 * coffcode.h (coff_compute_section_file_positions): Set page_size
206 to 1 instead of 0 in the case file alignment value is zero.
207
208 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
209
210 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
211 * coff64-rs6000.c: Likewise.
212 * coffcode.h: Likewise.
213 * elf32-vax.c: Likewise.
214 * hash.c: Likewise.
215 * hppabsd-core.c: Likewise.
216 * hpux-core.c: Likewise.
217 * ihex.c: Likewise.
218 * netbsd-core.c: Likewise.
219 * osf-core.c: Likewise.
220 * pdp11.c: Likewise.
221 * ptrace-core.c: Likewise.
222 * sco5-core.c: Likewise.
223 * section.c: Likewise.
224 * sunos.c: Likewise.
225 * trad-core.c: Likewise.
226
227 2003-12-01 Alan Modra <amodra@bigpond.net.au>
228
229 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
230 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
231 (_bfd_elf_link_just_syms): Likewise.
232 (bfd_elf_get_needed_list): Likewise.
233 (bfd_elf_get_runpath_list): Likewise.
234 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
235 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
236 creator flavour.
237 (elf32_hppa_set_gp): Look up output sections rather than using htab.
238 * elf32-i960.c: Comment fix. Formatting.
239 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
240 rather than testing creator flavour.
241 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
242 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
243 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
244 is_elf_hash_table change. Remove redundant test.
245 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
246 testing creator flavour.
247 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
248 (_bfd_elf_fix_symbol_flags): Likewise.
249 (_bfd_elf_adjust_dynamic_symbol): Likewise.
250 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
251 checks. Use is_elf_hash_table rather than testing creator flavour.
252 Use hash_table throughout in place of info->hash.
253 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
254 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
255 check.
256 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
257 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
258 testing creator flavour.
259 (elf_gc_sections): Add is_elf_hash_table check.
260 (elf_gc_common_finalize_got_offsets): Likewise.
261 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
262 redundant check.
263 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
264 rather than testing creator flavour.
265
266 2003-11-28 Christian Groessler <chris@groessler.org>
267
268 * cpu-z8k.c: Convert to ISO C90.
269 * coff-z8k.c: Likewise.
270
271 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
272
273 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
274 Add link info argument.
275 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
276 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
277 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
278 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
279 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
280 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
281 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
282 * elf.c (assign_file_positions_except_relocs,
283 assign_file_positions_for_segments): Likewise. Adjust calls.
284
285 2003-11-27 Mark Kettenis <kettenis@gnu.org>
286
287 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
288 of the note.
289
290 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
291 Richard Sandiford <rsandifo@redhat.com>
292
293 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
294 (mips_elf_set_no_stub): New function.
295 (mips_elf_multi_got): Call it.
296 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
297 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
298 use mips_elf_create_dynamic_relocation to deal with any compatibility
299 issues. Store the adjusted addend in the GOT slot.
300
301 2003-11-25 Mattias Engdegård <mattias@virtutech.se>
302
303 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
304 procesing N_BINCL stabs.
305
306 2003-11-25 Alan Modra <amodra@bigpond.net.au>
307
308 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
309 ppc_stub_plt_call to symbols defined in shared libs.
310
311 2003-11-22 Jakub Jelinek <jakub@redhat.com>
312
313 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
314 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
315 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
316 (elf_i386_check_relocs): Set it.
317 (elf_i386_finish_dynamic_symbol): If it is not set,
318 clear st_value of SHN_UNDEF symbol.
319
320 2003-11-20 Jim Blandy <jimb@redhat.com>
321
322 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
323 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
324
325 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
326
327 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
328 section for reloc output and subtract the output section's address
329 from the addend when converting a relocation into one against a
330 section symbol.
331 * elf64-s390.c (elf_s390_relocate_section): Likewise.
332
333 2003-11-18 James E Wilson <wilson@specifixinc.com>
334
335 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
336 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
337 for ia64_info->rel_fptr_sec.
338
339 2003-11-18 Alan Modra <amodra@bigpond.net.au>
340
341 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
342 size is zero.
343
344 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
345
346 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
347 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
348 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
349 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
350 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
351 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
352 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
353 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
354 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
355 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
356 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
357 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
358 (elf_backend_copy_indirect_symbol): Don't define.
359
360 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
361
362 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
363 GOT entries.
364
365 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
366
367 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
368 to R_390_RELATIVE. Convert the other relocations against local
369 symbols to relocations against the start of the section.
370 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
371 to R_390_RELATIVE. Convert the other relocations against local
372 symbols to relocations against the start of the section.
373
374 2003-11-11 Nick Clifton <nickc@redhat.com>
375
376 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
377 info->executable not info->shared to decide if a .interp section
378 should be present.
379 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
380 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
381 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
382 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
383 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
384 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
385 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
386 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
387 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
388 * elflink.h (size_dynamic_sections): Likewise.
389
390 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
391
392 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
393 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
394 found initialise the tls data directory entry.
395
396 2003-11-07 Alan Modra <amodra@bigpond.net.au>
397
398 * elf32-ppc.c (ppc_elf_install_value): Delete.
399 (shared_stub_entry, stub_entry): Make them arrays of ints.
400 Remove initial branch.
401 (ppc_elf_relax_section): Write one branch around all trampolines
402 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
403 branch range check. Only use shared_stub_entry when shared.
404 Test that branches can reach stubs. Write trampolines out at
405 end so that just one realloc is used. Handle little-endian
406 mode. Move relevant code from ppc_elf_install_value to here.
407 (ppc_elf_relocate_section): Move code handling RELAX32 from
408 ppc_elf_install_value to here.
409
410 2003-11-06 Alan Modra <amodra@bigpond.net.au>
411
412 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
413 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
414 cases.
415 (shared_stub_entry): Correct opcode.
416 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
417 (ppc_elf_relocate_section): Handle them.
418
419 2003-11-05 Alan Modra <amodra@bigpond.net.au>
420
421 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
422 updated section in case of merged section.
423 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
424 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
425 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
426 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
427 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
428 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
429 * elf32-cris.c (cris_elf_relocate_section): Likewise.
430 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
431 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
432 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
433 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
434 * elf32-i370.c (i370_elf_relocate_section): Likewise.
435 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
436 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
437 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
438 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
439 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
440 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
441 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
442 * elf32-s390.c (elf_s390_relocate_section): Likewise.
443 * elf32-sh.c (sh_elf_relocate_section): Likewise.
444 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
445 * elf32-v850.c (v850_elf_relocate_section) Likewise.
446 * elf32-vax.c (elf_vax_relocate_section): Likewise.
447 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
448 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
449 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
450 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
451 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
452 * elf64-s390.c (elf_s390_relocate_section): Likewise.
453 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
454 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
455 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
456 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
457
458 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
459 section for reloc output.
460 * elf32-i370.c (i370_elf_relocate_section): Likewise.
461 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
462 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
463 * elf32-vax.c (elf_vax_relocate_section): Likewise.
464 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
465 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
466
467 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
468 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
469 return value.
470 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
471 sec->id.
472
473 2003-11-05 Alan Modra <amodra@bigpond.net.au>
474
475 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
476 (elf32_d10v_relocate_section): Use them to handle -r reloc
477 adjustments, and in place of _bfd_elf_rela_local_sym.
478
479 * cpu-iq2000.c (arch_info_struct): Warning fix.
480
481 2003-11-05 Alan Modra <amodra@bigpond.net.au>
482
483 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
484 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
485 weakdefs.
486 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
487 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
488 NON_GOT_REF.
489 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
490 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
491 non-default visibility.
492 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
493 SYMBOL_CALLS_LOCAL.
494
495 2003-11-04 Alan Modra <amodra@bigpond.net.au>
496
497 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
498 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
499 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
500 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
501 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
502 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
503 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
504
505 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
506 "dereferencing type-punned pointer" warnings.
507
508 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
509 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
510 * bfd-in2.h: Regenerate.
511 * binary.c (binary_set_section_contents): Ditto.
512 * bout.c (b_out_set_section_contents): Ditto.
513 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
514 * coffcode.h (coff_set_section_contents): Ditto.
515 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
516 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
517 * elf.c (_bfd_elf_set_section_contents): Ditto.
518 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
519 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
520 * i386msdos.c (msdos_set_section_contents): Ditto.
521 * ieee.c (ieee_set_section_contents): Ditto.
522 * ihex.c (ihex_set_section_contents): Ditto.
523 * libaout.h (NAME(aout,set_section_contents)): Ditto.
524 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
525 (_bfd_generic_set_section_contents): Ditto.
526 * libbfd.h: Regenerate.
527 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
528 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
529 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
530 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
531 * mmo.c (mmo_set_section_contents): Ditto.
532 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
533 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
534 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
535 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
536 * nlmcode.h (nlm_set_section_contents): Ditto.
537 * oasys.c (oasys_set_section_contents): Ditto.
538 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
539 * ppcboot.c (ppcboot_set_section_contents): Ditto.
540 * srec.c (srec_set_section_contents): Ditto.
541 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
542 * tekhex.c (tekhex_set_section_contents): Ditto.
543 (move_section_contents): Ditto.
544 * versados.c (versados_set_section_contents): Ditto.
545 * vms-misc.c (_bfd_save_vms_section): Ditto.
546 * vms.c (vms_set_section_contents): Ditto.
547 * vms.h (_bfd_save_vms_section): Ditto.
548
549 2003-11-04 Alan Modra <amodra@bigpond.net.au>
550
551 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
552 rather than htab.
553 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
554 relbrlt size.
555 (ppc64_elf_build_stubs): Allocate space for relbrlt.
556
557 2003-11-04 Alan Modra <amodra@bigpond.net.au>
558
559 * bfd-in.h (_bfd_elf_tls_setup): Declare.
560 * bfd-in2.h: Regenerate.
561 * elf-bfd.h (struct elf_link_tls_segment): Delete.
562 (struct elf_link_hash_table): Add tls_sec and tls_size.
563 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
564 * elflink.c (_bfd_elf_tls_setup): New function.
565 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
566 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
567 saving tls segment info, round segment size up.
568 (elf_link_output_extsym): Adjust code using tls segment info.
569 (elf_link_input_bfd): Likewise.
570 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
571 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
572 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
573 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
574 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
575 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
576 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
577 (elfNN_ia64_dtprel_base): Likewise.
578 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
579 (alpha_get_tprel_base): Likewise.
580 (struct alpha_relax_info): Remove tls_segment.
581 (elf64_alpha_relax_got_load): Adjust invocation of
582 alpha_get_dtprel_base and alpha_get_tprel_base.
583 (elf64_alpha_relax_tls_get_addr): Likewise.
584 (elf64_alpha_relax_section): Likewise.
585 (elf64_alpha_relocate_section): Likewise.
586 (elf64_alpha_relax_find_tls_segment): Delete.
587 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
588 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
589 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
590 * elf32-ppc.h (ppc_elf_tls_setup): Update.
591 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
592 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
593 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
594 (ppc64_elf_relocate_section): Likewise.
595 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
596
597 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
598
599 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
600 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
601 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
602 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
603 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
604 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
605 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
606 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
607 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
608 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
609 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
610 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
611 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
612 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
613 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
614 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
615 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
616 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
617 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
618 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
619 * elfxx-target.h (elf_backend_plt_header_size): Don't define
620 or include in target initializer.
621
622 2003-11-03 Andrew Cagney <cagney@redhat.com>
623
624 * section.c (bfd_set_section_contents): Make the "location" buffer
625 constant.
626 * bfd-in2.h: Re-generate.
627
628 2003-10-30 Andrew Cagney <cagney@redhat.com>
629
630 * syms.c: Replace "struct symbol_cache_entry" with "struct
631 bfd_symbol".
632 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
633 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
634 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
635 * bfd-in2.h: Re-generate.
636
637 2003-10-30 Jakub Jelinek <jakub@redhat.com>
638
639 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
640 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
641 fields.
642 (struct elfNN_ia64_local_hash_table): Remove.
643 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
644 to htab_t. Add loc_hash_memory field.
645 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
646 Removed.
647 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
648 functions.
649 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
650 loc_hash_table. Initialize loc_hash_memory.
651 (elfNN_ia64_hash_table_free): New function.
652 (elfNN_ia64_local_hash_lookup): Remove.
653 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
654 callback.
655 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
656 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
657 (bfd_elfNN_bfd_link_hash_table_free): Define.
658
659 2003-10-30 Alan Modra <amodra@bigpond.net.au>
660
661 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
662 symbol string in place.
663
664 2003-10-30 Jim Blandy <jimb@redhat.com>
665
666 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
667 object's mach field: all PowerPC machines are supersets of the
668 original rs6000, but not later rs6000 machines.
669
670 2003-10-30 Alan Modra <amodra@bigpond.net.au>
671
672 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
673 Add "val" and "sval" fields.
674 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
675 (read_attribute_value): Expand and adjust DW_* occurrences.
676 (scan_unit_for_functions, parse_comp_unit): Likewise.
677
678 2003-10-30 Phil Edwards <phil@codesourcery.com>
679
680 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
681 other common ELF triples.
682 (i[3-7]86-*-vxworks): Change to ELF format.
683 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
684 (sh-*-vxworks): New stanza.
685
686 2003-10-30 Lars Knoll <lars@trolltech.com>
687 Michael Matz <matz@suse.de>
688 Jakub Jelinek <jakub@redhat.com>
689 Alan Modra <amodra@bigpond.net.au>
690
691 * merge.c (struct sec_merge_sec_info): Update comment.
692 (struct sec_merge_hash_entry): Remove entsize.
693 (sec_merge_hash_lookup): Only adjust alignment when creating.
694 (sec_merge_emit): Remove register keyword.
695 (cmplengthentry, last4_eq, last_eq): Delete.
696 (strrevcmp, strrevcmp_align, is_suffix): New.
697 (merge_strings): Use them to implement fast suffix merging.
698 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
699 Make "len" signed.
700 (_bfd_elf_strtab_add): Lose on >2G strings.
701 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
702 (cmplengthentry, last4_eq): Delete.
703 (strrevcmp, is_suffix): New.
704 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
705
706 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
707
708 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
709 SEC_ALLOC.
710
711 2003-10-29 Philip Blundell <philb@gnu.org>
712
713 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
714 code sequence.
715 (PLT_HEADER_SIZE): New.
716 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
717 (struct elf32_arm_relocs_copied): ... this. Count both
718 pcrel and non-pcrel relocs. All uses updated.
719 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
720 sections and symbol/section mapping cache.
721 (create_got_section): New.
722 (elf32_arm_create_dynamic_sections): New.
723 (elf_backend_create_dynamic_sections): Use it.
724 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
725 (elf32_arm_check_relocs): Likewise.
726 (elf32_arm_adjust_dynamic_symbol): Likewise.
727 (elf32_arm_copy_indirect_symbol): New.
728 (elf32_arm_link_hash_table_create): Initialise new fields.
729 (elf32_arm_gc_sweep_hook): Implement.
730 (elf32_arm_discard_copies): Delete.
731 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
732 (elf32_arm_finish_dynamic_sections): Likewise.
733 (elf_backend_can_refcount): Define.
734 (elf_backend_copy_indirect_symbol): Likewise.
735 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
736
737 2003-10-29 Alan Modra <amodra@bigpond.net.au>
738
739 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
740 (elf_backend_grok_psinfo): Define.
741 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
742
743 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
744 sections with the same name.
745 (elfcore_grok_lwpstatus): Likewise.
746 (elfcore_grok_win32pstatus): Likewise.
747 (elfcore_grok_note): Likewise.
748 (elfcore_grok_nto_status): Likewise.
749 (elfcore_grok_nto_gregs): Likewise.
750
751 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
752
753 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
754 objects.
755
756 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
757
758 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
759
760 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
761
762 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
763 hash table for real symbols.
764
765 2003-10-23 Michael Snyder <msnyder@redhat.com>
766
767 * section.c (asection): Fix typo in comment.
768
769 2003-10-23 Alan Modra <amodra@bigpond.net.au>
770
771 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
772 reloc symbol index to it. Don't allow gd syms in shared libs
773 to be optimized.
774 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
775 (ppc64_elf_size_stubs): Likewise.
776 (ppc64_elf_relocate_section): Check that tls relocs are only used
777 with tls syms, and similarly for non-tls. Correct symbol used
778 when optimizing toc tls code.
779
780 2003-10-22 Nick Clifton <nickc@redhat.com>
781
782 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
783 processing an executable.
784
785 2003-10-22 Jakub Jelinek <jakub@redhat.com>
786
787 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
788 field changes.
789 (_bfd_elf_link_assign_sym_version): Likewise.
790 * elflink.h (size_dynamic_sections): Likewise.
791
792 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
793 Michael Snyder <msnyder@redhat.com>
794
795 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
796 bfd_mach_sh4a_nofpu): New machine types.
797 * bfd-in2.h: Rebuilt.
798 * cpu-sh.c (compatible): Remove unused function.
799 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
800 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
801 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
802
803 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
804
805 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
806 describing mismatched formats involving the Maverick FP type.
807
808 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
809
810 * binary.c (binary_object_p): Pass machine flag along with
811 architecture.
812
813 2003-10-21 Thorsten Brehm <brehm@gmx.net>
814
815 * archures.c (bfd_default_scan): Add support for mcf528x.
816 * ieee.c (ieee_write_processor): Likewise.
817
818 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
819 Bernardo Innocenti <bernie@develer.com>
820
821 * archures.c: Add MCF528x (MCFv4) support.
822 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
823 * bfd-in2.h: Regenerate.
824
825 2003-10-20 Andrew Cagney <cagney@redhat.com>
826
827 * targets.c: Replace "struct sec" with "struct bfd_section"
828 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
829 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
830 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
831 * aout-tic30.c, aout-target.h:
832 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
833
834 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
835
836 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
837 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
838 (struct _mmix_elf_section_data): New member pjs.
839 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
840 functions.
841 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
842 (mmix_reloc_map): Ditto.
843 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
844 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
845 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
846 unused.
847 (mmix_elf_check_relocs): Move early return to after
848 mmix_elf_check_common_relocs call.
849 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
850 (_bfd_mmix_before_linker_allocation): Rename from
851 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
852 Arrange to set the initial relaxable size of sections.
853 (_bfd_mmix_after_linker_allocation): Rename from
854 _bfd_mmix_finalize_linker_allocated_gregs.
855 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
856 (bfd_elf64_get_section_contents): Define.
857 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
858 * libbfd.h, bfd-in2.h: Regenerate.
859
860 * reloc.c (bfd_generic_relax_section): Default-set
861 section->_cooked_size here.
862 (bfd_generic_get_relocated_section_contents): Don't set it here.
863 Explain why.
864
865 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
866
867 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
868 output section has been discarded.
869
870 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
871
872 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
873 (h8300_reloc16_extra_cases): Likewise.
874 (h8300_bfd_link_add_symbols): Likewise.
875
876 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
877
878 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
879 (h8300sn_info_struct): Likewise.
880 (h8300hn_info_struct): Likewise.
881
882 2003-10-16 Pavel Roskin <proski@gnu.org>
883
884 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
885 for sections which lack size info.
886
887 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
888
889 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
890 mingw32.
891
892 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
893
894 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
895 undefined patterns with '*'.
896
897 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
898
899 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
900 use the last CIE from a different section.
901 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
902 size of the output section.
903
904 2003-10-07 Roland McGrath <roland@redhat.com>
905
906 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
907 new section from p_align header field.
908
909 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
910
911 * elf32-xtensa.c (xtensa_read_table_entries): The external size
912 of entry is 8 bytes.
913
914 2003-10-15 Andrew Cagney <cagney@redhat.com>
915
916 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
917 with NAME##_canonicalize_symtab.
918 * libcoff-in.h (coff_canonicalize_symtab): Update.
919 * xsym.h (bfd_sym_canonicalize_symtab): Update.
920 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
921 * coffgen.c (coff_canonicalize_symtab): Update.
922 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
923 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
924 * ieee.c (ieee_vec): Update comment.
925 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
926 * mmo.c (mmo_canonicalize_symtab): Update.
927 * nlm-target.h (nlm_canonicalize_symtab): Update.
928 * nlmcode.h (nlm_canonicalize_symtab): Update.
929 * i386msdos.c (msdos_canonicalize_symtab): Update.
930 * hp300hpux.c (MY (canonicalize_symtab)): Update.
931 * oasys.c (oasys_canonicalize_symtab): Update.
932 * som.c (som_canonicalize_symtab): Update.
933 * pef.c (bfd_pef_canonicalize_symtab): Update.
934 * nlmcode.h (nlm_canonicalize_symtab): Update.
935 * xsym.c (bfd_sym_canonicalize_symtab): Update.
936 * vms.c (vms_canonicalize_symtab): Update.
937 * versados.c (versados_canonicalize_symtab): Update.
938 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
939 * ieee.c (ieee_canonicalize_symtab): Update.
940 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
941 * reloc.c: Update comment.
942 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
943 * coff64-rs6000.c (aix5coff64_vec): Update.
944 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
945 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
946 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
947 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
948 * hp300hpux.c (MY_canonicalize_symtab): Update.
949 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
950 * aout-tic30.c (MY_canonicalize_symtab): Update.
951 * aout-target.h (MY_canonicalize_symtab): Update.
952 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
953 * elf.c (_bfd_elf_canonicalize_symtab): Update.
954 * elfcode.h (elf_canonicalize_symtab): Update.
955 * ihex.c (ihex_canonicalize_symtab): Update.
956 * tekhex.c (tekhex_canonicalize_symtab): Update.
957 * binary.c (binary_canonicalize_symtab): Update.
958 * srec.c (srec_canonicalize_symtab): Update.
959
960 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
961
962 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
963
964 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
965
966 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
967 relocations.
968 (sh_elf_check_relocs): Likewise.
969
970 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
971 (sh64_elf_merge_symbol_attribute): New.
972 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
973 (sh64_elf64_merge_symbol_attribute): New.
974
975 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
976
977 * elf-bfd.h (struct elf_backend_data): New function pointer member
978 elf_backend_merge_symbol_attribute.
979 * elflink.h (elf_link_add_object_symbols): Adjust call to
980 elf_backend_merge_symbol_attribute if the backend defined it.
981 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
982 (elfNN_bed): Add that to the initializer.
983
984 2003-10-14 Bob Wilson <bob.wilson@acm.org>
985
986 * elf32-xtensa.c (get_is_linkonce_section): Delete.
987 (xtensa_is_property_section, xtensa_is_littable_section): Use
988 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
989 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
990 (xtensa_get_property_section_name): Check section name instead of
991 calling get_is_linkonce_section. Remove unused bfd parameter. Use
992 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
993 linkonce section names by appending ".xt.insn" or ".xt.lit".
994 (xtensa_read_table_entries): Remove bfd argument in call to
995 xtensa_get_property_section_name. Free section name when done.
996 (elf_xtensa_combine_prop_entries): Free leaking table.
997
998 2003-10-13 Richard Sandiford <rsandifo@redht.com>
999
1000 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
1001 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
1002 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
1003 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
1004 that were needed.
1005 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
1006 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
1007
1008 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
1009
1010 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
1011 (bfd_elf64_ia64_after_parse): Likewise.
1012 * bfd-in2.h: Regenerated.
1013
1014 * elfxx-ia64.c (oor_ip): New.
1015 (oor_branch_size): Likewise.
1016 (bfd_elfNN_ia64_after_parse): Likewise.
1017 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
1018 equals sizeof (oor_ip).
1019
1020 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1021
1022 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
1023 renumbering of some relocation numbers.
1024
1025 2003-10-11 Alan Modra <amodra@bigpond.net.au>
1026
1027 * coff-sh.c: Move definition of MAP and guard more code with
1028 COFF_IMAGE_WITH_PE.
1029
1030 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
1031 * bfd-in2.h: Regenerate.
1032
1033 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
1034
1035 * Makefile.am: Run "make dep-am".
1036 * Makefile.in: Regenerate.
1037 * doc/Makefile.in: Likewise.
1038
1039 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
1040
1041 * cofflink.c: Include "safe-ctype.h".
1042 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
1043
1044 2003-10-08 Dave Brolley <brolley@redhat.com>
1045 On behalf of Michael Snyder <msnyder@redhat.com>
1046
1047 * archures.c: Add FRV fr550 machine.
1048 * cpu-frv.c: Ditto.
1049 * elf32-frv.c: Ditto.
1050 * bfd-in2.h: Regenerate.
1051
1052 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1053
1054 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
1055 for non-SGI N64 ABI. Improve code consitency.
1056
1057 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
1058
1059 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
1060 rightshift to 2.
1061
1062 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
1063
1064 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
1065 parameter.
1066 * cofflink.c (coff_link_add_symbols): Deal with split stab
1067 sections.
1068 * elflink.h (elf_link_add_object_symbols): Deal with split stab
1069 sections.
1070 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
1071 * libbfd.h: Regenerated.
1072
1073 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
1074 overflow, set reloc start position to after the count
1075 reloc. Subtract one from num relocs. Give error on 0xffff relocs
1076 and no overflow.
1077 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
1078 overflow.
1079 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
1080 0xffff.
1081
1082 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
1083
1084 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
1085 last CIE/FDE if needed.
1086
1087 2003-10-06 Nick Clifton <nickc@redhat.com>
1088
1089 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
1090 BFD64 is enabled.
1091
1092 2003-10-06 Matt Thomas <matt@3am-software.com>
1093
1094 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
1095
1096 2003-10-06 Robert Millan <robertmh@gnu.org>
1097
1098 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
1099 * config.bfd: Likewise.
1100 * configure: Regenerate.
1101
1102 2003-10-04 Christian Groessler <chris@groessler.org>
1103
1104 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
1105 and R_CALLR.
1106
1107 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1108
1109 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
1110 * elf32-m68hc11.c: Likewise.
1111 * elf32-m68hc12.c: Likewise.
1112 * elf32-m68hc1x.h: Likewise.
1113
1114 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1115
1116 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
1117 of flags between HC12 and HCS12.
1118
1119 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
1120
1121 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1122 which become empty after merging.
1123
1124 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1125
1126 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1127 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1128
1129 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1130
1131 * archures.c (bfd_mach_mipsisa64r2): New define.
1132 * bfd-in2.h: Regenerate.
1133 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1134 * cpu-mips.c (I_mipsisa64r2): New enum value.
1135 (arch_info_struct): Add entry for I_mipsisa64r2.
1136 * elfxx-mips.c (_bfd_elf_mips_mach)
1137 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1138 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1139 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1140
1141 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1142
1143 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1144 Handle SHN_IA_64_ANSI_COMMON.
1145 (elf_backend_section_from_bfd_section): Defined.
1146
1147 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1148
1149 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1150 of a pointer to section. Check bad symbol index.
1151 (_bfd_elf_link_read_relocs): Modify calls to
1152 elf_link_read_relocs_from_section.
1153
1154 2003-09-23 DJ Delorie <dj@redhat.com>
1155
1156 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1157 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1158 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1159 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1160 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1161 R_SH_PSHA, R_SH_PSHL added.
1162 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1163 (sh_elf_relocate_section): Support new relocs.
1164
1165 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1166
1167 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1168 dynamic relocation offsets.
1169
1170 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1171
1172 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1173 hash table using _bfd_generic_link_hash_table_free.
1174
1175 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1176
1177 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1178 type of prefix_length and suffix_length to int. Rename "attributes"
1179 to "attr". Comment.
1180 (_bfd_elf_get_sec_type_attr): Update prototype.
1181 * elf.c (get_special_section): Rewrite.
1182 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1183 attr and type pointers.
1184 (_bfd_elf_new_section_hook): Adjust for above.
1185 (special_sections): Merge suffix with prefix. Set
1186 prefix_length for all entries. Set suffix_length appropriately.
1187 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1188 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1189 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1190 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1191 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1192 * elf32-v850.c (v850_elf_special_sections): Likewise.
1193 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1194 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1195 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1196 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1197 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1198 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1199 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1200 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1201
1202 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1203
1204 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1205 ->got if the section already exists.
1206
1207 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1208
1209 * dwarf2.c (decode_line_info): Cope with an initially empty
1210 filename table.
1211
1212 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1213
1214 * acinclude.m4: Include ../config/accross.m4.
1215 * aclocal.m4: Regenerated.
1216
1217 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1218 or long long.
1219 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1220 (host64): Remove if HOST_64BIT_TYPE is set to long.
1221
1222 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1223 long and long long.
1224 (HOST_U_64BIT_TYPE): Likewise.
1225 (host64): Likewise.
1226 * configure: Regenerated.
1227
1228 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1229
1230 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1231 since some ABIs round up the size of the struct.
1232
1233 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1234
1235 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1236 the old symbol is undefined and the new symbol is defined.
1237
1238 2003-09-18 Andreas Schwab <schwab@suse.de>
1239
1240 * simple.c (bfd_simple_get_relocated_section_contents): Use
1241 _bfd_generic_link_hash_table_create instead of
1242 bfd_link_hash_table_create.
1243
1244 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1245
1246 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1247 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1248
1249 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1250 Randolph Chung <randolph@tausq.org>
1251
1252 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1253 hppa_link_hash_newfunc, hppa_build_one_stub,
1254 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1255 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1256 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1257 for generating import stubs for calls to statically linked PIC
1258 functions.
1259 (hppa_type_of_stub): Don't generate an import stub for calls to
1260 statically linked pic functions. Generate import stubs for calls
1261 in a shared object, to functions not in a regular file, and to
1262 defined weak functions. Add new argument INFO.
1263 (hppa_build_one_stub): Don't undef ADDIL_DP.
1264 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1265 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1266 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1267 non-shared link. Convert instructions that use the the linkage table
1268 pointer, or a facsimile thereof, to use the global data pointer when
1269 the reloc has been changed.
1270
1271 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1272
1273 * archures.c: Add new machine names for hppa.
1274 * bfd-in2.h: Regenerate.
1275 * cpu-hppa.c: Use the new machine names.
1276
1277 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1278
1279 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1280 all_local_syms member.
1281 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1282 to get the local symbols.
1283
1284 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1285
1286 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1287 (elf_backend_special_sections): Define.a
1288
1289 PR savannah/4950:
1290 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1291 section is read-only.
1292
1293 2003-09-04 Nick Clifton <nickc@redhat.com>
1294
1295 * archures.c (bfd_mach_v850e1): Define.
1296 * bfd-in2.h: Regenerate.
1297 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1298 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1299 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1300 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1301 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1302 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1303 linked with v850e binaries. Mark the output as v850e.
1304
1305 2003-09-03 Nick Clifton <nickc@redhat.com>
1306
1307 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1308 symbols that are used in relocs.
1309
1310 2003-08-30 Robert Millan <robertmh@gnu.org>
1311
1312 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1313 * config.bfd: Likewise.
1314 * configure: Regenerate.
1315
1316 2003-08-31 Christian Groessler <chris@groessler.org>
1317
1318 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1319 instead of returning bfd_reloc_continue.
1320
1321 2003-08-31 Andreas Jaeger <aj@suse.de>
1322
1323 * merge.c: Update to ISO C90.
1324
1325 2003-08-27 Ian Lance Taylor <ian@airs.com>
1326
1327 * configure.in: Check for strtoull.
1328 * bfd.c (bfd_scan_vma): Use strtoull when available.
1329 * configure, config.in: Regenerate.
1330
1331 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1332 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1333 __GNUC__ when deciding whether to use long long for
1334 BFD_HOST_64_BIT.
1335 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1336
1337 2003-08-27 Christian Groessler <chris@groessler.org>
1338
1339 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1340 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1341 functions.
1342 (elf32_i860_howto_table): Insert the new functions as
1343 'special_function's in the proper reloc type entries.
1344
1345 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1346
1347 * elf32-frv.c (elf32_frv_relocate_section): Use
1348 _bfd_elf_rela_local_sym.
1349
1350 2003-08-26 Michael Snyder <msnyder@redhat.com>
1351
1352 * cpu-frv.c: Remove unused enum.
1353
1354 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1355
1356 * reloc.c: Fix documentation for MIPS ELF relocations.
1357 libbfd.h: Regenerate.
1358 bfd-in2.h: Regenerate.
1359
1360 2003-08-24 Jason Eckhardt <jle@rice.edu>
1361
1362 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1363
1364 2003-08-24 Jason Eckhardt <jle@rice.edu>
1365
1366 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1367 shift by 2 before storing the relocated value.
1368
1369 2003-08-23 Jason Eckhardt <jle@rice.edu>
1370
1371 * coff-i860.c (coff_i860_reloc_nyi): New function.
1372 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1373 LOWn, SPLITn, and BRADDR.
1374 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1375 before trying to access the entry.
1376 (coff_i860_rtype_to_howto): Likewise.
1377 (coff_i860_reloc_type_lookup): New function.
1378 (i860_reloc_processing): New function.
1379 (coff_bfd_reloc_type_lookup): Define macro.
1380 (RELOC_PROCESSING): Define macro.
1381 Minor formatting adjustments.
1382
1383 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1384
1385 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1386
1387 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1388
1389 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1390 .got section at 8 bytes.
1391
1392 2003-08-21 Nick Clifton <nickc@redhat.com>
1393
1394 * cofflink.c: Update to ISO C90 and tidy up formatting.
1395
1396 2003-08-21 Randolph Chung <tausq@debian.org>
1397
1398 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1399 can have OSABI=Linux or OSABI=SysV. Check for both.
1400 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1401
1402 2003-08-21 Nick Clifton <nickc@redhat.com>
1403
1404 * po/sv.po: Updated Swedish translation.
1405
1406 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1407
1408 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1409
1410 2003-08-20 Nick Clifton <nickc@redhat.com>
1411
1412 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1413 replace some duplicated code in most elfxx-xxxx.c files. This
1414 version uses the new fields in bfd_link_info.
1415
1416 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1417 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1418 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1419 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1420 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1421 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1422 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1423 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1424 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1425 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1426 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1427 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1428 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1429 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1430 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1431 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1432 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1433 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1434 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1435
1436 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1437 elf_hppa_remark_useless_dynamic_symbols,
1438 elf_hppa_relocate_section): Use the new fields in
1439 bfd_link_info structure.
1440 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1441 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1442 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1443 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1444 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1445 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1446
1447 * elflink.h (elf_link_output_extsym): Fix test for reporting
1448 undefined symbols in shared libraries. Remove redundant test
1449 of shlib_undefined when reporting references to forced local
1450 symbols.
1451
1452 2003-08-18 Andreas Schwab <schwab@suse.de>
1453
1454 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1455 executables.
1456
1457 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1458
1459 * simple.c (bfd_simple_get_relocated_section_contents): Move
1460 reloc_done hack to before first bfd_section_size call. Change all
1461 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1462
1463 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1464
1465 * elf64-ppc.c: Don't include elf/ppc.h.
1466
1467 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1468
1469 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1470 code to work with 64-bit bfds.
1471
1472 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1473
1474 * dep-in.sed: Remove libintl.h.
1475 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1476 (POTFILES.in): Remove target.
1477 * Makefile.in: Regenerate.
1478
1479 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1480
1481 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1482 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1483 use the function sym from the previous reloc.
1484
1485 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1486
1487 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1488 fatal if -pie.
1489 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1490 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1491 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1492 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1493 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1494 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1495 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1496 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1497 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1498 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1499 on undefined symbols if -pie.
1500 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1501
1502 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1503
1504 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1505 branch to __libc_start_main.
1506
1507 2003-08-08 Dmitry Diky <diwil@mail.ru>
1508
1509 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1510 gcc order.
1511 * cpu-msp430.c: Likewise.
1512 * elf32-msp430.c: Likewise.
1513 * bfd-in2.h: Regenerate.
1514
1515 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1516
1517 * elfxx-target.h: Remove PTR cast.
1518 * targets.c (bfd_target): Make backend_data const void *.
1519 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1520 * elf-m10300.c: Likewise.
1521 * elf.c: Likewise.
1522 * elf32-hppa.c: Likewise.
1523 * elf32-i386.c: Likewise.
1524 * elf32-m68hc1x.c: Likewise.
1525 * elf32-ppc.c: Likewise.
1526 * elf32-s390.c: Likewise.
1527 * elf32-sh.c: Likewise.
1528 * elf32-sh64.c: Likewise.
1529 * elf32-sparc.c: Likewise.
1530 * elf32-xtensa.c: Likewise.
1531 * elf64-mips.c: Likewise.
1532 * elf64-ppc.c: Likewise.
1533 * elf64-s390.c: Likewise.
1534 * elf64-sh64.c: Likewise.
1535 * elf64-sparc.c: Likewise.
1536 * elf64-x86-64.c: Likewise.
1537 * elfcode.h: Likewise.
1538 * elfcore.h: Likewise.
1539 * elflink.c: Likewise.
1540 * elflink.h: Likewise.
1541 * elfxx-ia64.c: Likewise.
1542 * elfxx-mips.c: Likewise.
1543 * elfxx-mips.h: Likewise.
1544 * elf.c (prep_headers): Remove useless check for null backend_data.
1545 * bfd-in2.h: Regenerate.
1546
1547 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1548 (NAME): Use ## rather than CONCAT4 macro.
1549 * elfcode.h: Remove one remaining PARAMS macro.
1550 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1551 * elf-strtab.c: Likewise.
1552 * elf-hppa.h: Likewise.
1553 * elf32-hppa.h: Likewise.
1554 * elf32-hppa.c: Likewise.
1555 (elf32_hppa_add_symbol_hook): Delete.
1556 (elf_backend_add_symbol_hook): Don't define.
1557 * libhppa.h: Convert to C90. Replace INLINE with inline.
1558
1559 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1560
1561 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1562 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1563 function descriptors, but warn.
1564 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1565 stub syms so that we can avoid a stub sym if we already have a
1566 plt sym. Do not redefine an existing symbol.
1567 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1568 glink.
1569
1570 2003-08-06 Nick Clifton <nickc@redhat.com>
1571
1572 * po/fr.po: Updated French translation.
1573
1574 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1575
1576 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1577 SEC_LINKER_CREATED.
1578
1579 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1580
1581 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1582 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1583
1584 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1585
1586 * coffcode.h (coff_slurp_line_table): Return with a warning
1587 message if the line number table could not be read.
1588
1589 2003-08-04 Nick Clifton <nickc@redhat.com>
1590
1591 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1592 to messages produced for .gnu.warning.SYMBOL sections.
1593
1594 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1595
1596 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1597 * elfcore.h: Likewise.
1598 * elflink.c: Likewise.
1599 * elflink.h: Likewise.
1600 * elf.c (sym_is_global): Remove INLINE.
1601 (align_file_position): Replace INLINE with inline.
1602 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1603 (elf_file_p): Replace INLINE with inline.
1604
1605 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1606
1607 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1608
1609 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1610
1611 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1612
1613 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1614
1615 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1616 ElfNN_External_Rela instead of Elf64_External_Rela.
1617
1618 2003-08-01 Nick Clifton <nickc@redhat.com>
1619
1620 * config.bfd: Add code to catch obsolete configurations and warn
1621 about them unless --enable-obsolete is used. Use this to mark
1622 vax-vms port as obsolete.
1623
1624 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1625
1626 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1627 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1628 Formatting.
1629 * elfxx-target.h: Remove PARAMS macro. Formatting.
1630
1631 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1632
1633 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1634 * elf64-ppc.c (get_fdh): New function, split out from
1635 ppc64_elf_edit_opd.
1636 (ppc64_elf_check_relocs): Use get_fdh.
1637 (func_desc_adjust): Likewise. Tidy.
1638 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1639 exit. Use get_fdh. Account for superfluous dynamic relocs.
1640 (ppc64_elf_relocate_section): Warning fix.
1641
1642 2003-07-30 Jason Eckhardt <jle@rice.edu>
1643
1644 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1645
1646 2003-07-30 Jason Eckhardt <jle@rice.edu>
1647
1648 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1649
1650 2003-07-30 Randolph Chung <tausq@debian.org>
1651
1652 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1653 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1654
1655 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1656
1657 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1658 Replace PTR with void *. Formatting.
1659 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1660 (make_mapping): Likewise.
1661
1662 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1663
1664 * elf64-ppc.c (func_desc_adjust): Give linker created function
1665 descriptor symbols a size and type.
1666 (ppc64_elf_relocate_section): Correct lq insn test.
1667
1668 2003-07-28 Eric Christopher <echristo@redhat.com>
1669
1670 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1671 (ppc_elf_install_value): New function.
1672 (ppc_elf_sort_rela): Remove.
1673 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1674 and replace with out of range branch stubs.
1675 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1676
1677 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1678
1679 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1680 from input_bfd.
1681
1682 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1683
1684 * elf.c (special_sections): Set attributes for .got and .plt.
1685
1686 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1687
1688 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1689 on function descriptors.
1690 (ELIMINATE_COPY_RELOCS): Expand comment.
1691 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1692 Do include ".toc1".
1693
1694 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1695
1696 * elf.c (_bfd_elf_new_section_hook): Set the default section
1697 type to SHT_NULL.
1698 (elf_fake_sections): Set the section type based on asect->flags
1699 if it is SHT_NULL. Don't abort on processor specific section
1700 types.
1701
1702 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1703
1704 * bfd-in2.h: Regenerated.
1705
1706 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1707
1708 * elf-bfd.h (bfd_elf_special_section): New.
1709 (elf_backend_data): Add special_sections, a pointer to
1710 bfd_elf_special_section.
1711 (elf_section_type). New.
1712 (elf_section_flags): New.
1713 (_bfd_elf_get_sec_type_attr): New.
1714
1715 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1716 real section type/flags.
1717 (special_sections): New.
1718 (get_special_section): New.
1719 (_bfd_elf_get_sec_type_attr): New.
1720 (_bfd_elf_new_section_hook): Check special_section to set
1721 elf_section_type and elf_section_flags.
1722 (elf_fake_sections): Don't use section name to set ELF section
1723 data.
1724
1725 * elf32-m32r.c (m32r_elf_special_sections): New.
1726 (elf_backend_special_sections): Defined.
1727
1728 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1729 (elf_backend_special_sections): Defined.
1730
1731 * elf32-mcore.c (mcore_elf_special_sections): New.
1732 (elf_backend_special_sections): Defined.
1733
1734 * elf32-ppc.c (ppc_elf_special_sections): New.
1735 (elf_backend_special_sections): Defined.
1736
1737 * elf32-sh64.c (sh64_elf_special_sections): New.
1738 (elf_backend_special_sections): Defined.
1739
1740 * elf32-v850.c (v850_elf_special_sections): New.
1741 (elf_backend_special_sections): Defined.
1742
1743 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1744 (elf_backend_special_sections): Defined.
1745
1746 * elf64-alpha.c (elf64_alpha_special_sections): New.
1747 (elf_backend_special_sections): Defined.
1748
1749 * elf64-hppa.c (elf64_hppa_special_sections): New.
1750 (elf_backend_special_sections): Defined.
1751
1752 * elf64-ppc.c (ppc64_elf_special_sections): New.
1753 (elf_backend_special_sections): Defined.
1754
1755 * elf64-sh64.c (sh64_elf64_special_sections): New.
1756 (elf_backend_special_sections): Defined.
1757
1758 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1759 (elf_backend_special_sections): Defined.
1760
1761 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1762
1763 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1764 (elf_backend_special_sections): Defined.
1765
1766 * elfxx-target.h (elf_backend_special_sections): New. Default
1767 to NULL.
1768 (elfNN_bed): Initialize special_sections.
1769
1770 * section.c (bfd_abs_section): Remove const.
1771 (bfd_und_section): Likewise.
1772 (bfd_com_section): Likewise.
1773 (bfd_ind_section): Likewise.
1774
1775 2003-07-24 Nick Clifton <nickc@redhat.com>
1776
1777 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1778 sections are assigned the LOAD attribute.
1779
1780 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1781
1782 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1783 * elf32-sh64-com.c: Likewise.
1784 * elf32-sh64.c: Likewise.
1785 * elf32-sh64.h: Likewise.
1786 * elf64-sh64.c: Likewise.
1787
1788 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1789
1790 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1791 (allocate_dynrelocs): Likewise.
1792 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1793 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1794
1795 2003-07-24 Nick Clifton <nickc@redhat.com>
1796
1797 * po/fr.po: Updated French translation.
1798
1799 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1800
1801 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1802 near the beginning of the file. Swap order of arguments. Call
1803 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1804 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1805 (elf_xtensa_relocate_section): Likewise.
1806 (shrink_dynamic_reloc_sections): Likewise.
1807
1808 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1809
1810 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1811 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1812 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1813 first printing an error message.
1814 (elf_xtensa_finish_dynamic_sections): Likewise.
1815 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1816 discarding literal table entries.
1817 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1818 (elf_xtensa_do_asm_simplify): Likewise.
1819
1820 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1821
1822 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1823 we have a local symbol in common section.
1824
1825 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1826
1827 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1828 weak symbols.
1829
1830 2003-07-22 Nick Clifton <nickc@redhat.com>
1831
1832 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1833 expected RS6000 storage classes.
1834
1835 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1836
1837 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1838 output_bfd unused to silence gcc.
1839
1840 2003-07-21 Nick Clifton <nickc@redhat.com>
1841
1842 * po/sv.po: Updated Swedish translation.
1843
1844 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1845
1846 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1847 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1848 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1849 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1850 now done in _bfd_elf_symbol_refs_local_p.
1851 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1852 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1853 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1854
1855 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1856
1857 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1858
1859 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1860
1861 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1862 (SYMBOL_CALLS_LOCAL): Likewise.
1863
1864 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1865 immediately if symbol isn't defined locally.
1866
1867 2003-07-18 Richard Henderson <rth@redhat.com>
1868
1869 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1870 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1871 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1872 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1873 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1874 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1875 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1876 Update all callers to provide the relocation being resolved.
1877
1878 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1879
1880 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1881 targ_cflags.
1882
1883 2003-07-17 Nick Clifton <nickc@redhat.com>
1884
1885 * po/es.po: New Spanish translation.
1886 * po/sv.po: New Swedish translation.
1887 * po/opcodes.pot: Regenerate.
1888
1889 2003-07-16 Richard Henderson <rth@redhat.com>
1890
1891 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1892 * elfxx-ia64.c, targets.c: Likewise.
1893
1894 2003-07-16 Richard Henderson <rth@redhat.com>
1895
1896 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1897 for symbols defined locally plus -Bsymbolic. Tidy logic.
1898
1899 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1900
1901 * archures.c (bfd_mach_mips7000): New.
1902 * bfd-in2.h: Regenerated.
1903 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1904 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1905 (mips_mach_extensions): Add an entry for it.
1906
1907 2003-07-14 Nick Clifton <nickc@redhat.com>
1908
1909 * po/tr.po: Update with latest version.
1910 * po/SRC-POTFILES.in: Regenerate.
1911 * po/bfd.pot: Regenerate.
1912 * Makfile.in: Regenerate.
1913 * configure: Regenerate.
1914
1915 2003-07-12 Jeff Baker <jbaker@qnx.com>
1916
1917 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1918 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1919 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1920 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1921
1922 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1923
1924 * coffcode.h (coff_set_section_contents): Set the
1925 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1926
1927 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1928
1929 * bfd-in.h (bfd_h8300_pad_address): Declare.
1930 * bfd-in2.h: Regenerate.
1931 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1932 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1933 addresses before checking whether they can be relaxed.
1934 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1935 Don't complain about overflows in general 8-bit relocations.
1936 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1937 Fix handling of R_H8_DIR24A8.
1938
1939 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1940
1941 * elf32-h8300.c: Convert function prototypes and definitions
1942 to C90 syntax.
1943 * coff-h8300.c: Likewise.
1944 * cpu-h8300.c: Likewise.
1945
1946 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1947
1948 * po/SRC-POTFILES.in: Regenerate.
1949 * po/bfd.pot: Likewise.
1950
1951 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1952
1953 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1954 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1955 .xt.lit.plt section.
1956 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1957 and allocate memory for it.
1958 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1959 section to the .got.loc section.
1960 (elf_xtensa_finish_dynamic_sections): Fix up call to
1961 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1962 the address of .got.loc.
1963 (relax_property_section): Shrink .got.loc to match changes in any
1964 literal table section.
1965 (xtensa_is_property_section): Change to match
1966 xtensa_get_property_section_name.
1967 (xtensa_is_littable_section): New.
1968
1969 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1970
1971 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1972 -1LL.
1973
1974 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1975
1976 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1977 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1978 Run "make dep-am".
1979 * Makefile.in: Regenerate.
1980
1981 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1982
1983 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1984 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1985 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1986 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1987 * elf32-am33lin.c: Rename global functions.
1988 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1989 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1990 * configure.in (bfd_elf32_am33lin_vec): Added.
1991 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1992 (elf32-am33lin.lo): List dependencies.
1993 * aclocal.m4, configure, Makefile.in: Rebuilt.
1994 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1995 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1996 ELF_ARCH was not defined before.
1997 (elf_symbol_leading_char): Define if not defined.
1998 * elf32-am33lin.c: Override the definitions above.
1999 * targets.c (bfd_elf32_am33lin_vec): New.
2000
2001 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2002
2003 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
2004 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
2005 pcrel_relocs_copied.
2006 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
2007 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
2008 ld-linux.so.2 to ld.so.1.
2009 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
2010 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
2011 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
2012 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2013 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
2014 .rela.* section contents with bfd_zalloc.
2015 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
2016 * elf-m10300.c: Added declarations for functions missing them.
2017 Merge some shared-library changes from the i386 back-end. Use
2018 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
2019 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
2020 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
2021 members of elf_link_hash_entry. Adjusted references.
2022 (mn10300_elf_final_link_relocate): dynobj was already loaded
2023 into a local variable, use it.
2024 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
2025 * elf-m10300.c: Add missing function prototypes.
2026 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2027 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
2028 relocation for dynamic relocations.
2029 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2030 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
2031 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
2032 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
2033 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
2034 (_bfd_mn10300_elf_create_got_section): ... here, so that its
2035 adress is already known at the time we compute relaxations.
2036 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
2037 and PLT32 to narrower relocations.
2038 * libbfd.h, bfd-in2.h: Rebuilt.
2039 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
2040 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
2041 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
2042 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
2043 BFD_RELOC_MN10300_RELATIVE): New relocs.
2044 * libbfd.h, bfd-in2.h: Rebuilt.
2045 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
2046 (struct elf32_mn10300_link_hash_entry): Added DSO-related
2047 fields.
2048 (elf_mn10300_howto): Defined new relocation types.
2049 (mn10300_reloc_map): Map them.
2050 (_bfd_mn10300_elf_create_got_section): New fn.
2051 (mn10300_elf_check_relocs): Handle PIC relocs.
2052 (mn10300_elf_final_link_relocate): Likewise.
2053 (mn10300_elf_relocate_section): Handle DSOs.
2054 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
2055 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
2056 elf_mn10300_pic_plt_entry): New.
2057 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
2058 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
2059 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
2060 elf_mn10300_plt_reloc_offset: New macros.
2061 (ELF_DYNAMIC_INTERPRETER): Likewise.
2062 (_bfd_mn10300_elf_create_dynamic_sections): New function.
2063 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
2064 (_bfd_mn10300_elf_discard_copies): Likewise.
2065 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
2066 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2067 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
2068 (elf_backend_can_gc_sections,
2069 elf_backend_create_dynamic_sections,
2070 elf_backend_adjust_dynamic_sections,
2071 elf_backend_size_dynamic_sections,
2072 elf_backend_finish_dynamic_symbol,
2073 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2074 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2075 elf_backend_got_header_size, elf_backend_plt_header_size): New
2076 macros.
2077
2078 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2079
2080 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
2081 * elf-m10300.c (compute_function_info): Account for AM33
2082 registers in `movm' when computing stack space for `call' when
2083 linking for AM33/2.0 link.
2084 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
2085 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
2086 * bfd-in2.h: Rebuilt.
2087 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
2088 * elf-m10300.c: Updated.
2089 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
2090 * archures.c (bfd_mach_am332): Defined.
2091 * bfd-in2.h: Rebuilt.
2092 * cpu-m10300.c (bfd_am332_arch): Defined.
2093 (bfd_am33_arch): Chained with am33-2.
2094 * elf-m10300.c (elf_mn10300_mach): Handle am332.
2095 (_bfd_mn10300_elf_final_write_processing): Likewise.
2096
2097 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
2098
2099 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
2100
2101 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2102
2103 * elf64-ppc.c (bfd_elf64_mkobject): Define.
2104 (struct ppc64_elf_obj_tdata): New.
2105 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
2106 (ppc64_elf_mkobject): New function.
2107 (struct got_entry): Add "owner". Move "tls_type".
2108 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
2109 (ppc64_elf_init_stub_bfd): New function.
2110 (create_got_section): Create header .got in dynobj. Create .got
2111 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
2112 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
2113 Look for dynobj .got, and test it.
2114 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
2115 (update_local_sym_info): Likewise.
2116 (ppc64_elf_check_relocs): Likewise.
2117 (ppc64_elf_gc_sweep_hook): Likewise.
2118 (ppc64_elf_tls_optimize): Likewise.
2119 (allocate_dynrelocs): Likewise.
2120 (ppc64_elf_size_dynamic_sections): Likewise.
2121 (ppc64_elf_relocate_section): Likewise.
2122 (ppc64_elf_next_toc_section): Update comment.
2123 (toc_adjusting_stub_needed): Remove unneeded cast.
2124 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2125 testing section flags.
2126 (ppc64_elf_build_stubs): Likewise.
2127 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2128 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2129 (func_desc_adjust): Copy over dynamic info for undef weaks.
2130 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2131 (ppc64_elf_size_stubs): Update prototype.
2132 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2133 input sections rather than scanning dynobj.
2134
2135 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2136
2137 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2138 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2139 (mips_elf_create_msym_section): Delete.
2140 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2141 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2142 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2143 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2144 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2145 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2146 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2147
2148 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2149
2150 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2151 symbols protected.
2152
2153 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2154
2155 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2156 of relocations whose offset is -2.
2157
2158 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2159
2160 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2161 forced-local symbols like other locals. Don't create relocations
2162 against STN_UNDEF in irix objects.
2163
2164 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2165
2166 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2167 compatible objects, add the values of defined external symbols
2168 to the addend.
2169
2170 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2171
2172 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2173 initialize a GOT entry to the symbol's st_value.
2174
2175 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2176
2177 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2178 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2179 (ppc_elf_tdata): Define.
2180 (elf_local_ptr_offsets): Adjust.
2181 (ppc_elf_mkobject): New function.
2182 (bfd_elf32_mkobject): Define.
2183
2184 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2185 * elfcore.h (elf_core_file_p): Likewise.
2186 * section.c (bfd_section_init): Remove prototype.
2187
2188 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2189
2190 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2191 field.
2192 (enum elf_linker_section_enum): Delete.
2193 (struct elf_linker_section): Delete.
2194 (struct elf_linker_section_pointers): Delete.
2195 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2196 Make linker_section_pointers a void**.
2197 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2198 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2199 of old item in elf-bfd.h.
2200 (struct elf_linker_section): Likewise.
2201 (struct elf_linker_section_pointers): Likewise.
2202 (elf_local_ptr_offsets): Define.
2203 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2204 (ppc_elf_link_hash_newfunc): Init it.
2205 (struct ppc_elf_link_hash_table): Add sbss.
2206 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2207 individual fields.
2208 (elf_create_linker_section): Fold into..
2209 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2210 Make rela section here if shared.
2211 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2212 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2213 clearing in a loop.
2214 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2215 section here.
2216 (ppc_elf_check_relocs): Adjust.
2217 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2218 creating .sbss by hand.
2219 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2220
2221 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2222
2223 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2224 complain_overflow_bitfield.
2225 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2226 complain_overflow_bitfield.
2227
2228 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2229
2230 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2231 true even if -pie.
2232
2233 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2234
2235 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2236 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2237 !info->executable.
2238 (get_fptr): For -pie create .opd as writable section and create
2239 .rela.opd as well.
2240 (elfNN_ia64_check_relocs): Change info->shared into
2241 !info->executable.
2242 (allocate_fptr): Likewise.
2243 (allocate_dynrel_entries): Account for a relative reloc for -pie
2244 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2245 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2246 section if -pie.
2247 (set_got_entry): Don't create a relative reloc if -pie
2248 want_ltoff_fptr for undefweak symbol.
2249 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2250 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2251 @fptr().
2252
2253 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2254 even if -pie.
2255 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2256 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2257 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2258 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2259 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2260 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2261 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2262 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2263 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2264
2265 2003-07-04 Paul Clarke <paulc@senet.com.au>
2266
2267 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2268 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2269 <R_H8_DIR32A16>: Fix type of relocation.
2270
2271 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2272
2273 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2274 sections were created already. Remove unnecessary tests of
2275 the previous change.
2276
2277 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2278
2279 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2280 bfd_make_section for existing sections.
2281
2282 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2283
2284 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2285 create_got_section if we already have done so.
2286 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2287 (sh_elf_check_relocs): Likewise.
2288 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2289 htab->root.dynobj instead.
2290 (sh_elf_check_relocs): Likewise.
2291 (sh_elf_finish_dynamic_sections): Likewise.
2292
2293 * section.c (bfd_make_section): Return NULL for existing section.
2294
2295 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2296
2297 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2298 ppc_elf_create_got if we've already done so.
2299
2300 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2301 (_bfd_elf_find_pointer_linker_section): Likewise.
2302 (bfd_elf32_create_pointer_linker_section): Likewise.
2303 (bfd_elf32_finish_pointer_linker_section): Likewise.
2304 (bfd_elf64_create_pointer_linker_section): Likewise.
2305 (bfd_elf64_finish_pointer_linker_section): Likewise.
2306 (_bfd_elf_make_linker_section_rela): Likewise.
2307 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2308 (elf_finish_pointer_linker_section): Likewise.
2309 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2310 (_bfd_elf_create_linker_section): Move this function..
2311 (_bfd_elf_find_pointer_linker_section): ..and this..
2312 * elflink.h (elf_create_pointer_linker_section): ..and this..
2313 (elf_finish_pointer_linker_section): ..and this..
2314 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2315 calls.
2316 (elf_create_linker_section): Convert to C90, tidy.
2317 (elf_find_pointer_linker_section): Likewise.
2318 (elf_create_pointer_linker_section): Likewise.
2319 (elf_finish_pointer_linker_section): Likewise.
2320 * elf32-i370.c: Delete #if 0 code.
2321
2322 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2323
2324 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2325 _restf* to be satisfied by shared libs, and always force them local.
2326 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2327 Correct test for "bl".
2328 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2329 primary opcode 31.
2330
2331 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2332
2333 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2334 (s390_tls_reloc): New function.
2335 (elf_howto_table): Add long displacement relocations R_390_20,
2336 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2337 (elf_s390_reloc_type_lookup): Likewise.
2338 (elf_s390_check_relocs): Likewise.
2339 (elf_s390_gc_sweep_hook): Likewise.
2340 (elf_s390_relocate_section): Likewise.
2341 * elf64-s390.c: Same changes as for elf32-s390.c.
2342 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2343 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2344 BFD_RELOC_390_TLS_GOTIE20.
2345 * bfd-in2.h: Regenerate.
2346 * libbfd.h: Likewise.
2347
2348 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2349
2350 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2351 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2352
2353 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2354
2355 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2356 Replace PTR with void *. Formatting.
2357 * archive64.c: Likewise.
2358 * archures.c: Likewise.
2359 * bfd-in.h: Likewise.
2360 * bfd.c: Likewise.
2361 * bfdio.c: Likewise.
2362 * bfdwin.c: Likewise.
2363 * cache.c: Likewise.
2364 * corefile.c: Likewise.
2365 * format.c: Likewise.
2366 * init.c: Likewise.
2367 * libbfd-in.h: Likewise.
2368 * libbfd.c: Likewise.
2369 * linker.c: Likewise.
2370 * opncls.c: Likewise.
2371 * reloc.c: Likewise.
2372 * section.c: Likewise.
2373 * simple.c: Likewise.
2374 * syms.c: Likewise.
2375 * targets.c: Likewise.
2376 * bfd-in2.h: Regenerate.
2377 * libbfd.h: Regenerate.
2378
2379 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2380 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2381 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2382 (bfd_getb64): Rewrite without parens.
2383 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2384 * cache.c (insert, snip): Remove INLINE.
2385 * linker.c (bfd_link_add_undef): Likewise.
2386
2387 2003-06-29 Andreas Jaeger <aj@suse.de>
2388
2389 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2390 unnecessary prototypes. Replace PTR with void *.
2391 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2392 trim plt entries. Move undefweak non-default visibility test ...
2393 (allocate_dynrelocs): ... from here.
2394 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2395 Change all callers.
2396 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2397 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2398 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2399 dynreloc and .got relocs.
2400 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2401 for .got relocs.
2402
2403 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2404
2405 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2406
2407 2003-06-27 Nick Clifton <nickc@redhat.com>
2408
2409 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2410 bfd_add_gnu_debuglink_section and only create the section, do not
2411 fill in its contents.
2412 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2413 contents of a .gnu-debuglink section.
2414 * bfd-in2.h: Regenerate.
2415
2416 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2417
2418 * elfxx-mips.c: Revert .got alignment to 2**4.
2419
2420 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2421
2422 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2423
2424 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2425
2426 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2427 relocation header setup.
2428
2429 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2430
2431 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2432 (ppc_elf_reloc_type_lookup): Modify comment.
2433 (ppc_elf_info_to_howto): Ditto.
2434 (ppc_elf_relocate_section): Ditto.
2435 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2436
2437 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2438
2439 * aout-ns32k.c: Correct spelling of "relocatable".
2440 * aoutx.h: Likewise.
2441 * bfd-in.h: Likewise.
2442 * bfd.c: Likewise.
2443 * bout.c: Likewise.
2444 * coff-a29k.c: Likewise.
2445 * coff-alpha.c: Likewise.
2446 * coff-arm.c: Likewise.
2447 * coff-i386.c: Likewise.
2448 * coff-i860.c: Likewise.
2449 * coff-i960.c: Likewise.
2450 * coff-m68k.c: Likewise.
2451 * coff-m88k.c: Likewise.
2452 * coff-mcore.c: Likewise.
2453 * coff-mips.c: Likewise.
2454 * coff-or32.c: Likewise.
2455 * coff-ppc.c: Likewise.
2456 * coff-rs6000.c: Likewise.
2457 * coff-sh.c: Likewise.
2458 * coff-tic80.c: Likewise.
2459 * coff64-rs6000.c: Likewise.
2460 * cofflink.c: Likewise.
2461 * cpu-ns32k.c: Likewise.
2462 * ecoff.c: Likewise.
2463 * ecofflink.c: Likewise.
2464 * elf-bfd.h: Likewise.
2465 * elf-eh-frame.c: Likewise.
2466 * elf-hppa.h: Likewise.
2467 * elf-m10200.c: Likewise.
2468 * elf-m10300.c: Likewise.
2469 * elf.c: Likewise.
2470 * elf32-arm.h: Likewise.
2471 * elf32-avr.c: Likewise.
2472 * elf32-cris.c: Likewise.
2473 * elf32-d10v.c: Likewise.
2474 * elf32-dlx.c: Likewise.
2475 * elf32-fr30.c: Likewise.
2476 * elf32-frv.c: Likewise.
2477 * elf32-h8300.c: Likewise.
2478 * elf32-hppa.c: Likewise.
2479 * elf32-i370.c: Likewise.
2480 * elf32-i386.c: Likewise.
2481 * elf32-i860.c: Likewise.
2482 * elf32-i960.c: Likewise.
2483 * elf32-ip2k.c: Likewise.
2484 * elf32-iq2000.c: Likewise.
2485 * elf32-m32r.c: Likewise.
2486 * elf32-m68hc11.c: Likewise.
2487 * elf32-m68hc1x.c: Likewise.
2488 * elf32-m68k.c: Likewise.
2489 * elf32-mcore.c: Likewise.
2490 * elf32-mips.c: Likewise.
2491 * elf32-msp430.c: Likewise.
2492 * elf32-openrisc.c: Likewise.
2493 * elf32-ppc.c: Likewise.
2494 * elf32-s390.c: Likewise.
2495 * elf32-sh.c: Likewise.
2496 * elf32-sh64.c: Likewise.
2497 * elf32-sparc.c: Likewise.
2498 * elf32-v850.c: Likewise.
2499 * elf32-vax.c: Likewise.
2500 * elf32-xstormy16.c: Likewise.
2501 * elf32-xtensa.c: Likewise.
2502 * elf64-alpha.c: Likewise.
2503 * elf64-hppa.c: Likewise.
2504 * elf64-mips.c: Likewise.
2505 * elf64-mmix.c: Likewise.
2506 * elf64-ppc.c: Likewise.
2507 * elf64-s390.c: Likewise.
2508 * elf64-sh64.c: Likewise.
2509 * elf64-sparc.c: Likewise.
2510 * elf64-x86-64.c: Likewise.
2511 * elfcode.h: Likewise.
2512 * elflink.h: Likewise.
2513 * elfn32-mips.c: Likewise.
2514 * elfxx-ia64.c: Likewise.
2515 * elfxx-mips.c: Likewise.
2516 * i386linux.c: Likewise.
2517 * ieee.c: Likewise.
2518 * libcoff-in.h: Likewise.
2519 * linker.c: Likewise.
2520 * m68klinux.c: Likewise.
2521 * pdp11.c: Likewise.
2522 * pe-mips.c: Likewise.
2523 * peXXigen.c: Likewise.
2524 * reloc.c: Likewise.
2525 * reloc16.c: Likewise.
2526 * sparclinux.c: Likewise.
2527 * sunos.c: Likewise.
2528 * syms.c: Likewise.
2529 * versados.c: Likewise.
2530 * vms.c: Likewise.
2531 * xcofflink.c: Likewise.
2532 * bfd-in2.h: Regenerate.
2533 * libcoff.h: Regenerate.
2534 * libbfd.h: Regenerate.
2535
2536 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2537
2538 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2539 local sym errors.
2540
2541 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2542 prototypes and casts. Replace PTR with void *. Formatting.
2543 * elf32-ppc.c: Likewise. Break long strings too.
2544 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2545 (ppc_elf_unhandled_reloc): Internationalize error message.
2546 * elf32-ppc.h: Remove PARAMS.
2547
2548 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2549
2550 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2551 APUinfo slots.
2552 (ppc_elf_final_write_processing): Likewise.
2553
2554 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2555
2556 * elflink.h (elf_link_input_bfd): Check raw size when using
2557 kept_section to preserve debug information discarded by
2558 linkonce.
2559
2560 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2561
2562 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2563 (ppc64_elf_setup_section_lists): Set it.
2564 (ppc64_elf_relocate_section): Check sym section id against top_id.
2565 (ppc_build_one_stub): Comment on top_id.
2566
2567 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2568
2569 * config.bfd: Add tic4x-*-rtems*.
2570
2571 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2572
2573 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2574 prototypes and casts. Replace PTR with void *. Format copyright.
2575 Mention ABI links.
2576 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2577 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2578 (ppc_type_of_stub): Make r_type an enum.
2579 (ppc64_elf_size_stubs): Likewise.
2580 * elf64-ppc.h: Remove PARAMS macro.
2581
2582 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2583
2584 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2585 elf hash tab fields.
2586
2587 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2588 (ppc64_elf_info_to_howto): Likewise.
2589 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2590 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2591
2592 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2593
2594 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2595 reloc overflow on discarded eh_frame entries.
2596
2597 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2598
2599 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2600 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2601 Return error condition.
2602 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2603 that have has_gp_reloc set.
2604 (struct ppc_link_hash_table): Add stub_count.
2605 (ppc_build_one_stub): Increment it.
2606 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2607 individual fields.
2608 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2609
2610 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2611
2612 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2613 size calculation from addend. Round size up.
2614
2615 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2616
2617 * elf32-cris.c (cris_elf_relocate_section) <case
2618 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2619 symbol from a normal object or an undefined weak symbol.
2620
2621 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2622
2623 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2624 R_PPC64_TOC relocs.
2625
2626 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2627
2628 * section.c (struct sec): Put back kept_section.
2629 (STD_SECTION): Put back kept_section initialization.
2630 * bfd-in2.h: Regenerate.
2631
2632 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2633 sections for relocateable output. Use kept_section to preserve
2634 debug information discarded by linkonce.
2635
2636 2003-06-17 Roland McGrath <roland@redhat.com>
2637
2638 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2639 segment-relative relocation between different segments.
2640
2641 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2642
2643 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2644 optimizations earlier.
2645
2646 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2647 Restore previous input_list type.
2648 (ppc64_elf_link_hash_table_create): Undo last change.
2649 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2650 per output section, but don't bother with bfd_abs_section marker.
2651 (ppc64_elf_next_input_section): Adjust for multiple input section
2652 lists.
2653 (group_sections): Likewise.
2654
2655 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2656
2657 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2658 *r_offset == r_addend for RELATIVE relocs against .got.
2659
2660 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2661
2662 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2663
2664 2003-06-17 Nick Clifton <nickc@redhat.com>
2665
2666 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2667 in the vtable_entries_used array to allow for the accessing
2668 the largest element.
2669
2670 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2671
2672 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2673 input_list.
2674 (ppc64_elf_link_hash_table_create): Init input_list here.
2675 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2676 per output section. Set toc_off for abs and other standard sections.
2677 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2678 (ppc64_elf_next_input_section): Adjust for single input section list.
2679 Don't set toc_curr from input bfds that haven't set elf_gp.
2680 (group_sections): Adjust for single input section list.
2681
2682 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2683
2684 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2685
2686 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2687 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2688 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2689 got section for RELATIVE relocs. Fix wrong comment. Change condition
2690 under which dynamic relocs update the section contents.
2691
2692 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2693
2694 * config.bfd: Add i386-netbsd-gnu target.
2695
2696 2003-06-12 Nick Clifton <nickc@redhat.com>
2697
2698 * opncls.c (calc_crc32): Rename to
2699 bfd_calc_gnu_debuglink_crc32 and export.
2700 (GNU_DEBUGLINK): Define and use to replace occurrences of
2701 hard-coded ".gnu_debuglink" in the code.
2702 (get_debug_link_info): Prevent aborts by replacing call to
2703 xmalloc with a call to malloc.
2704 (find_separate_debug_file): Prevent aborts by replacing calls
2705 to xmalloc and xstrdup with calls to malloc and strdup.
2706 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2707 section to a bfd.
2708 * bfd-in2.h: Regenerate.
2709
2710 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2711
2712 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2713 New target (was i[3-7]86-*-openbsd* before).
2714 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2715 (vax-*-openbsd*): New target.
2716
2717 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2718
2719 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2720 for n32, too.
2721 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2722 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2723 (mips_elf_create_got_section): Likewise.
2724 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2725
2726 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2727
2728 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2729 (elf_mips_howto_table_rel): Use it.
2730 (gprel32_with_gp): Move prototype.
2731 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2732 Use mips_elf_generic_reloc.
2733 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2734 Code cleanup.
2735 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2736 zero addend.
2737 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2738 as in the other *_gprel*_reloc functions.
2739 (gprel32_with_gp): Handle partial_inplace properly.
2740 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2741 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2742 Do addend handling directly instead of calling
2743 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2744 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2745 of zero addend. Handle partial_inplace properly.
2746 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2747 addend.
2748 (mips_elf64_gprel16_reloc): Likewise.
2749 (mips_elf64_literal_reloc): Likewise.
2750 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2751 logic as in the other *_gprel*_reloc functions. Handle
2752 partial_inplace properly.
2753 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2754 addend. Handle partial_inplace properly.
2755 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2756 of calling _bfd_mips_elf_gprel16_with_gp.
2757 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2758 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2759 of zero addend.
2760 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2761 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2762 of calling _bfd_mips_elf_gprel16_with_gp.
2763 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2764 partial_inplace properly. Fix wrong addend handling. Fix overflow
2765 check.
2766 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2767 exported.
2768 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2769 (_bfd_mips_elf_relocate_section): Likewise.
2770 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2771 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2772 (_bfd_mips_elf_sign_extend): New prototype.
2773
2774 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2775
2776 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2777 New target (was sparc-*-openbsd* before).
2778 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2779
2780 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2781 * configure: Regenerate.
2782
2783 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2784
2785 * po/Make-in (DESTDIR): New.
2786 (install-data-yes): Support $(DESTDIR).
2787 (uninstall): Likewise.
2788
2789 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2790
2791 * Makefile.am (config.status): Depend on version.h.
2792 Run "make dep-am".
2793 * Makefile.in: Regenerate.
2794 * po/SRC-POTFILES.in: Regenerate.
2795
2796 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2797 Gary Hade <garyhade@us.ibm.com>
2798
2799 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2800
2801 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2802
2803 * archures.c (bfd_mach_h8300sxn): New architecture.
2804 * bfd-in2.h: Regenerate.
2805 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2806 (h8300sxn_info_struct): New.
2807 (h8300sx_info_struct): Link to it.
2808 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2809 (elf32_h8_final_write_processing): Likewise.
2810
2811 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2812
2813 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2814 elfxx-target.h so that we can use elf_backend_got_header_size.
2815 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2816 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2817 associated macros.
2818 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2819 dst_mask.
2820 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2821 ppc_stub_plt_branch_r2off.
2822 (struct ppc_stub_hash_entry): Reorganize.
2823 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2824 toc_curr, toc_off and emit_stub_syms.
2825 (ppc64_elf_link_hash_table_create): Init them.
2826 (ppc_stub_name): Correct string size.
2827 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2828 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2829 used.
2830 (ppc_type_of_stub): Tweak root.type test.
2831 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2832 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2833 ppc_stub_plt_branch_r2off.
2834 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2835 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2836 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2837 Initialize elf_gp and toc_curr.
2838 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2839 (ppc64_elf_next_input_section): Set toc_off.
2840 (group_sections): Ensure groups have the same TOC.
2841 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2842 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2843 Build new glink stub.
2844 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2845 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2846 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2847 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2848 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2849 (STD_SECTION): Update.
2850 * ecoff.c (bfd_debug_section): Update comment.
2851 * bfd-in2.h: Regenerate.
2852
2853 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2854
2855 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2856 NULL function pointers.
2857
2858 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2859
2860 * simple.c (bfd_simple_get_relocated_section_contents): Call
2861 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2862
2863 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2864
2865 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2866 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2867 swaptables.
2868 * coff-tic4x.c: Ditto
2869 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2870 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2871 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2872 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2873 swap tables.
2874 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2875 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2876 * coff-apollo.c: Ditto
2877 * coff-arm.c: Ditto
2878 * coff-h8300.c: Ditto
2879 * coff-h8500.c: Ditto
2880 * coff-i960.c: Ditto
2881 * coff-m68k.c: Ditto
2882 * coff-m88k.c: Ditto
2883 * coff-mcore.c: Ditto
2884 * coff-sh.c: Ditto
2885 * coff-sparc.c: Ditto
2886 * coff-tic80.c: Ditto
2887 * coff-we32k.c: Ditto
2888 * coff-z8k.c: Ditto
2889 * coff-w65.c: Ditto
2890
2891 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2892
2893 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2894 initialization bug
2895
2896 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2897
2898 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2899 (bfd_section_from_phdr): Likewise.
2900 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2901 (get_program_header_size): Count with PT_GNU_STACK.
2902 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2903 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2904
2905 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2906
2907 * elflink.h (elf_link_input_bfd): Call linker error_handler
2908 for discarded definitions.
2909
2910 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2911
2912 * syms.c (decode_section_type): Return 'n' if section flags are
2913 SEC_HAS_CONTENTS && SEC_READONLY.
2914
2915 2003-06-03 Nick Clifton <nickc@redhat.com>
2916
2917 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2918 R_V850_ABS32. Add entry for R_V850_REL32.
2919 (v850_elf_reloc_map): Likewise.
2920 (v850_elf_check_relocs): Likewise.
2921 (v850_elf_perform_relocation): Likewise.
2922 (v850_elf_final_link_relocate): Likewise. Include computation
2923 to make R_V850_REl32 pc-relative.
2924
2925 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2926
2927 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2928 and DT_DEBUG dynamic tag even for position independent executables.
2929 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2930
2931 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2932
2933 * config.bfd: Move obsolete entries out of the range of the
2934 targmatch sed script.
2935
2936 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2937
2938 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2939
2940 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2941
2942 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2943 plt entries, not just 8191.
2944
2945 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2946
2947 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2948 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2949
2950 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2951 Jakub Jelinek <jakub@redhat.com>
2952
2953 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2954 instead of info->shared where appropriate.
2955 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2956 * elflink.c (_bfd_elf_create_got_section): Likewise.
2957 (_bfd_elf_link_create_dynamic_sections): Likewise.
2958 (_bfd_elf_link_assign_sym_version): Likewise.
2959 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2960 and DT_DEBUG dynamic tag even for position independent executables.
2961 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2962 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2963 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2964 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2965 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2966 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2967 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2968 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2969 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2970
2971 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2972
2973 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2974 signalled thread.
2975 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2976
2977 2003-05-29 Nick Clifton <nickc@redhat.com>
2978
2979 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2980 Tidy up formatting.
2981 * Makefile.am: Add dependency on safe-ctype.h.
2982 * Makefile.in: Regenerate.
2983
2984 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2985
2986 * elfxx-mips.c: Don't force symbols local unconditionally.
2987
2988 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2989
2990 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2991 undefined_symbol call.
2992
2993 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2994
2995 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2996 (mips_elf_link_hash_table): Likewise.
2997
2998 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2999
3000 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
3001 R_MIPS_GNU_REL16_S2 support.
3002 (bfd_elf64_bfd_reloc_type_lookup): Use it.
3003 (mips_elf64_rtype_to_howto): Use it.
3004 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
3005 R_MIPS_GNU_REL16_S2 support.
3006 (bfd_elf32_bfd_reloc_type_lookup): Use it.
3007 (mips_elf_n32_rtype_to_howto): Use it.
3008
3009 2003-05-21 Stuart F. Downing <sdowning@fame.com>
3010
3011 * som.h: Define PA_2_0 before including a.out.h
3012
3013 2003-05-07 Eric Christopher <echristo@redhat.com>
3014 Alexandre Oliva <aoliva@redhat.com>
3015
3016 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
3017 pic tests, change to warning.
3018 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
3019
3020 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
3021
3022 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
3023 well as shle-...-netbsdelf. Remove duplicate entry.
3024
3025 2003-05-21 Nick Clifton <nickc@redhat.com>
3026
3027 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
3028 for X_STORMY16_REL_12 reloc.
3029
3030 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
3031 the type of the hash table in the bfd_link_info structure.
3032 (bfd_elf_get_runpath_list): Likewise.
3033
3034 2003-05-19 Roland McGrath <roland@redhat.com>
3035
3036 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
3037 * bfd-in.h: Declare it.
3038 * bfd-in2.h: Regenerated.
3039 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
3040 * elf-bfd.h (struct elf_backend_data): New function pointer member
3041 elf_backend_bfd_from_remote_memory.
3042 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
3043 Declare them.
3044 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
3045 (elfNN_bed): Add that to the initializer.
3046
3047 2003-05-15 Roland McGrath <roland@redhat.com>
3048
3049 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
3050
3051 2003-05-20 Jakub Jelinek <jakub@redhat.com>
3052
3053 * elflink.h (elf_link_output_extsym): Only issue error about !=
3054 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
3055
3056 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
3057
3058 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
3059 when removing the old definition for symbols with non-default
3060 visibility.
3061
3062 2003-05-18 Jason Eckhardt <jle@rice.edu>
3063
3064 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
3065
3066 2003-05-17 Andreas Schwab <schwab@suse.de>
3067
3068 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
3069 elf_section_data during processing of pc-relative and absolute
3070 relocations.
3071 (elf_m68k_relocate_section): Use the cached reloc section instead
3072 of computing it again. Fix handling of visibility. Don't modify
3073 addend when copying over a relocation into the output.
3074
3075 2003-05-17 Alan Modra <amodra@bigpond.net.au>
3076
3077 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3078 to trim plt entries. Move undefweak non-default visibility test..
3079 (allocate_dynrelocs): ..from here.
3080 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
3081 dynamic_sections_created here. Update comment. Move undefweak
3082 non-default visibility test..
3083 (allocate_dynrelocs): ..from here. Fix comment.
3084 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3085 to trim plt entries. Move undefweak non-default visibility test..
3086 (allocate_dynrelocs): ..from here. Fix comment.
3087 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
3088 STV_DEFAULT rather than comparing with zero.
3089 * elflink.c (_bfd_elf_merge_symbol): Likewise.
3090 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
3091
3092 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3093
3094 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
3095 pointers.
3096 (_bfd_set_gp_value): Likewise.
3097
3098 2003-05-16 Michael Snyder <msnyder@redhat.com>
3099 From Bernd Schmidt <bernds@redhat.com>
3100 * archures.c (bfd_mach_h8300sx): New.
3101 * bfd-in2.h: Regenerate.
3102 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
3103 (h8300sx_info_struct): New.
3104 (h8300s_info_struct): Link to it.
3105 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
3106 (elf32_h8_final_write_processing): Likewise.
3107 (elf32_h8_relax_section): Likewise.
3108
3109 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
3110
3111 * config.bfd: Accept i[3-7]86 variants.
3112 * configure.host: Likewise.
3113 * configure.in: Likewise.
3114 * configure: Regenerate.
3115
3116 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3117
3118 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
3119 symbol.
3120
3121 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3122
3123 * elflink.h (elf_link_check_versioned_symbol): Also allow
3124 the base version.
3125
3126 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3127 H.J. Lu <hongjiu.lu@intel.com>
3128
3129 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3130 (elf_i386_relocate_section): Likewise.
3131 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3132 (ppc_elf_relocate_section): Likewise.
3133 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3134 (ppc64_elf_relocate_section): Likewise.
3135
3136 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3137
3138 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3139
3140 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3141
3142 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3143 processor capability, allow merge of HC12 and HCS12 in some cases.
3144 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3145 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3146 (bfd_m68hc12_arch): Link it.
3147 (scan_mach): New function.
3148
3149 2003-05-13 Andrew Haley <aph@redhat.com>
3150
3151 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3152
3153 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3154 H.J. Lu <hongjiu.lu@intel.com>
3155
3156 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3157 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3158 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3159 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3160 (ppc_elf_relocate_section): Likewise.
3161 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3162 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3163 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3164 relocs need no other types.
3165 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3166 dynreloc check.
3167 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3168 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3169 .got relocs.
3170
3171 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3172
3173 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3174 copy ELF_LINK_NON_GOT_REF from weakdef.
3175 (allocate_dynrelocs): For undef weak syms with non-default
3176 visibility, a) don't allocate plt entries, b) don't allocate
3177 .got relocs, c) discard dyn rel space
3178 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3179 don't generate dynamic relocs.
3180 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3181 for weakdefs when symbol already adjusted.
3182
3183 2003-05-12 Nick Clifton <nickc@redhat.com>
3184
3185 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3186 overflow detection for R_XSTORMY16_16 reloc.
3187
3188 2003-05-12 Paul Clarke <paulc@senet.com.au>
3189
3190 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3191
3192 2003-05-11 Jason Eckhardt <jle@rice.edu>
3193
3194 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3195 adjust upper bits.
3196 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3197 proper place.
3198 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3199 proper place.
3200
3201 2003-05-11 Andreas Schwab <schwab@suse.de>
3202
3203 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3204 complicated tests for unresolvable relocs with a simple direct
3205 scheme using "unresolved_reloc" var. Report some detail on
3206 bfd_reloc_outofrange and similar errors.
3207
3208 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3209
3210 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3211 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3212 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3213 * elf64-s390.c: Likewise.
3214
3215 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3216
3217 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3218 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3219 ELF_LINK_NON_GOT_REF from weakdef.
3220 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3221 already been adjusted before treating it specially.
3222 * el64-s390.c: Likwise.
3223
3224 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3225
3226 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3227 non-default visibility, a) don't make them dynamic, b) discard
3228 space for dynamic relocs.
3229 (elf_s390_relocate_section): Initialize the GOT entries and skip
3230 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3231 symbols with non-default visibility.
3232 * elf64-s390.c: Likewise.
3233
3234 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3235
3236 * cpu-arm.c (arm_check_note): Warning fix.
3237 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3238 to keep relocs if edited.
3239 (iq2000_elf_print_private_bfd_data): Return TRUE.
3240 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3241 ELF64_R_SYM.
3242 (elfNN_ia64_relax_ldxmov): Warning fix.
3243 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3244 * xtensa-modules.c (get_num_opcodes): Warning fix.
3245
3246 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3247
3248 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3249
3250 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3251
3252 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3253 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3254 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3255 (bfd_elf_record_link_assignment): Move from elflink.h.
3256 (_bfd_elf_merge_symbol): Likewise.
3257 (_bfd_elf_add_default_symbol): Likewise.
3258 (_bfd_elf_export_symbol): Likewise.
3259 (_bfd_elf_link_find_version_dependencies): Likewise.
3260 (_bfd_elf_link_assign_sym_version): Likewise.
3261 (_bfd_elf_link_read_relocs): Likewise.
3262 (_bfd_elf_link_size_reloc_section): Likewise.
3263 (_bfd_elf_fix_symbol_flags): Likewise.
3264 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3265 (_bfd_elf_link_sec_merge_syms): Likewise.
3266 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3267 and bed->s->sizeof_rela.
3268 (_bfd_elf_link_output_relocs): Likewise.
3269 * elf-bfd.h (struct elf_size_info): Rename file_align to
3270 log_file_align.
3271 (struct elf_info_failed): Move from elflink.h.
3272 (struct elf_assign_sym_version_info): Likewise.
3273 (struct elf_find_verdep_info): Likewise.
3274 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3275 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3276 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3277 _bfd_elf_link_assign_sym_version,
3278 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3279 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3280 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3281 _bfd_elf_link_sec_merge_syms): Declare.
3282 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3283 (_bfd_elf32_link_read_relocs): Likewise.
3284 (bfd_elf64_link_create_dynamic_sections): Likewise.
3285 (_bfd_elf64_link_read_relocs): Likewise.
3286 * elflink.h: Move lots o' stuff elsewhere.
3287 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3288 (bfd_elf64_record_link_assignment): Likewise.
3289 (bfd_elf_record_link_assignment): Declare.
3290 * bfd-in2.h: Regenerate.
3291 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3292 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3293 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3294 (assign_file_positions_for_segments): Likewise.
3295 (assign_file_positions_except_relocs): Likewise.
3296 (swap_out_syms, elfcore_write_note): Likewise.
3297 * elf-m10200.c: Adjust for changed function names.
3298 * elf-m10300.c: Likewise.
3299 * elf32-arm.h: Likewise.
3300 * elf32-h8300.c: Likewise.
3301 * elf32-hppa.c: Likewise.
3302 * elf32-ip2k.c: Likewise.
3303 * elf32-m32r.c: Likewise.
3304 * elf32-m68hc11.c: Likewise.
3305 * elf32-m68hc1x.c: Likewise.
3306 * elf32-m68k.c: Likewise.
3307 * elf32-mips.c: Likewise.
3308 * elf32-ppc.c: Likewise.
3309 * elf32-sh.c: Likewise.
3310 * elf32-v850.c: Likewise.
3311 * elf32-xtensa.c: Likewise.
3312 * elf64-alpha.c: Likewise.
3313 * elf64-hppa.c: Likewise.
3314 * elf64-mmix.c: Likewise.
3315 * elf64-ppc.c: Likewise.
3316 * elf64-sh64.c: Likewise.
3317 * elfxx-ia64.c: Likewise.
3318 * elfxx-mips.c: Likewise.
3319 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3320 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3321 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3322 * elf64-mips.c (mips_elf64_size_info): Likewise.
3323 * elf64-s390.c (s390_elf64_size_info): Likewise.
3324 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3325
3326 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3327
3328 * elflink.h (elf_add_default_symbol): After skipping the
3329 unversioned symbol, go to non-default one.
3330
3331 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3332
3333 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3334 want_plt field.
3335 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3336 for symbols with non-default visibility.
3337
3338 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3339
3340 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3341 case that a DSO references a hidden symbol which may be
3342 satisfied by a versioned symbol in another DSO.
3343 (elf_link_output_extsym): Check versioned definition for hidden
3344 symbol referenced by a DSO.
3345
3346 2003-05-07 Nick Clifton <nickc@redhat.com>
3347
3348 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3349 R_XSTORMY16_16 reloc to ignore overflows.
3350
3351 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3352
3353 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3354 error message for mixing different-endian files. Check for ABI
3355 compatibility of input files with the selected emulation.
3356
3357 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3358
3359 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3360 non-default visibility, a) don't make them dynamic, b) discard
3361 space for dynamic relocs.
3362 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3363
3364 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3365 non-default visibility, a) don't allocate plt entries, b) don't
3366 allocate .got relocs, c) discard dyn rel space,
3367 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3368 don't generate dynamic relocs.
3369 * elf64-ppc.c (allocate_dynrelocs): As above.
3370 (ppc64_elf_relocate_section): As above.
3371
3372 2003-05-05 Andreas Jaeger <aj@suse.de>
3373
3374 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3375 relocation entries for weak undefined symbols with non-default
3376 visibility.
3377 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3378 skip R_386_32/R_386_PC32 for weak undefined symbols with
3379 non-default visibility.
3380
3381 2003-05-04 H.J. Lu <hjl@gnu.org>
3382
3383 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3384 relocation entries for weak undefined symbols with non-default
3385 visibility.
3386 (elf_i386_relocate_section): Initialize the GOT entries and
3387 skip R_386_32/R_386_PC32 for weak undefined symbols with
3388 non-default visibility.
3389
3390 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3391 descriptors for weak undefined symbols with non-default
3392 visibility.
3393 (allocate_dynrel_entries): Don't allocate relocation entries
3394 for symbols resolved to 0.
3395 (set_got_entry): Don't install dynamic relocation for weak
3396 undefined symbols with non-default visibility.
3397 (set_pltoff_entry): Likewise.
3398
3399 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3400 with non-default visibility.
3401 (elf_link_output_extsym): Don't make weak undefined symbols
3402 with non-default visibility dynamic.
3403
3404 2003-05-04 H.J. Lu <hjl@gnu.org>
3405
3406 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3407
3408 2003-05-04 H.J. Lu <hjl@gnu.org>
3409
3410 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3411 symbol dynamic. Check indirection when removing the old
3412 definition for symbols with non-default visibility.
3413 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3414
3415 2003-05-02 Nick Clifton <nickc@redhat.com>
3416
3417 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3418 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3419 unsigned overflow.
3420
3421 2003-05-02 Andreas Jaeger <aj@suse.de>
3422
3423 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3424 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3425 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3426 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3427 ELF_LINK_NON_GOT_REF from weakdef.
3428
3429 2003-05-02 Charles Lepple <clepple@ghz.cc>
3430 Nick Clifton <nickc@redhat.com>
3431
3432 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3433 * aclocal.m4: Regenerate.
3434 * configure: Regenerate.
3435 * Makefile.in: Regenerate.
3436
3437 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3438
3439 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3440 weakdef sym has already been adjusted before treating it specially.
3441 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3442 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3443 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3444 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3445
3446 2003-04-28 H.J. Lu <hjl@gnu.org>
3447
3448 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3449 the relax finalize pass.
3450
3451 * section.c (struct sec): Add need_finalize_relax and remove
3452 flag11.
3453 (STD_SECTION): Update struct sec initializer.
3454 * bfd-in2.h: Regenerated.
3455
3456 2003-04-28 H.J. Lu <hjl@gnu.org>
3457
3458 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3459 to copy any information related to dynamic linking when we flip
3460 the indirection.
3461
3462 2003-04-27 H.J. Lu <hjl@gnu.org>
3463
3464 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3465 (ELF_LINK_DYNAMIC_WEAK): New.
3466
3467 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3468 a symbol should be skipped. Ignore definitions in dynamic
3469 objects for symbols with non-default visibility.
3470 (elf_add_default_symbol): Adjusted.
3471 (elf_link_add_object_symbols): Check if a symbol should be
3472 skipped. Don't merge the visibility field with the one from
3473 a dynamic object.
3474 (elf_link_check_versioned_symbol): Use undef_bfd.
3475 (elf_link_output_extsym): Warn if a forced local symbol is
3476 referenced from dynamic objects. Make non-weak undefined symbol
3477 with non-default visibility a fatal error.
3478
3479 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3480
3481 * configure.in: Bump version on HEAD to 2.14.90.
3482 * configure: Regenerated.
3483
3484 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3485
3486 PR savannah/3331:
3487 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3488 when we couldn't relax something.
3489
3490 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3491
3492 * elflink.h (elf_merge_symbol): When we find a regular definition
3493 for an indirect symbol, flip the indirection so that the old
3494 direct symbol now points to the new definition.
3495
3496 2003-04-24 Roland McGrath <roland@redhat.com>
3497
3498 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3499
3500 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3501
3502 * elf32-ppc.c: Formatting and comment fixes.
3503 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3504 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3505
3506 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3507
3508 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3509 * bfd-in2.h: Rebuilt.
3510 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3511 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3512 & H8300SNMAGIC.
3513 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3514 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3515 (h8300sn_info_struct, h8300hn_info_struct): New.
3516 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3517 (elf32_h8_final_write_processing): Likewise.
3518
3519 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3520
3521 * elf32-sh.c (tpoff): New.
3522 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3523 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3524 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3525 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3526 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3527 (dtpoff_base): Fix wrong indentation.
3528 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3529 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3530 R_SH_TLS_TPOFF32 relocations.
3531
3532 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3533
3534 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3535 * cpu-sh.c: Likewise.
3536 * elf32-sh.c: Likewise.
3537 * reloc.c (bfd_reloc_code_real): Likewise.
3538 * elf32-sh64-com.c: Change comment to refer to SuperH.
3539 * elf32-sh64.c: Likewise.
3540 * elf64-sh64.c: Likewise.
3541 * bfd-in2.h (enum bfd_architecture): Regenerate.
3542
3543 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3544
3545 From Julien LEMOINE <speedblue@debian.org>
3546 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3547 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3548
3549 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3550
3551 * archures.c: Replace references to Mitsubishi M32R with references
3552 to Renesas M32R.
3553 * relocs.c: Likewise.
3554 * bfd-in2.h: Regenerate.
3555
3556 2003-04-21 Richard Henderson <rth@redhat.com>
3557
3558 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3559 executable when a symbol is defined both regular and dynamic.
3560
3561 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3562
3563 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3564 (elf32-m68hc1x.lo): Update dependencies
3565 * configure.in: Add elf32-m68hc1x.lo.
3566 * configure: Rebuild.
3567 * Makefile.in: Rebuild.
3568
3569 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3570
3571 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3572 (m68hc11_elf_hash_table_create): New function.
3573 (elf32_m68hc11_link_hash_table_free): New function.
3574 (stub_hash_newfunc): New function.
3575 (m68hc11_add_stub): New function.
3576 (elf32_m68hc11_add_symbol_hook): New function.
3577 (elf32_m68hc11_setup_section_lists): New function.
3578 (elf32_m68hc11_next_input_section): New function.
3579 (elf32_m68hc11_size_stubs): New function.
3580 (elf32_m68hc11_build_stubs): New function.
3581 (m68hc11_get_relocation_value): New function.
3582 (elf32_m68hc11_relocate_section): Call the above to redirect
3583 some relocations to the trampoline code.
3584 (m68hc11_elf_export_one_stub): New function.
3585 (m68hc11_elf_set_symbol): New function.
3586 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3587 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3588 is not yet initialized.
3589
3590 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3591 (elf32_m68hc11_stub_hash_entry): New struct.
3592 (m68hc11_page_info): Add trampoline handler address.
3593 (m68hc11_elf_link_hash_table): Add stubs generation members.
3594 (elf32_m68hc11_add_symbol_hook): Declare.
3595 (elf32_m68hc11_setup_section_lists): Declare.
3596 (elf32_m68hc11_size_stubs): Declare.
3597 (elf32_m68hc11_build_stubs): Declare.
3598
3599 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3600 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3601 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3602 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3603 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3604 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3605 (bfd_elf32_bfd_link_hash_table_create): Define.
3606 (elf_backend_add_symbol_hook): Define.
3607 (m68hc11_elf_bfd_link_hash_table_create): New function.
3608 (m68hc11_elf_build_one_stub): New function.
3609 (m68hc11_elf_size_one_stub): New function.
3610 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3611 (bfd_elf32_bfd_link_hash_table_create): Define.
3612
3613 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3614 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3615 (m68hc12_phys_addr): Ditto.
3616 (m68hc12_phys_page): Ditto.
3617 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3618 (elf32_m68hc11_gc_mark_hook): Likewise.
3619 (elf32_m68hc11_gc_sweep_hook): Likewise.
3620 (elf32_m68hc11_check_relocs): Likewise.
3621 (elf32_m68hc11_relocate_section): Likewise.
3622 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3623 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3624 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3625 (m68hc12_elf_build_one_stub): New function.
3626 (m68hc12_elf_size_one_stub): New function.
3627 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3628 (elf_backend_add_symbol_hook): Define.
3629 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3630
3631 2003-04-18 Nick Clifton <nickc@redhat.com>
3632
3633 * format.c (bfd_check_format_matches): Only check associated
3634 vector if the matching_vector has been created.
3635
3636 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3637
3638 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3639 2003-04-09's change.
3640
3641 2003-04-15 Brian Ford <ford@vss.fsi.com>
3642
3643 * peicode.h (coff_swap_scnhdr_in): If a section holds
3644 uninitialized data and is from an object file or from an
3645 executable image that has not initialized the s_size field, or if
3646 the physical size is padded, use the virtual size (stored in
3647 s_paddr) instead.
3648
3649 2003-04-15 H.J. Lu <hjl@gnu.org>
3650
3651 * elflink.h (elf_link_add_object_symbols): Properly report
3652 filename for alignment reduction.
3653
3654 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3655
3656 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3657 * reloc.c: Likewise.
3658 * coff-h8300.c: Likewise.
3659 * coff-h8500.c: Likewise.
3660 * coff-sh.c: Likewise.
3661 * cpu-h8300.c: Likewise.
3662 * cpu-sh.c: Likewise.
3663 * elf32-h8300.c: Likewise.
3664 * elf32-sh.c: Likewise.
3665 * elf32-sh64-com.c: Likewise.
3666 * elf32-sh64.c: Likewise.
3667 * elf64-sh64.c: Likewise.
3668 * bfd-in2.h: Regenerate.
3669
3670 2003-04-14 H.J. Lu <hjl@gnu.org>
3671
3672 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3673 alignment for common symbols. Warn reducing alignment for
3674 common symbols. Report old filename when symbol size changes.
3675
3676 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3677
3678 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3679 occurrences of the same test changed in the previous patch.
3680 Optimize.
3681
3682 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3683
3684 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3685 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3686 GOT_DISP/addend only if the symbol got a global GOT entry.
3687
3688 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3689
3690 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3691 GOT_PAGE/GOT_OFST referencing overridable symbol to
3692 GOT_DISP/addend.
3693 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3694 global symbol as GOT_DISP.
3695
3696 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3697
3698 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3699 next relocation on an undefined symbol.
3700
3701 2003-04-09 Richard Henderson <rth@redhat.com>
3702
3703 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3704 Ignore relocations against r_symndx == 0.
3705
3706 2003-04-09 H.J. Lu <hjl@gnu.org>
3707
3708 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3709 FALSE for undefined symbols.
3710 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3711
3712 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3713
3714 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3715 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3716 addr_size.
3717
3718 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3719
3720 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3721 pointer size from ABI, not arch_bits_per_address.
3722
3723 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3724
3725 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3726 constants for n32 ABI.
3727
3728 2003-04-06 Andrew Cagney <cagney@redhat.com>
3729
3730 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3731 free that leads to GDB vs BFD memory corruption.
3732
3733 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3734
3735 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3736 symbols that mark the end of the section.
3737 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3738 converting to a relative branch so that the offset is computed after
3739 the relaxation; also relocate a jsr into a bsr if possible but don't
3740 relax them if they are to a far symbol as we need to call the
3741 trampoline code.
3742 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3743
3744 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3745
3746 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3747 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3748 * bfd-in2.h: Regenerate
3749 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3750 * cpu-tic4x.c: Ditto
3751
3752 2003-04-03 Nick Clifton <nickc@redhat.com>
3753
3754 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3755 differently for object files and executables.
3756 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3757 for object files or for executables who have not already
3758 initialised the field.
3759 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3760 the PE format bfd is an executable.
3761
3762 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3763
3764 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3765 here as it's too early to reliably determine locality.
3766 (ppc_elf_gc_sweep_hook): Likewise.
3767 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3768
3769 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3770
3771 * xtensa-modules.c: Remove comment indicating that this is a
3772 generated file.
3773
3774 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3775
3776 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3777
3778 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3779
3780 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3781 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3782 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3783 xtensa-modules.lo.
3784 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3785 xtensa-modules.c.
3786 (cpu-xtensa.lo): New target.
3787 (elf32-xtensa.lo): Likewise.
3788 (xtensa-isa.lo): Likewise.
3789 (xtensa-modules.lo): Likewise.
3790 * Makefile.in: Regenerate.
3791 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3792 (bfd_archures_list): Add bfd_xtensa_arch.
3793 * config.bfd: Handle xtensa-*-*.
3794 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3795 * configure: Regenerate.
3796 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3797 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3798 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3799 (bfd_elf32_xtensa_le_vec): Likewise.
3800 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3801 * cpu-xtensa.c: New file.
3802 * elf32-xtensa.c: Likewise.
3803 * xtensa-isa.c: Likewise.
3804 * xtensa-modules.c: Likewise.
3805 * libbfd.h: Regenerate.
3806 * bfd-in2.h: Likewise.
3807
3808 2003-04-01 Nick Clifton <nickc@redhat.com>
3809
3810 * archures.c (bfd_mach_arm_unknown): Define.
3811 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3812 bfd_arm_get_mach_from_notes): Prototype.
3813 * bfd-in2.h: Regenerate.
3814 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3815 bfd_arm_merge_machines.
3816 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3817 * coffcode.h (coff_set_arch_mach_hook): Call
3818 bfd_arm_get_mach_from_notes.
3819 * coffgen.c (coff_real_object_p): Revert previous delta.
3820 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3821 .note section.
3822 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3823 binaries compiled for different architectures..
3824 (bfd_arm_update_notes): New function: Update an ARM note section.
3825 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3826 number from an ARM note section.
3827 * elf32-arm.h (elf32_arm_object_p): Use
3828 bfd_arm_get_mach_from_notes.
3829 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3830 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3831
3832 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3833
3834 * dwarf2.c (read_attribute_value): Correct typo in comment.
3835
3836 2003-04-01 Nick Clifton <nickc@redhat.com>
3837
3838 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3839 instead of concat().
3840 (decode_line_info): Only free filename if it is not NULL.
3841 (add_line_info): Make a copy of the filename when storing it into
3842 the info structure.
3843
3844 2003-03-31 Andreas Schwab <schwab@suse.de>
3845 Daniel Jacobowitz <drow@mvista.com>
3846
3847 * simple.c (bfd_simple_get_relocated_section_contents): Add
3848 parameter symbol_table. Optionally use it instead of the symbol
3849 table from the bfd. Save and restore output offsets and output
3850 sections around bfd_get_relocated_section_contents. Fix a memory
3851 leak.
3852 (simple_save_output_info, simple_restore_output_info): New
3853 functions.
3854 * bfd-in2.h: Regenerate.
3855 * dwarf2.c (read_abbrevs): Use
3856 bfd_simple_get_relocated_section_contents instead of
3857 bfd_get_section_contents.
3858 (decode_line_info): Likewise.
3859 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3860 find_rela_addend.
3861 (find_rela_addend): Remove.
3862 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3863 debugging sections.
3864 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3865 not bfd_zalloc.
3866
3867 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3868
3869 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3870 bfd_alloc.
3871 * dwarf2.c (concat_filename): Always allocate space for the
3872 returned filename.
3873 (decode_line_info): Free the allocated filename returned by
3874 concat_filename.
3875 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3876 * elf.c (copy_private_bfd_data): Likewise.
3877 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3878 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3879 * format.c (bfd_check_format_matches): Likewise.
3880 * linker.c (bfd_generic_final_link): Likewise.
3881 * opncls.c (find_separate_debug_info): Likewise.
3882 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3883
3884 2003-03-28 H.J. Lu <hjl@gnu.org>
3885
3886 * elflink.h (elf_link_add_object_symbols): Correctly combine
3887 visibilities.
3888
3889 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3890
3891 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3892 to -1 before recomputing got offsets.
3893
3894 2003-03-26 Andreas Schwab <schwab@suse.de>
3895
3896 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3897 (elf_m68k_relocate_section): Use it to correctly handle symbols
3898 forced to be local.
3899 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3900 entries for symbols that are forced to be local.
3901
3902 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3903
3904 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3905 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3906 * elfn32-mips.c, elf64-mips.c: Use it.
3907
3908 2003-03-25 Stan Cox <scox@redhat.com>
3909 Nick Clifton <nickc@redhat.com>
3910
3911 Contribute support for Intel's iWMMXt chip - an ARM variant:
3912
3913 * archures.c: Add bfd_mach_arm_iWMMXt.
3914 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3915 * bfd-in2.h: Regenerate.
3916 * libbfd.h: Regenerate.
3917 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3918 object files to be linked with XScale ones.
3919 (coff_arm_final_link_postscript): Update note section.
3920 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3921 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3922 after identifying a coff binary.
3923 * cpu-arm.c (processors): Add iWMMXt.
3924 (arch_inf): Likewise.
3925 * elf32-arm.h (arm_object_p): Handle note section.
3926 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3927 be linked with XScale ones.
3928 (elf32_arm_section_flags): New function: Set flags on note section.
3929 (elf32_arm_final_write_processing): Handle note section.
3930
3931 2003-03-21 DJ Delorie <dj@redhat.com>
3932
3933 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3934 _bfd_elf_rela_local_sym.
3935
3936 2003-03-20 H.J. Lu <hjl@gnu.org>
3937
3938 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3939 non-ELF outputs.
3940
3941 2003-03-20 Nick Clifton <nickc@redhat.com>
3942
3943 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3944 $idata5 in case bfd_coff_final_link is not called.
3945
3946 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3947
3948 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3949 field.
3950 (canon_reloc_count): Define.
3951 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3952 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3953 reloc_count.
3954 (sparc64_elf_canonicalize_reloc): New routine.
3955 (bfd_elf64_canonicalize_reloc): Define.
3956
3957 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3958
3959 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3960 againt mergeable sections. Take r_addend into account when caching
3961 trampolines.
3962
3963 2003-03-18 Richard Henderson <rth@redhat.com>
3964
3965 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3966 local symbols that have no dyninfo.
3967
3968 2003-03-14 Gene Smith <gene.smith@siemens.com>
3969
3970 * ieee.c (ieee_write_expression): Handle the case where symbol is
3971 NULL.
3972 General formatting improvements.
3973
3974 2003-03-13 Nick Clifton <nickc@redhat.com>
3975
3976 * configure.in (LINGUAS): Add zh_CN.
3977 * configure: Regenerate.
3978 * po/zh_CN.po: New file.
3979
3980 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3981
3982 * aout-cris.c (BYTES_IN_WORD): Don't define.
3983 aout-encap.c: Likewise.
3984 aout-ns32k.c: Likewise.
3985 aout-tic30.c: Likewise.
3986 hp300bsd.c: Likewise.
3987 i386aout.c: Likewise.
3988 i386dynix.c: Likewise.
3989 i386linux.c: Likewise.
3990 i386lynx.c: Likewise.
3991 i386mach3.c: Likewise.
3992 m68k4knetbsd.c: Likewise.
3993 m68klinux.c: Likewise.
3994 m68klynx.c: Likewise.
3995 m68knetbsd.c: Likewise.
3996 m88kmach3.c: Likewise.
3997 mipsbsd.c: Likewise.
3998 newsos3.c: Likewise.
3999 sparclinux.c: Likewise.
4000 sparclynx.c: Likewise.
4001 sparcnetbsd.c: Likewise.
4002 vaxbsd.c: Likewise. Fix comment formatting.
4003
4004 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4005
4006 * Reverted 2003-03-02's patch.
4007
4008 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
4009 overridable.
4010 * elf64-mips.c (mips_elf64_canonicalize_reloc,
4011 mips_elf64_get_dynamic_reloc_upper_bound,
4012 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
4013 (bfd_elf64_get_canonicalize_reloc,
4014 bfd_elf64_get_dynamic_reloc_upper_bound,
4015 bfd_elf64_canonicalize_dynamic_reloc): Define.
4016 (mips_elf64_slurp_reloc_table): Support dynamic.
4017 (mips_elf64_slurp_one_reloc_table): Adjust.
4018
4019 2003-03-12 Nick Clifton <nickc@redhat.com>
4020
4021 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
4022 'index' to 'offset' in test for zero value.
4023
4024 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
4025
4026 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
4027 dynamic relocations pointing to local or section symbols, use the
4028 NULL symbol instead. Document the choice to not emit an
4029 additional R_MIPS_64 relocation.
4030
4031 2003-03-11 Alan Modra <amodra@bigpond.net.au>
4032
4033 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
4034 zero index dynamic tls relocs generated for the GOT. Tidy code.
4035 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
4036 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4037
4038 2003-03-07 Alan Modra <amodra@bigpond.net.au>
4039
4040 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
4041 a tls_get_addr call.
4042
4043 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
4044 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
4045 ELF_LINK_NON_GOT_REF from weakdef.
4046 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
4047 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
4048 ELF_LINK_NON_GOT_REF from weakdef.
4049 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
4050 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
4051 ELF_LINK_NON_GOT_REF from weakdef.
4052
4053 2003-03-06 Jakub Jelinek <jakub@redhat.com>
4054 Andrew Haley <aph@redhat.com>
4055
4056 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
4057 output is relocateable.
4058
4059 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
4060
4061 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
4062 R_COMMENT.
4063
4064 2003-03-06 Alan Modra <amodra@bigpond.net.au>
4065
4066 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
4067 error messages.
4068 (ELIMINATE_COPY_RELOCS): Define to zero.
4069 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
4070 TLSLD relocs. Report reloc types on a number of errors. Optimize
4071 LOCAL24PC check for non-local syms. Don't capitalize error messages.
4072 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
4073 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
4074 calculating TLSLD relocs. Report reloc types on a number of errors.
4075 Don't capitalize error messages.
4076
4077 2003-03-03 H.J. Lu <hjl@gnu.org>
4078
4079 * elfxx-ia64.c (USE_BRL): Removed.
4080 (oor_ip): Removed.
4081
4082 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
4083
4084 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
4085 relocation (no special function), and make it non-partial_inplace.
4086 (sh_elf_relax_section): When creating a bsr, use a consistent value
4087 no matter if the symbol is extern or not; set addend to -4.
4088 Don't swap load / non-load instructions for SH4.
4089 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
4090 rather than if the symbol is external to determine if adjusting the
4091 offset makes sense. Adjust the addend too if appropriate.
4092 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
4093 relocation.
4094
4095 2003-03-03 Nick Clifton <nickc@redhat.com>
4096
4097 * po/da.po: Installed latest translation.
4098
4099 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4100
4101 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
4102 R_MIPS_PC16 to rightshift 2.
4103 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
4104 (bfd_elf32_bfd_reloc_type_lookup): Support
4105 BFD_RELOC_MIPSEMB_16_PCREL_S2.
4106 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
4107 R_MIPS_PC16 to rightshift 2.
4108 (mips_elf64_howto_table_rela): Likewise.
4109 (mips_reloc_map): Map to rightshifted BFD reloc.
4110 * elfn32-mips.c: The same as in elf64-mips.c.
4111 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
4112 (mips_elf_calculate_relocation): Handle rightshifted addends for
4113 R_MIPS_PC16.
4114 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
4115 MIPS Embedded PIC. Remove superfluous empty COMMENT.
4116 * libbfd.h: Regenerate.
4117 * bfd-in2.h: Regenerate.
4118
4119 2003-02-28 Richard Henderson <rth@redhat.com>
4120
4121 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4122 for ltoff22x relaxation.
4123
4124 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4125
4126 * bfd-in.h (_bfd): Don't define.
4127 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4128 * syms.c: Likewise.
4129 * bfd-in2.h: Regenerate.
4130
4131 2003-02-27 Richard Henderson <rth@redhat.com>
4132
4133 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4134 (elfNN_ia64_check_relocs): Set it.
4135 (allocate_global_data_got): Check it.
4136 (allocate_local_got): Likewise.
4137 (allocate_dynrel_entries): Likewise.
4138 (elfNN_ia64_relax_ldxmov): New.
4139 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4140 (elfNN_ia64_choose_gp): Split out from ...
4141 (elfNN_ia64_final_link): ... here.
4142
4143 2003-02-27 Andrew Cagney <cagney@redhat.com>
4144
4145 * bfd.c (struct bfd): Rename "struct _bfd".
4146 * bfd-in.h: Update copyright.
4147 (struct bfd): Rename "struct _bfd".
4148 (_bfd): Define for backward compatibility.
4149 * bfd-in2.h: Regenerate.
4150
4151 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4152
4153 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4154 and rel_hdr2 when initially counting input relocs rather than after
4155 creating output reloc sections.
4156 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4157 sizes.
4158
4159 * Makefile.am: Run "make dep-am".
4160 * Makefile.in: Regenerate.
4161
4162 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4163
4164 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4165 (elfcore_grog_nto_note): New function.
4166 (elfcore_grog_nto_gregs): New function.
4167 (elfcore_grog_nto_status): New function.
4168
4169 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4170
4171 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4172 section flags before concluding that we've already been called.
4173 Don't use register keyword.
4174 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4175 (_bfd_elf_create_linker_section): Formatting.
4176
4177 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4178
4179 * coff-h8300.c: Fix typo: intial -> initial.
4180 * coff-ppc.c: Likewise.
4181
4182 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4183
4184 * elf32-ppc.c: Formatting.
4185 (allocate_dynrelocs): LD and GD relocs against the same sym need
4186 separate GOT entries.
4187 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4188 entries per symbol.
4189
4190 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4191
4192 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4193 removal. Localize vars. Remove unnecessary dynobj test.
4194 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4195 of INFO.
4196 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4197 and optimize.
4198 (elf_i386_relocate_section): Likewise.
4199 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4200 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4201 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4202 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4203 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4204 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4205 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4206 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4207 Formatting.
4208
4209 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4210 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4211 test.
4212 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4213 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4214 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4215 and optimize. Use ELIMINATE_COPY_RELOCS.
4216 (ppc64_elf_relocate_section): Likewise.
4217
4218 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4219 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4220 (ELIMINATE_COPY_RELOCS): Define.
4221 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4222 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4223 (MUST_BE_DYN_RELOC): Define.
4224 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4225 and optimize. Trim dyn_relocs.
4226 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4227 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4228 track of pc_rel dyn relocs.
4229 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4230 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4231 allocate_dynrelocs. Don't recalculate "sec".
4232
4233 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4234
4235 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4236 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4237 on invalid LD relocs.
4238 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4239 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4240 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4241
4242 * elf32-ppc.h: New file.
4243 * elf32-ppc.c: Include elf32-ppc.h.
4244 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4245 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4246 Add "tls_mask" field.
4247 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4248 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4249 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4250 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4251 Make use of htab shortcuts throughout file.
4252 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4253 (ppc_elf_link_hash_table_create): Init new fields.
4254 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4255 (ppc_elf_howto_raw): Add tls relocs.
4256 (ppc_elf_reloc_type_lookup): Handle them.
4257 (ppc_elf_unhandled_reloc): New function.
4258 (ppc_elf_create_got): Stash got section pointer in hash table,
4259 return status. Make .rela.got too.
4260 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4261 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4262 NON_GOT_REF set. Don't allocate space in .plt here..
4263 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4264 not allocating plt entries unnecessarily. Allocate got entries here.
4265 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4266 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4267 "info" during allocate_dynrelocs hash traversal. Use htab section
4268 shortcuts rather than searching for named sections. Get rid of
4269 "plt" and "strip" booleans.
4270 (update_local_sym_info, bad_shared_reloc): New functions.
4271 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4272 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4273 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4274 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4275 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4276 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4277 relocs that might use a plt entry. Set NON_GOT_REF too.
4278 Enumerate all do-nothing relocs.
4279 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4280 tls relocs and all plt relocs.
4281 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4282 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4283 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4284 shortcuts.
4285 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4286 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4287 entries and got relocs here. Warn on non-zero got reloc addend.
4288 Split out branch taken/not taken reloc code into a separate switch
4289 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4290 Split out HA reloc adjustments to separate switch statement. Don't
4291 warn on reloc overflow if we've already warned about undefined.
4292 Don't rebuild sym name when reporting errors. Report all possible
4293 errors from _bfd_final_link_relocate.
4294 (bfd_elf32_bfd_final_link): Don't define.
4295
4296 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4297
4298 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4299 rebuild sym name when reporting errors.
4300
4301 2003-02-17 Nick Clifton <nickc@redhat.com>
4302
4303 * elflink.h (elf_link_output_extsym): Only check
4304 allow_shlib_undefined for shared libraries.
4305 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4306 of allow_shlib_undefined.
4307 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4308 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4309 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4310 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4311 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4312 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4313 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4314 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4315 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4316 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4317 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4318 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4319 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4320 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4321 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4322 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4323
4324 2003-02-17 Nick Clifton <nickc@redhat.com>
4325
4326 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4327 address field to use in the comparison.
4328 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4329
4330 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4331
4332 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4333 backends when checking if the generic ELF target should be used.
4334
4335 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4336 outside of functions, treat values as absolute addresses.
4337
4338 * bfd.c: Change embedded documentation to use consistent indentation
4339 and to split up long lines. Change informal style of description
4340 for functions lacking real documentation.
4341 * coffcode.h: Break up long lines in embedded documentation.
4342 * format.c: Likewise.
4343 * targets.c: Likewise.
4344 * libcoff.h: Regenerate.
4345 * bfd-in2.h: Regenerate.
4346
4347 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4348
4349 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4350 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4351 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4352 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4353 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4354 (group_sections): Don't share a stub section if stubs are for a large
4355 section. Adjust comment.
4356 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4357 !stubs_always_before_branch.
4358 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4359 treat undefined and undefweak specially when processing dyn relocs.
4360
4361 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4362
4363 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4364
4365 2003-02-13 Nick Clifton <nickc@redhat.com>
4366
4367 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4368 in computation of offset to insert into BL instruction.
4369
4370 2003-02-11 Uwe Stieber <uwe@wwws.de>
4371
4372 * config.bfd: Add support for kaOS as cross build target system.
4373
4374 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4375
4376 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4377 .__tls_get_addr too.
4378 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4379
4380 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4381
4382 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4383 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4384 (sh_elf_link_hash_newfunc): Remove the initialization of
4385 tls_tpoff32 field.
4386 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4387 for which tls_tpoff32 flag is set.
4388 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4389 of the symbol includes the entry matched with the input_section
4390 and having tls_tpoff32 flag on. When linking statically, set
4391 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4392 is defined in this executable.
4393 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4394
4395 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4396
4397 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4398 even if there is just non-empty .rela.plt.
4399
4400 2003-02-10 Nick Clifton <nickc@redhat.com>
4401
4402 * archures.c (bfd_mach_arm_ep9312): Define.
4403 * bfd-in2.h: Regenerate.
4404 * cpu-arm.c (processors[]): Add ep9312.
4405 (bfd_arm_arch): Add ep9312.
4406 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4407 messages and add test for Maverick floating point support.
4408 (elf32_arm_print_private_bfd_data): Handle
4409 EF_ARM_MAVERICK_FLOAT flag.
4410 (elf32_arm_object_p): New function.
4411 (elf_backend_object_p): Define.
4412
4413 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4414
4415 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4416 variables, structure fields or function params to tls_mask or
4417 similar to better reflect usage.
4418 (struct got_entry): Comment.
4419 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4420 (get_tls_mask): Rename from get_tls_type.
4421
4422 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4423
4424 * elf64-ppc.c (TLS_GD_LD): Don't define..
4425 (TLS_GD): ..define this instead and update all uses.
4426 (TLS_TPRELGD): Define.
4427 (ppc64_elf_link_hash_table_create): Tweak initialization of
4428 init_refcount and init_offset.
4429 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4430 Mark second slot of GD or LD toc entries.
4431 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4432 from other tls types.
4433 (ppc64_elf_tls_setup): New function, split out from..
4434 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4435 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4436 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4437 return value to properly decide whether toc GD and LD entries can
4438 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4439 to determine GD or LD rather than looking at TLS_LD flag. Don't
4440 attempt to adjust got entry tls_type here..
4441 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4442 look for possible merges.
4443 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4444 optimization.
4445 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4446 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4447 Make use of return value from get_tls_type to properly detect GD and
4448 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4449 handle tls_get_addr removal when looking at REL24 relocs, do it when
4450 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4451 GD or LD.
4452 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4453
4454 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4455
4456 * elf32-hppa.c (group_sections): Don't share a stub section if
4457 stubs are for a large section.
4458
4459 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4460 stubs if !stubs_always_before_branch.
4461
4462 2003-02-07 Nick Clifton <nickc@redhat.com>
4463
4464 * elf.c (swap_out_syms): Generate an error message if an
4465 equivalent output section cannot be found for a symbol.
4466
4467 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4468
4469 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4470 local_got_entries is NULL.
4471
4472 2003-02-06 Andreas Schwab <schwab@suse.de>
4473
4474 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4475 (read_value): Add parameter is_signed, use signed extraction if
4476 the value is signed.
4477 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4478 encoding to read_value.
4479
4480 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4481
4482 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4483 plt info when called to transfer weak sym info.
4484
4485 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4486
4487 * reloc.c: Add PPC and PPC64 TLS relocs.
4488 * libbfd.h: Regenerate.
4489 * bfd-in2.h: Regenerate.
4490 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4491 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4492 against a 32 bit field.
4493 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4494 (_ppc64_elf_section_data): Add t_symndx and comments.
4495 (ppc64_elf_section_data): Use elf_section_data macro.
4496 (ppc64_elf_new_section_hook): American spelling.
4497 (struct got_entry, struct plt_entry): New.
4498 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4499 (struct ppc_stub_hash_entry): Add "addend" field.
4500 (struct ppc_link_hash_entry): Add "tls_type".
4501 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4502 TLS_EXPLICIT): Define.
4503 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4504 (link_hash_newfunc): Init new fields.
4505 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4506 init_offset to NULL.
4507 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4508 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4509 there.
4510 (update_local_sym_info, update_plt_info): New functions.
4511 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4512 handling to use got.glist rather than got.refcount. Likewise for PLT.
4513 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4514 (func_desc_adjust): Adjust for new PLT list.
4515 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4516 (get_sym_h, get_tls_type): New functions.
4517 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4518 (ppc64_elf_tls_optimize): New function.
4519 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4520 TLS relocs.
4521 (ppc64_elf_size_dynamic_sections): Likewise.
4522 (ppc_type_of_stub): Adjust for new PLT list.
4523 (ppc_build_one_stub): Likewise.
4524 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4525 calls specially.
4526 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4527 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4528 init GOT entries that have a reloc. Generate GOT relocs here..
4529 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4530 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4531
4532 2003-02-04 Andreas Schwab <schwab@suse.de>
4533
4534 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4535 (elf_m68k_link_hash_traverse): Remove.
4536 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4537 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4538 reduce casting.
4539 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4540 casting.
4541 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4542 instead of elf_m68k_link_hash_traverse.
4543 (elf_m68k_discard_copies): Change first parameter to pointer to
4544 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4545 elf_m68k_link_hash_entry is needed.
4546
4547 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4548
4549 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4550 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4551 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4552 "plt" field.
4553 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4554 Add "init_offset" field.
4555 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4556 (elf_local_got_ents): Declare.
4557 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4558 and "plt".
4559 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4560 (_bfd_elf_link_hash_table_init): Set "init_offset".
4561 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4562 from init_offset.
4563 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4564
4565 * elf.c (bfd_elf_local_sym_name): Split out from..
4566 (group_signature): ..here.
4567 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4568
4569 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4570
4571 * elf-bfd.h (enum elf_link_info_type): Remove.
4572 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4573 to struct sec. Remove linkonce_p field.
4574 (elf_linkonce_p): Delete.
4575 (elf_discarded_section): Update for sec_info_type change.
4576 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4577 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4578 (ELF_INFO_TYPE_NONE): Define.
4579 (ELF_INFO_TYPE_STABS): Define.
4580 (ELF_INFO_TYPE_MERGE): Define.
4581 (ELF_INFO_TYPE_EH_FRAME): Define.
4582 (ELF_INFO_TYPE_JUST_SYMS): Define.
4583 (STD_SECTION): Update struct sec initializer.
4584 * ecoff.c (bfd_debug_section): Likewise.
4585 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4586 * elflink.h: Likewise.
4587 * elf-eh-frame.c: Likewise.
4588 * elf64-alpha.c: Likewise.
4589 * elfxx-ia64.c: Likewise.
4590 * elfxx-mips.c: Likewise.
4591 * bfd-in2.h: Regenerate.
4592
4593 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4594 referring to used_by_bfd.
4595 * elf64-sparc.c (sec_do_relax): Likewise.
4596 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4597 * elfxx-mips.c (mips_elf_section_data): Likewise.
4598 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4599 (ieee_get_section_contents): Likewise.
4600 (ieee_new_section_hook): Formatting.
4601 (ieee_canonicalize_reloc): Remove commented out code.
4602 * mmo.c (mmo_section_data): Define. Use throughout file.
4603 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4604
4605 2003-01-31 Graydon Hoare <graydon@redhat.com>
4606
4607 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4608 * Makefile.in: Regenerate.
4609 * opncls.c (calc_crc32, get_debug_link_info,
4610 seperate_debug_file_exists, find_seperate_debug_file): New
4611 internal functions.
4612 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4613 contained inside a .gnu_debuglink section.
4614 * bfd-in2.h: Regenerate.
4615
4616 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4617
4618 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4619 entry->abfd when it's NULL.
4620
4621 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4622
4623 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4624 _bfd_elf_section_offset returning -2 the same way as -1.
4625
4626 * elfxx-mips.c (mips_elf_multi_got): New function.
4627 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4628 addend into union along with address and link hash entry.
4629 (struct mips_got_info): Added bfd2got and next.
4630 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4631 (mips_elf_got_section, mips_elf_create_got_section): Use
4632 SEC_EXCLUDE bit to tell whether we really need the got
4633 section. Take boolean arguments to disregard an excluded
4634 section, or to create it as excluded. Adjust all callers.
4635 Use mips_elf_got_section all over.
4636 (mips_elf_local_got_index, mips_elf_got_page,
4637 mips_elf_got16_entry): Take input bfd as argument, and pass it
4638 on to mips_elf_create_local_got_entry.
4639 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4640 Take input bfd as argument, and manage entries in the
4641 appropriate GOT.
4642 (mips_elf_got_offset_from_index): Take input bfd as argument,
4643 and use it to adjust the GP offset of the bfd.
4644 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4645 unreferenced GOT entries of global symbols to the end.
4646 (mips_elf_record_global_got_symbol): Take input bfd as
4647 argument. Add entries to the master GOT hash table.
4648 (struct mips_elf_bfd2got_hash): New.
4649 (struct mips_elf_got_per_bfd_arg): New.
4650 (struct mips_elf_set_global_got_offset_arg): New.
4651 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4652 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4653 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4654 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4655 mips_elf_resolve_final_got_entry,
4656 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4657 mips_elf_got_for_ibfd): New functions.
4658 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4659 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4660 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4661 (mips_elf_got_entry_hash): Take new fields into account. Use
4662 mips_elf_hash_bfd_vma.
4663 (mips_elf_got_entry_eq): Take new fields into account.
4664 (mips_elf_create_got_section): Initialize new fields.
4665 (mips_elf_calculate_relocation): Pass input_bfd to functions
4666 that now take it. Adjust gp for the input_bfd.
4667 (mips_elf_allocate_dynamic_relocation,
4668 mips_elf_create_dynamic_relocation,
4669 _bfd_mips_elf_create_dynamic_sections): Use...
4670 (mips_elf_rel_dyn_section): New function. Borrow code from...
4671 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4672 now take it. Create the got section if needed, even if
4673 excluded, before recording a global got symbol. Move some
4674 code to...
4675 (mips_elf_record_local_got_symbol): New fn.
4676 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4677 Compute multi-got global entries offsets. Move GOT code to...
4678 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4679 if the GOT is too big.
4680 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4681 undefweak symbol to zero. Generate dynamic relocations for
4682 non-primary GOT entries for global symbols.
4683 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4684 case. Generate dynamic relocations for local got entries.
4685 Sort dynamic relocations on N64 too, using...
4686 (sort_dynamic_relocs_64): New fns.
4687 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4688 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4689
4690 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4691
4692 * bfd.c (struct _bfd): Added id field.
4693 * opncls.c (_bfd_id_counter): New static variable.
4694 (_bfd_new_bfd): Use it.
4695 * bfd-in2.h: Rebuilt.
4696
4697 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4698
4699 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4700
4701 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4702
4703 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4704 (elf32_sparc_rev32_howto): New variable.
4705 (sparc_reloc_map): Add TLS relocs.
4706 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4707 Handle REV32.
4708 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4709 New functions.
4710 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4711 struct elf32_sparc_link_hash_table):
4712 New structures.
4713 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4714 elf32_sparc_hash_table): Define.
4715 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4716 create_got_section, elf32_sparc_create_dynamic_sections,
4717 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4718 functions.
4719 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4720 reference counting.
4721 (elf32_sparc_gc_sweep_hook): Likewise.
4722 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4723 (elf32_sparc_size_dynamic_sections): Likewise.
4724 (elf32_sparc_relocate_section): Likewise.
4725 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4726 New functions.
4727 (elf32_sparc_object_p): Allocate backend private object data.
4728 (bfd_elf32_bfd_link_hash_table_create,
4729 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4730 elf_backend_can_refcount): Define.
4731 (elf_backend_create_dynamic_sections): Define to
4732 elf32_sparc_create_dynamic_sections.
4733 * reloc.c: Add SPARC TLS relocs.
4734 * bfd-in2.h, libbfd.h: Rebuilt.
4735 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4736 (sparc_reloc_map): Likewise.
4737
4738 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4739
4740 * bfd-in2.h: Regenerate.
4741 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4742 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4743 (elf_howto_table): Add TLS relocs.
4744 (elf_s390_reloc_type_lookup): Likewise.
4745 (elf_s390_link_hash_entry): Add tls_type.
4746 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4747 New macros.
4748 (elf_s390_link_hash_table): Add tls_ldm_got.
4749 (link_hash_newfunc): Initialize tls_type.
4750 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4751 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4752 (elf_s390_check_relocs): Support TLS relocs.
4753 (elf_s390_gc_sweep_hook): Likewise.
4754 (allocate_dynrelocs): Likewise.
4755 (elf_s390_size_dynamic_sections): Likewise.
4756 (elf_s390_relocate_section): Likewise.
4757 (elf_s390_finish_dynamic_symbol): Likewise.
4758 (bfd_elf32_mkobject): Define for TLS.
4759 * elf64-s390.c: Same changes as for elf32-s390.c.
4760 * libbfd.h: Regenerate.
4761 * reloc.c: Add s390 TLS relocations.
4762
4763 2003-01-24 Charles Lepple <clepple@ghz.cc>
4764
4765 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4766
4767 2003-01-23 Nick Clifton <nickc@redhat.com>
4768
4769 * Add sh2e support:
4770 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4771 * archures.c (bfd_mach_sh2e): Added.
4772 * bfd-in2.h: Rebuilt.
4773 * cpu-sh.c (arch_info_struct): Added SH2e.
4774 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4775
4776 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4777
4778 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4779 dynindx to an int. Rearrange for better packing.
4780 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4781 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4782 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4783 (struct _sh64_elf_section_data): New struct.
4784 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4785 * elf32-sh64-com.c: Include elf32-sh64.h.
4786 * elf32-sh64.c: Likewise.
4787 (sh64_elf_new_section_hook): New function.
4788 (bfd_elf32_new_section_hook): Define.
4789 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4790 (sh64_bfd_elf_copy_private_section_data): Likewise.
4791 (sh64_elf_final_write_processing): Likewise.
4792 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4793 (elf32_sparc_new_section_hook): New function.
4794 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4795 (sec_do_relax): Define.
4796 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4797 (elf32_sparc_relocate_section): Likewise.
4798 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4799 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4800 (mmix_elf_section_data): Define. Use throughout file.
4801 (mmix_elf_new_section_hook): New function.
4802 (bfd_elf64_new_section_hook): Define.
4803 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4804 (ppc64_elf_section_data): Define. Use throughout.
4805 (ppc64_elf_new_section_hook): New function.
4806 (bfd_elf64_new_section_hook): Define.
4807 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4808 (sparc64_elf_new_section_hook): New function.
4809 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4810 (sec_do_relax): Define.
4811 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4812 (sparc64_elf_relocate_section): Likewise.
4813 (bfd_elf64_new_section_hook): Define.
4814 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4815 * elfxx-mips.c (struct _mips_elf_section_data): New.
4816 (mips_elf_section_data): Define. Use throughout.
4817 (_bfd_mips_elf_new_section_hook): New function.
4818 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4819 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4820 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4821 * Makefile.am: Run "make dep-am".
4822 * Makefile.in: Regenerate.
4823
4824 2003-01-21 Richard Henderson <rth@redhat.com>
4825
4826 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4827 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4828 (elf64_alpha_adjust_dynamic_symbol): Set them.
4829 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4830 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4831 symbol index when relaxing LDM to TPREL.
4832 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4833 relocs, even if the target isn't locally defined.
4834 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4835 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4836 relocs vs symndx 0 to the tp base.
4837
4838 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4839
4840 * config.bfd: Handle i[3456]86-*-aros*.
4841
4842 2003-01-21 Andreas Schwab <schwab@suse.de>
4843
4844 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4845 (struct ppc_elf_link_hash_entry): Define.
4846 (ppc_elf_hash_entry): New function.
4847 (struct ppc_elf_link_hash_table): Define.
4848 (ppc_elf_hash_table): New function.
4849 (ppc_elf_link_hash_newfunc): New function.
4850 (ppc_elf_link_hash_table_create): New function.
4851 (ppc_elf_copy_indirect_symbol): New function.
4852 (allocate_dynrelocs): New function.
4853 (readonly_dynrelocs): New function.
4854 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4855 relocs and determine DT_TEXTREL.
4856 (ppc_elf_check_relocs): Don't do that here, just count the
4857 dynamic relocs.
4858 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4859 removed section.
4860 (bfd_elf32_bfd_link_hash_table_create): Define.
4861 (elf_backend_copy_indirect_symbol): Define.
4862
4863 2003-01-21 Richard Henderson <rth@redhat.com>
4864
4865 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4866 TPREL also get a reloc if shared. Remove SREL support.
4867 (elf64_alpha_emit_dynrel): New.
4868 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4869 and GOTTPREL relocs to local symbols against the tp base.
4870 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4871
4872 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4873 use count before clobbering r_type.
4874 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4875 ordering would mean dataflow inspection is necessary.
4876
4877 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4878
4879 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4880
4881 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4882
4883 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4884 elfxx-target.h and #undef it before #define'ing it.
4885 * elf32-i386.c: Likewise.
4886 * elf32-sh64.c: Likewise.
4887 * elf64-alpha.c: Likewise.
4888 * elf64-sh64.c: Likewise.
4889
4890 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4891
4892 * bfd-in2.h: Regenerate.
4893 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4894 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4895 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4896 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4897 R_390_PLTOFF32 and R_390_PLTOFF64.
4898 (elf_s390_reloc_type_lookup): Likewise.
4899 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4900 of GOTPLT references to a function.
4901 (link_hash_newfunc): Initialize gotplt_refcount.
4902 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4903 and creation of the got section out of the main switch. Add support
4904 for the gotoff, gotplt and pltoff relocations.
4905 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4906 and pltoff.
4907 (elf_s390_adjust_gotplt): New function.
4908 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4909 plt entries.
4910 (allocate_dynrelocs): Add comment.
4911 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4912 for gotoff, gotplt and pltoff relocations.
4913 * elf64-s390.c: Same changes as for elf32-s390.c.
4914 * libbfd.h: Regenerate.
4915 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4916 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4917 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4918 and BFD_RELOC_390_PLTOFF64.
4919
4920 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4921
4922 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4923 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4924
4925 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4926
4927 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4928 self_dtpmod_done and self_dtpmod_offset.
4929 (allocate_global_data_got): Only use one got entry for all
4930 dtpmod relocs against local symbols.
4931 (allocate_dynrel_entries): Only need .rela.got entry for
4932 dtpmod against global symbol.
4933 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4934 Reserve space in .rela.got for the local dtpmod entry.
4935 (set_got_entry): Initialize the common local dtpmod .got entry.
4936 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4937 and R_IA_64_DTPREL64MSB.
4938
4939 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4940
4941 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4942 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4943 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4944 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4945 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4946 relative relocs, not with absolute ones.
4947 * Makefile.am: Run "make dep-am".
4948 * Makefile.in: Regenerate.
4949 * po/SRC-POTFILES.in: Regenerate.
4950
4951 2003-01-15 Andreas Schwab <schwab@suse.de>
4952
4953 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4954 relocation against a non-allocated readonly section.
4955
4956 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4957
4958 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4959 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4960
4961 2002-01-08 Klee Dienes <kdienes@apple.com>
4962
4963 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4964 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4965 * Makefile.in: Regenerate.
4966
4967 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4968
4969 * elfn32-mips.c (prev_reloc_section): New.
4970 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4971 (SET_RELOC_ADDEND): Parenthesize macro argument.
4972
4973 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4974
4975 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4976 adjust addil instructions if the symbol has no section.
4977
4978 2003-01-07 DJ Delorie <dj@redhat.com>
4979
4980 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4981 partial_inplace.
4982
4983 2003-01-07 Andreas Schwab <schwab@suse.de>
4984
4985 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4986 PC relative relocations.
4987 (elf_m68k_discard_copies): Set it here instead.
4988
4989 2002-01-02 Ben Elliston <bje@redhat.com>
4990 Jeff Johnston <jjohnstn@redhat.com>
4991
4992 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4993 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4994 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4995 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4996 (cpu-iq2000.lo): New target.
4997 * Makefile.in: Regenerate.
4998 * config.bfd: Handle iq2000-*-elf.
4999 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
5000 (bfd_archures_list): Add bfd_iq2000_arch.
5001 * configure.in: Handle bfd_elf32_iq2000_vec.
5002 * configure: Regenerate.
5003 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
5004 and BFD_RELOC_IQ2000_UHI16.
5005 * targets.c (bfd_elf32_iq2000_vec): Declare.
5006 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
5007 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
5008 * cpu-iq2000.c: New file.
5009 * elf32-iq2000.c: Likewise.
5010 * libbfd.h: Regenerate.
5011 * bfd-in2.h: Likewise.
5012
5013 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
5014
5015 * elfxx-mips.c: Include libiberty.h.
5016 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
5017 (mips_set_isa_flags): New function, split out from...
5018 (_bfd_mips_elf_final_write_processing): ...here. Only call
5019 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
5020 (mips_mach_extensions): New array.
5021 (mips_32bit_flags_p): New function.
5022 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
5023 Use mips_32bit_flags_p to check if one binary is 32-bit and the
5024 other is 64-bit. When adopting IBFD's architecture, adopt the
5025 bfd_mach as well as the flags.
5026
5027 2003-01-02 Nick Kelsey <nickk@ubicom.com>
5028
5029 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
5030 fix internal errors, fix bad code generation, fix incorrect stabs
5031 information, and improve ability to eliminate redundant page
5032 instructions. Added code to ip2k_final_link_relocate to self-verify
5033 the linker relaxation. Fix formatting problems.
5034
5035 2002-12-30 Chris Demetriou <cgd@broadcom.com>
5036
5037 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
5038 * archures.c (bfd_mach_mipsisa32r2): New define.
5039 * bfd-in2.h: Regenerate.
5040 * cpu-mips.c (I_mipsisa32r2): New enum value.
5041 (arch_info_struct): Add entry for I_mipsisa32r2.
5042 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
5043 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
5044 (_bfd_mips_elf_final_write_processing): Add
5045 bfd_mach_mipsisa32r2 case.
5046 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
5047 binaries marked as using MIPS32 Release 2.
5048
5049 2002-12-30 Dmitry Diky <diwil@mail.ru>
5050
5051 * Makefile.am: Add msp430 target.
5052 * configure.in: Likewise.
5053 * Makefile.in: Regenerate.
5054 * configure: Regenerate.
5055 * archures.c: Add msp430 architecture vector.
5056 * config.bfd: Likewise.
5057 * reloc.c: Add msp430 relocs.
5058 * targets.c: Add msp320 target.
5059 * cpu-msp430.c: New file: msp430 cpu detection.
5060 * elf32-msp430.c: New file: msp430 reloc processing.
5061 * bfd-in2.h: Regenerate.
5062 * libbfd.h: Regenerate.
5063
5064 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5065
5066 * elf.c (elf_sort_sections): Don't reorder .tbss.
5067 (assign_file_positions_for_segments): Only adjust off/voff
5068 for increased alignment in PT_LOAD or PT_NOTE segment,
5069 but adjust p_filesz for .tbss too. in PT_LOAD consider
5070 .tbss to have zero memory size.
5071 (copy_private_bfd_data) [SECTION_SIZE]: Define.
5072 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
5073 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
5074 into PT_TLS segment. Never put SHF_TLS sections in
5075 segments other than PT_TLS or PT_LOAD.
5076
5077 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
5078 sh_entsize.
5079
5080 2002-12-23 DJ Delorie <dj@redhat.com>
5081
5082 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
5083
5084 2002-12-23 Alan Modra <amodra@bigpond.net.au>
5085
5086 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
5087
5088 2002-12-23 Nick Clifton <nickc@redhat.com>
5089
5090 * archures.c (bfd_arch_get_compatible): Add third parameter
5091 'accept_unknowns'. Only accept unknown format BFDs if
5092 accept_unknowns is true, or if the format is "binary".
5093 * bfd-in2.h: Regenerate.
5094
5095 2002-12-21 Nick Clifton <nickc@redhat.com>
5096
5097 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
5098 that subtracted 8 from pc relative relocations.
5099
5100 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5101
5102 * coff-h8300.c: Fix comment typos.
5103 * coffcode.h: Likewise.
5104 * cpu-cris.c: Likewise.
5105 * elf32-vax.c: Likewise.
5106 * genlink.h: Likewise.
5107 * linker.c: Likewise.
5108 * som.c: Likewise.
5109 * tekhex.c: Likewise.
5110 * vms-misc.c: Likewise.
5111
5112 2002-12-20 DJ Delorie <dj@redhat.com>
5113
5114 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
5115 * libbfd.h: Regenerate.
5116 * bfd-in2.h: Regenerate.
5117 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
5118 (xstormy16_reloc_map): Add R_XSTORMY16_12.
5119
5120 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5121
5122 * doc/bfdint.texi: Fix typos.
5123
5124 2002-12-20 Paul Eggert <eggert@twinsun.com>
5125
5126 Port to POSIX 1003.1-2001.
5127 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5128 * configure.in (build-warnings): Likewise.
5129 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5130 * aclocal.m4: Regenerate.
5131 * config.in: Regenerate.
5132 * configure: Regenerate.
5133
5134 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5135
5136 * coff-h8300.c: Include libiberty.h.
5137 (h8300_reloc16_extra_cases): Check the hash table creator before
5138 referencing h8300 specific fields. Stash the hash table pointer
5139 in a local var. Comment typo fixes.
5140 (h8300_bfd_link_add_symbols): Likewise.
5141
5142 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5143 dst_mask comments.
5144 * bfd-in2.h: Regenerate.
5145
5146 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5147
5148 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5149 code a little. Comment on dynamic relocs against section symbols.
5150
5151 2002-12-17 Roger Sayle <roger@eyesopen.com>
5152
5153 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5154 the HP compiler's "long long".
5155
5156 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5157
5158 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5159 and R_XSTORMY16_HI16) howto entries.
5160 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5161 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5162 determine the start of the second reloc table.
5163
5164 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5165
5166 * ecofflink.c: Fix the reading of the debugging information
5167 of Tru64/Alpha binaries that are produced by recent Compaq
5168 compilers.
5169 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5170 table.
5171 (lookup_line): Because of the strange information sometimes
5172 generated by Compaq's recent compilers, change how the FDR
5173 table is searched so that PDRs (procedure descriptors) are
5174 correctly found. Note that this change is really more of a hack;
5175 however, I have included extensive documentation as to why
5176 this is the best solution short of an extensive rewrite or
5177 another hack.
5178 (fdrtab_lookup): Add comments to explain the algorithm.
5179
5180 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5181
5182 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5183 initializers to match struct declaration.
5184
5185 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5186
5187 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5188 * elf.c (get_program_header_size): Likewise.
5189 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5190 (m32r_elf_generic_reloc): Likewise.
5191 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5192 * elflink.h (elf_bfd_discard_info): Likewise.
5193
5194 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5195
5196 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5197 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5198 DT_RELSZ adjustment, not output section. Avoid writing tags when
5199 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5200 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5201 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5202 DT_RELASZ adjustment, not output section. Avoid writing tags when
5203 unchanged. Adjust DT_RELA.
5204 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5205 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5206
5207 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5208
5209 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5210 addend by 4.
5211
5212 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5213
5214 * elfxx-mips.c (struct mips_got_entry): New.
5215 (struct mips_got_info): Added got_entries field.
5216 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5217 (mips_elf_local_got_index, mips_elf_got_page,
5218 mips_elf_got16_entry): Re-implement in terms of new...
5219 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5220 Change return type.
5221 (mips_elf_highest): Warning clean-up.
5222 (mips_elf_create_got_section): Initialize got_entries.
5223 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5224 local got size.
5225 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5226 GOT_PAGE entries, since we now reuse GOT16 entries.
5227
5228 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5229
5230 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5231 read-only section that lies after .text and before .data to be
5232 written into the output file and included in a_text.
5233 (translate_to_native_sym_flags): If an otherwise unrepresentable
5234 section was merged with .text, convert its symbols to N_TEXT
5235 symbols.
5236 * libaout.h (aout_section_merge_with_text_p): New macro.
5237
5238 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5239
5240 * bfd-in.h: Comment typo fix. Formatting.
5241 * bfd-in2.h: Regenerate.
5242 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5243 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5244 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5245
5246 2002-12-05 Richard Henderson <rth@redhat.com>
5247
5248 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5249 Only send PCREL21B though the plt. Fix installed reloc type.
5250 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5251 against PCREL22 or PCREL64I; clean up error messages for
5252 branch relocs.
5253
5254 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5255
5256 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5257 New functions.
5258 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5259
5260 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5261
5262 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5263
5264 2002-12-04 H.J. Lu <hjl@gnu.org>
5265
5266 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5267 BFD address when constructing local name.
5268
5269 2002-12-04 Andreas Schwab <schwab@suse.de>
5270
5271 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5272 member.
5273 (elf_m68k_link_hash_table_create): Initialize it.
5274 (elf_m68k_check_relocs): Handle symbols that are forced to be
5275 local due to visibility changes.
5276 (elf_m68k_adjust_dynamic_symbol): Likewise.
5277 (elf_m68k_size_dynamic_sections): Likewise.
5278 (elf_m68k_discard_copies): Likewise.
5279 (elf_m68k_relocate_section): Likewise.
5280
5281 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5282
5283 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5284
5285 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5286
5287 * srec.c (srec_write_symbols): Restore '$' prefix to address
5288 accidentally removed in 2002-04-04 change.
5289 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5290
5291 2002-12-03 Nick Clifton <nickc@redhat.com>
5292
5293 * elf32-ppc.c (apuinfo_list_init): New function.
5294 (apuinfo_list_add): New function: Add a value to the list.
5295 (apuinfo_list_length): New function: Return the number of
5296 values on the list.
5297 (apuinfo_list_element): New function: Return a value on the
5298 list.
5299 (apuinfo_list_finish): New function: Free the resources used
5300 by the list.
5301 (ppc_elf_begin_write_processing): New function. Scan the
5302 input bfds for apuinfo sections.
5303 (ppc_elf_write_section): New function: Delay the creation of
5304 the contents of an apuinfo section in an output bfd.
5305 (ppc_elf_final_write_processing): New function. Create the
5306 contents of an apuinfo section in an output bfd.
5307 (elf_backend_begin_write_processing): Define.
5308 (elf_backend_final_write_processing): Define.
5309 (elf_backend_write_section): Define.
5310
5311 2002-12-03 Richard Henderson <rth@redhat.com>
5312
5313 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5314
5315 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5316
5317 Fix PR savannah/1417:
5318 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5319 branch if it goes to the start of the deleted region.
5320
5321 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5322
5323 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5324 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5325 bfd_mach_m6812s): Declare.
5326
5327 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5328 (_bfd_m68hc12_elf_set_private_flags): Call it.
5329 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5330 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5331 report microcontroller incompatibilities (HC12 vs HCS12).
5332 (elf_backend_object_p): Update.
5333
5334 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5335
5336 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5337 (enum bfd_boolean, boolean): Delete.
5338 (bfd_boolean): Typedef to an int.
5339 (FALSE, TRUE): Define.
5340 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5341 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5342 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5343 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5344 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5345 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5346 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5347 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5348 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5349 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5350 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5351 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5352 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5353 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5354 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5355 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5356 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5357 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5358 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5359 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5360 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5361 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5362 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5363 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5364 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5365 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5366 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5367 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5368 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5369 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5370 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5371 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5372 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5373 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5374 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5375 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5376 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5377 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5378 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5379 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5380 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5381 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5382 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5383 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5384 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5385 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5386 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5387 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5388 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5389 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5390 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5391 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5392 of bfd_boolean vars with TRUE/FALSE. Formatting.
5393 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5394
5395 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5396
5397 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5398 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5399 with Elf_Internal_Rela.
5400 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5401 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5402 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5403 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5404 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5405 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5406 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5407 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5408 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5409 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5410 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5411 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5412 throughout instead.
5413 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5414 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5415 Remove INLINE keyword.
5416 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5417 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5418 as a bfd_byte *.
5419 (elf_write_relocs): Consolidate REL and RELA code.
5420 (elf_slurp_reloc_table_from_section): Simplify REL code.
5421 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5422 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5423 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5424 RELA code.
5425 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5426 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5427 (elf_link_output_relocs): Likewise.
5428 (elf_reloc_link_order): Likewise.
5429 (elf_finish_pointer_linker_section): Likewise.
5430 (struct elf_link_sort_rela): Remove union.
5431 (elf_link_sort_cmp1): Update to suit.
5432 (elf_link_sort_cmp2): Here too.
5433 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5434 over-allocation for int_rels_per_ext_rel != 1 case.
5435 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5436 * elf32-i386.c: Likewise.
5437 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5438 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5439 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5440 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5441 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5442 elf64-sparc.c, elf64-x86-64.c: Likewise.
5443 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5444 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5445 bfd_elf32_swap_reloc_in.
5446
5447 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5448 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5449 (mips_elf64_swap_reloc_in): Zero r_addend.
5450 (mips_elf64_be_swap_reloc_in): Likewise.
5451 (mips_elf64_slurp_one_reloc_table): Simplify.
5452
5453 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5454 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5455 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5456
5457 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5458
5459 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5460 unresolved debugging relocs in dynamic applications.
5461 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5462
5463 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5464
5465 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5466 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5467 on a relocatable link. Comment typos.
5468 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5469 in the order they are declared. Clear elf_hash_value too.
5470 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5471 eh_info and tls_segment.
5472 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5473 sorted when discarding relocs by turning them into R_*_NONE.
5474
5475 * libbfd.c (warn_deprecated): Comment spelling.
5476 * po/SRC-POTFILES.in: Regenerate.
5477
5478 2002-11-21 Richard Henderson <rth@redhat.com>
5479
5480 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5481 arch's st_other bits when merging visibilities.
5482 (elf_link_output_extsym): Tidy clearing of visibility field.
5483
5484 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5485
5486 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5487 (SWAP_OUT_RELOC_OFFSET): Define.
5488
5489 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5490
5491 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5492 can_refcount is properly extended to the type of
5493 init_refcount.
5494
5495 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5496
5497 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5498 (_bfd_mips_elf_relocate_section): Use it.
5499
5500 * elfxx-mips.c (MNAME): New macro.
5501 (_bfd_mips_elf_check_relocs): Use it.
5502 (_bfd_mips_elf_discard_info): Likewise.
5503 (_bfd_mips_elf_final_link): Likewise.
5504
5505 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5506
5507 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5508 rel_hdr.sh_size too.
5509
5510 2002-11-18 Klee Dienes <kdienes@apple.com>
5511
5512 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5513 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5514 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5515 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5516 Add dependencies for bfdwin.c, bfdio.c.
5517 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5518 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5519 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5520 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5521 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5522 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5523 bfd_get_size (moved from libbfd.c and bfd.c).
5524 * bfdwin.c New file. Contains _bfd_window_internal,
5525 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5526 libbfd.c and bfd.c).
5527 * po/SRC-POTFILES.in: Regenerate.
5528 * po/bfd.pot: Regenerate.
5529 * libbfd.h: Regenerate.
5530 * bfd-in2.h: Regenerate.
5531 * aclocal.m4: Regenerate.
5532 * Makefile.in: Regenerate.
5533 * configure: Regenerate.
5534
5535 2002-11-18 Klee Dienes <kdienes@apple.com>
5536
5537 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5538
5539 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5540
5541 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5542 jsr after a short jump.
5543 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5544
5545 2002-11-15 Klee Dienes <kdienes@apple.com>
5546
5547 * pef.c (bfd_pef_convert_architecture): Move declaration of
5548 ARCH_POWERPC and ARCH_M68K to the start of the function.
5549
5550 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5551
5552 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5553
5554 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5555
5556 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5557 For bpo_gregs_section->contents, allocate _raw_size, not
5558 _cooked_size.
5559
5560 2002-11-13 Klee Dienes <kdienes@apple.com>
5561
5562 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5563
5564 2002-11-13 H.J. Lu <hjl@gnu.org>
5565
5566 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5567
5568 2002-11-13 Klee Dienes <kdienes@apple.com>
5569 Alan Modra <amodra@bigpond.net.au>
5570
5571 * bfd.c (struct bfd_preserve): New.
5572 (bfd_preserve_save): New function.
5573 (bfd_preserve_restore): Ditto.
5574 (bfd_preserve_finish): Ditto.
5575 * bfd-in2.h: Regenerate.
5576 * mach-o.c: Formatting.
5577 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5578 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5579 (bfd_mach_o_core_p): Ditto.
5580 (bfd_mach_o_scan): Pass in mdata.
5581 * mach-o.h (bfd_mach_o_scan): Update prototype.
5582 * pef.c: Formatting.
5583 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5584 (bfd_pef_xlib_object_p): Ditto.
5585 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5586 * pef.h (bfd_pef_scan): Update prototype.
5587 * xsym.c: Formatting, K&R fixes.
5588 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5589 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5590 * xsym.h (bfd_sym_scan): Declare.
5591 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5592 * elfcore.h (elf_core_file_p): Likewise.
5593 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5594
5595 2002-11-12 Nick Clifton <nickc@redhat.com>
5596
5597 * po/da.po: Updated Danish translation.
5598
5599 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5600
5601 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5602 relocatable link too.
5603 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5604 eh_frame and stab sections. Zap deleted relocs.
5605 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5606 (elf_bfd_discard_info): Run for relocatable link too.
5607 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5608 Handle ld -r case.
5609 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5610 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5611
5612 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5613 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5614 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5615 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5616 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5617 (struct elf_link_hash_table): Add eh_info.
5618 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5619 (_bfd_elf_discard_section_eh_frame): Update prototype.
5620 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5621 (_bfd_elf_write_section_eh_frame): Likewise.
5622 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5623 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5624 param. Get "hdr_info" from link hash table.
5625 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5626 header section from link hash table. Save header section to elf_tdata.
5627 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5628 header section from link hash table. Don't alloc hdr_info. Clear
5629 hdr_sec instead of setting "strip".
5630 (_bfd_elf_eh_frame_section_offset): Formatting.
5631 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5632 Get header section from link hash table.
5633 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5634 Get header section from link hash table.
5635 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5636 (get_program_header_size): Likewise.
5637 (_bfd_elf_section_offset): Formatting.
5638 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5639 section pointer in link hash table.
5640 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5641 and _bfd_elf_write_section_eh_frame calls. Update comment about
5642 eh_frame entries.
5643 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5644 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5645
5646 * po/SRC-POTFILES.in: Regenerate.
5647
5648 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5649 relocs for discarded FDEs. Remove dead code.
5650 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5651 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5652 Tidy conditions under which stabs are edited. Formatting.
5653 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5654 from discarded relocs.
5655 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5656 section adjustments after testing magic values.
5657
5658 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5659
5660 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5661 references to large plt symbols.
5662
5663 2002-11-12 Klee Dienes <kdienes@apple.com>
5664
5665 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5666 looking for an unused section name.
5667
5668 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5669
5670 * coff-h8300.c: Fix formatting.
5671 * elf32-h8300.c: Likewise.
5672 * reloc16.c: Likewise.
5673
5674 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5675
5676 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5677 section when dynamic section unused; _bfd_strip_section_from_output
5678 instead.
5679
5680 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5681
5682 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5683 and sym_vec.
5684
5685 * dwarf2.c: Revert last change.
5686
5687 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5688
5689 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5690 _bfd_dwarf2_find_nearest_line): Use
5691 bfd_simple_get_relocated_section_contents() instead of
5692 bfd_get_section_contents().
5693 * reloc.c (bfd_perform_relocation): Add sanity check.
5694 * simple.c (simple_get_relocated_section_contents): If the section
5695 does not have any relocs associated with it, just return the
5696 unadjusted contents.
5697
5698 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5699
5700 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5701 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5702 contents, enabling for a non-DSO, for symbols defined in the
5703 program with --export-dynamic.
5704
5705 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5706
5707 * elf64-ppc.c: Comment typo fixes.
5708 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5709
5710 2002-11-07 Nick Clifton <nickc@redhat.com>
5711
5712 * po/da.po: Updated Danish translation.
5713
5714 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5715
5716 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5717 exactly three internal relocs per external reloc. Set reloc_count
5718 to the external reloc count.
5719
5720 2002-11-06 Klee Dienes <kdienes@apple.com>
5721
5722 * coff-stgo32.c (stub_bytes): Mark as const.
5723 Fix comment formatting.
5724
5725 2002-11-06 Klee Dienes <kdienes@apple.com>
5726
5727 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5728 xsym.lo.
5729 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5730 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5731 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5732 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5733 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5734 sym.
5735 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5736 * Makefile.in: Regenerate.
5737 * doc/Makefile.in: Regenerate.
5738 * bfd-in2.h: Regenerate.
5739 * xsym.c: New file. Contains support for the Apple/Metrowerks
5740 xSYM debugging format.
5741 * xsym.h: New file.
5742 * pef.c: New file. Contains support for the Apple Code Fragment
5743 Manager Preferred Executable Format
5744 * pef.h: New file.
5745 * pef-traceback.h: New file. Contains support for parsing PowerPC
5746 traceback tables as used by PEF executables (and perhaps other
5747 systems as well).
5748 * mach-o.c: New file. Contains support for the Mach-O object file
5749 format.
5750 * mach-o.h: New file.
5751 * mach-o-target.c: New file. Declares the mach-o targets
5752 themselves. Included three times by mach-o.c; each time with a
5753 different set of macros set.
5754
5755 2002-11-06 Graeme Peterson <gp@qnx.com>
5756
5757 * Makefile.am: Remove entries for elf32-qnx.[ch].
5758 * Makefile.in: Regenerate.
5759 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5760 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5761 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5762 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5763 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5764 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5765 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5766 * configure: Regenerate.
5767 * elf32-qnx.c: Remove.
5768 * elf32-qnx.h: Remove.
5769 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5770 is_contained_by_filepos, and copy_private_bfd_data_p.
5771 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5772 is_contained_by_filepos, and copy_private_bfd_data_p.
5773 * elf32-i386.c: Remove QNX extended bfd support.
5774 * elf32-ppc.c: Remove QNX extended bfd support.
5775 * elf32-sh.c: Remove QNX extended bfd support.
5776 * elfarm-nabi.c: Remove QNX extended bfd support.
5777 * targets.c: Remove qnx vectors.
5778 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5779 (elf_backend_is_contained_by_filepos): Remove.
5780 (elf_backend_copy_private_bfd_data_p): Remove.
5781 * po/SRC-POTFILES.in: Regenerate.
5782
5783 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5784 Alan Modra <amodra@bigpond.net.au>
5785
5786 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5787 dynamic relocs against section symbols for the output section vma.
5788
5789 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5790
5791 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5792 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5793
5794 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5795 Alan Modra <amodra@bigpond.net.au>
5796
5797 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5798 vectors in target_selvecs.
5799 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5800 in target_selvecs.
5801 (sh-*-netbsdelf*): Likewise.
5802 * configure.in (assocvecs): New variable. Handle assocvecs like
5803 selvecs.
5804 * configure: Regenerate.
5805 * format.c (bfd_check_format_matches): Store bfd_target pointers
5806 in matching_vector instead of target names. Select first target
5807 from bfd_associated_vector that matches a list of ambiguous targets.
5808 * targets.c (_bfd_associated_vector): New array.
5809 (bfd_associated_vector): New variable.
5810 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5811 * libbfd-in.h (bfd_associated_vector): Declare.
5812 * libbfd.h: Regenerate.
5813
5814 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5815
5816 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5817 non-NULL before dereferencing.
5818
5819 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5820
5821 * vms.c (vms_object_p): Restore the start address when returning
5822 NULL.
5823
5824 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5825 Hans-Peter Nilsson <hp@axis.com>
5826
5827 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5828 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5829 Set up a larger symshndxbuf, and write it out. Free it on
5830 exit rather than freeing symbuf twice. Correct section index
5831 on output section symbol loop.
5832 (elf_link_output_sym): Accumulate symbol extension section
5833 indices, reallocating symshndxbuf rather than writing it out.
5834 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5835 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5836 Use bfd_zalloc to clear i_shdrp[0] too.
5837
5838 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5839
5840 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5841 _raw_size of cranges section if _cooked_size not yet set.
5842
5843 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5844
5845 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5846 for bfd_elf32_swap_symbol_out.
5847
5848 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5849
5850 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5851 signed and unsigned in comparison.
5852
5853 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5854
5855 * coffcode.h: Remove extraneous '\'.
5856
5857 2002-10-28 H.J. Lu <hjl@gnu.org>
5858
5859 * Makefile.am (targets.lo): Depend on Makefile instead of
5860 config.status.
5861 (archures.lo): Likewise.
5862 * Makefile.in: Regenerated.
5863
5864 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5865
5866 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5867 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5868 targ_selvecs.
5869
5870 2002-10-25 Jim Wilson <wilson@redhat.com>
5871
5872 * elf64-sh64.c (sh_elf64_relocate_section): Call
5873 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5874 of SHF_MERGE section.
5875
5876 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5877
5878 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5879
5880 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5881
5882 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5883 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5884 unsigned int.
5885 (NAME(aout,final_link)): Cast enum used in assignment.
5886 (aout_link_write_symbols): Cast enums in comparisons, int values to
5887 boolean, enums in assignments to int.
5888 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5889 (aout_link_input_section_ext): Likewise. Cast enums used in
5890 comparisons with unsigned ints.
5891 (aout_link_reloc_link_order): Cast enum to int in assignment.
5892 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5893 calls to char *.
5894 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5895 assignment.
5896 * bfd-in2.h (bfd_set_section_vma): Likewise.
5897 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5898 * binary.c (bfd_alloc): Cast enum to long.
5899 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5900 * dwarf2.c (read_abbrevs): Add casts to enum types.
5901 (read_attribute_value): Likewise.
5902 (arange_add): Cast result of bfd_zalloc call.
5903 (comp_unit_contains_address): Return true and false.
5904 (comp_unit_find_nearest_line): Cast return to boolean.
5905 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5906 * gen-aout.c: define macro '_' if not defined.
5907 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5908 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5909 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5910 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5911 (bfd_generic_is_local_label_name): Cast return to boolean.
5912 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5913 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5914 struct bfd_hash_entry *.
5915 (_bfd_generic_link_hash_newfunc): likewise.
5916 (_bfd_generic_final_link): Cast enum to unsigned int.
5917 * merge.c (sec_merge_emit): Cast return to boolean.
5918 (merge_strings): Add casts to const unsigned char *.
5919 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5920 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5921 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5922 to struct bfd_hash_entry *.
5923 (bfd_set_section_content): Add cast to PTR in comparison.
5924 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5925 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5926 simple_dummy_unattached_reloc,
5927 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5928 function definitions.
5929 * srec.c (S3Forced): Initialize to false.
5930 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5931 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5932 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5933 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5934 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5935 comparisons.
5936
5937 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5938
5939 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5940 relocs into shared lib non-allocated reloc sections.
5941
5942 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5943
5944 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5945 sorted even when given an out-of-order line sequence.
5946 (lookup_address_in_line_info_table): When an exact VMA match is
5947 not found, return line information with the closest VMA.
5948
5949 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5950
5951 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5952 HPUX 11.00 patch PHSS_26559.
5953
5954 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5955
5956 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5957 the options section into a separate section unless IRIX 6
5958 compatibility is enabled.
5959
5960 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5961
5962 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5963 into arrays.
5964 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5965 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5966 into account.
5967 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5968 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5969
5970 2002-10-21 Graeme Peterson <gp@qnx.com>
5971
5972 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5973
5974 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5975
5976 * targets.c (bfd_target_list): Don't return the default target twice.
5977
5978 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5979
5980 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5981 perror with bfd_perror.
5982
5983 2002-10-19 H.J. Lu <hjl@gnu.org>
5984
5985 * elflink.h (elf_link_add_object_symbols): Correctly handle
5986 DT_RPATH and DT_RUNPATH.
5987
5988 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5989
5990 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5991
5992 2002-10-17 Denis Chertykov <denisc@overta.ru>
5993
5994 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5995 for ip2k port.
5996
5997 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5998
5999 * elfxx-target.h (USE_REL): Don't define as 1.
6000 * elf32-arm.h (USE_REL): Provide a default define of 0.
6001 Use #if rather than #ifdef when testing USE_REL.
6002 * elf32-m32r.c: Likewise.
6003
6004 * elf32-arc.c (USE_REL): Define as 1.
6005 * elf32-d10v.c (USE_REL): Likewise.
6006 * elf32-m32r.c (USE_REL): Likewise.
6007 * elf32-m68hc11.c (USE_REL): Likewise.
6008 * elf32-m68hc12.c (USE_REL): Likewise.
6009 * elf32-or32.c (USE_REL): Likewise.
6010 * elfarm-nabi.c (USE_REL): Likewise.
6011
6012 2002-10-16 Jakub Jelinek <jakub@redhat.com>
6013
6014 * config.bfd (s390-*-linux*): Add targ64_selvecs.
6015 (s390x-*-linux*): Add targ_selvecs.
6016
6017 2002-10-16 Alan Modra <amodra@bigpond.net.au>
6018
6019 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
6020 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
6021 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
6022 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
6023 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
6024 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
6025 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
6026 (SOURCE_HFILES): Add elf32-qnx.h.
6027 (BUILD_HFILES): Add bfdver.h.
6028 Run "make dep-am".
6029 * Makefile.in: Regenerate.
6030 * configure.in Update bfd vector dependencies.
6031 * configure: Regenerate.
6032 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
6033 * elf32-i386qnx.c: Likewise.
6034 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
6035 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
6036 * elf32-sh-lin.c: Likewise.
6037 * elf32-shqnx.c: Likewise.
6038 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
6039 * elf32-sh64-nbsd.c: Likewise.
6040 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
6041 * elf64-sh64-nbsd.c: Likewise.
6042 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
6043 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
6044 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
6045 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
6046 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
6047 (elf_backend_is_contained_by_filepos): Likewise.
6048 (elf_backend_copy_private_bfd_data_p): Likewise.
6049 Globalize and move functions to..
6050 * elf32-qnx.c: ..here. New file.
6051 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
6052 emit target vectors when INCLUDE_SHMEDIA.
6053 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
6054 end of file.
6055 * elf64-sh64.c: Remove ELF_ARCH test.
6056 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
6057 * po/BLD-POTFILES.in: Regenerate.
6058 * po/SRC-POTFILES.in: Regenerate.
6059
6060 2002-10-16 Alan Modra <amodra@bigpond.net.au>
6061
6062 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
6063 loaded with --just-symbols.
6064
6065 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
6066 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6067 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6068 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6069
6070 2002-10-15 Richard Henderson <rth@redhat.com>
6071
6072 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
6073 (BFD64_BACKENDS_CFILES): Likewise.
6074 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
6075 * elf64-alpha-fbsd.c: Remove file, move code ...
6076 * elf64-alpha.c: ... here.
6077 * Makefile.in, configure: Rebuild.
6078
6079 2002-10-14 Richard Henderson <rth@redhat.com>
6080
6081 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
6082 VALUE, not ADDEND.
6083
6084 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
6085
6086 * elf32-sh.c (elf_sh_link_hash_entry): Replace
6087 datalabel_got_offset with union of datalabel_got
6088 offset and refcount.
6089 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
6090 (allocate_dynrelocs): Delete unnecessary code for
6091 STT_DATALABEL type. Create entry in got for
6092 datalabel version of symbol if datalabel_got.refcount > 0.
6093 (sh_elf_relocate_section): Use datalabel_got union.
6094 (sh_elf_gc_sweep_hook): Pull common code to initialize
6095 h and eh out of switch statement. Declare seen_stt_datalabel.
6096 Initialize it. Decrement datalabel_got.refcount for
6097 got relocs when seen_stt_datalabel is true.
6098 Decrement local_got_refcounts entry for datalabel got relocs
6099 of local symbols.
6100 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
6101 (sh_elf_check_relocs): Declare seen_stt_datalabel.
6102 Initialize it. When seen_stt_datalabel is true, increment
6103 datalabel_got refcount rather than got.refcount.
6104 (sh_elf_finish_dynamic_symbol): Create relocs to
6105 initialize got entry for datalabel version of symbol.
6106
6107 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6108
6109 * Makefile.am: Run "make dep-am".
6110 (BFD_H_FILES): Remove version.h.
6111 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
6112 * version.h: ..to here.
6113 * configure.in (bfd_version_date): Remove.
6114 (AC_OUTPUT): Make bfdver.h from version.h.
6115 * bfd.c: #include "bfdver.h".
6116 * vms-hdr.c: Likewise.
6117 * Makefile.in: Regenerate.
6118 * bfd-in2.h: Regenerate.
6119 * configure: Regenerate.
6120 * po/SRC-POTFILES.in: Regenerate.
6121
6122 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6123
6124 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6125 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6126 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6127 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6128 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6129 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6130 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6131 bfd_mach_ip2022, bfd_mach_ip2022ext,
6132 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6133 * bfd-in2.h: Regenerate.
6134
6135 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6136
6137 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6138 endian vector to targ_selvecs.
6139
6140 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6141
6142 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6143 save_addend argument. Don't apply the 32-bit mask to a
6144 GPREL32 value if it's to be used in another relocation. Don't
6145 use forced-check computation of local_p to decide whether to
6146 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6147 of the addend of a non-in-place GPREL16 relocation.
6148 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6149 mips_elf_calculate_relocation().
6150
6151 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6152
6153 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6154 with symbols in other sections if we relaxed something; the sections
6155 output offsets must be re-computed before.
6156
6157 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6158
6159 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6160 handling to use Elf_Internal_Sym.
6161 (m68hc11_elf_relax_delete_bytes): Likewise.
6162
6163 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6164
6165 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6166 sh_elf_object_p, dtpoff_base): New functions.
6167 (sh_elf_howto_table): Add TLS relocs.
6168 (sh_reloc_map): Likewise.
6169 (sh_elf_info_to_howto): Support TLS relocs.
6170 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6171 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6172 New macros.
6173 (sh_elf_obj_tdata): New.
6174 (elf_sh_link_hash_table): Add tls_ldm_got.
6175 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6176 (allocate_dynrelocs): Support TLS relocs.
6177 (sh_elf_size_dynamic_sections): Likewise.
6178 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6179 .rela.got section when found already. Return false after printing
6180 error about unresolvable relocation.
6181 (sh_elf_gc_sweep_hook): Support TLS relocs.
6182 (sh_elf_check_relocs): Likewise.
6183 (sh_elf_finish_dynamic_symbol): Likewise.
6184 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6185 * reloc.c: Add SH TLS relocs.
6186 * bfd-in2.h, libbfd.h: Regenerate.
6187
6188 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6189
6190 * Makefile.in: Regenerated.
6191
6192 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6193
6194 * Makefile.am: Run dep-am.
6195 (BFD_H_DEP): Add simple.c and linker.c.
6196 (BFD32_LIBS): Add simple.lo.
6197 (BFD32_LIBS_CFILES): Add simple.c.
6198 * Makefile.in: Regenerated.
6199 * bfd-in2.h: Regenerated.
6200 * simple.c: New file.
6201
6202 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6203
6204 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6205 (record_thumb_to_arm_glue): Likewise.
6206 * ecoff.c (ecoff_link_add_externals): Likewise.
6207 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6208 (record_thumb_to_arm_glue): Likewise.
6209 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6210 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6211 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6212 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6213 * elf64-ppc.c (func_desc_adjust): Likewise.
6214 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6215 (sh64_elf64_create_dynamic_sections): Likewise.
6216 * elflink.c (_bfd_elf_create_got_section): Likewise.
6217 (_bfd_elf_create_dynamic_sections): Likewise.
6218 (_bfd_elf_create_linker_section): Likewise.
6219 * elflink.h (elf_add_default_symbol): Likewise.
6220 (elf_link_create_dynamic_sections): Likewise.
6221 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6222 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6223 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6224 (_bfd_mips_elf_add_symbol_hook): Likewise.
6225 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6226 * linker.c (generic_link_add_symbol_list): Likewise.
6227 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6228
6229 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6230
6231 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6232 completely removed. Correct local sym adjustment.
6233
6234 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6235
6236 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6237 Correct mistake in calculation of address of .got.
6238 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6239 elf_sh64_pic_plt_entry_le): Likewise.
6240
6241 2002-10-09 Richard Shann <richard.shann@superh.com>
6242 Stephen Clarke <stephen.clarke@superh.com>
6243
6244 * Makefile.am: Add entries for elf32-sh64-lin.c and
6245 elf64-sh64-lin.c. Regenerate.
6246 * Makefile.in: Regenerate.
6247 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6248 to use sh64 vectors rather than sh vectors.
6249 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6250 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6251 * configure: Regenerate.
6252 * elf32-sh64-lin.c: New file.
6253 * elf64-sh64-lin.c: New file.
6254 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6255 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6256
6257 2002-10-08 H.J. Lu <hjl@gnu.org>
6258
6259 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6260 IE->LE transition for R_386_TLS_IE.
6261
6262 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6263
6264 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6265
6266 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6267
6268 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6269 sections.
6270
6271 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6272
6273 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6274 code.
6275
6276 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6277
6278 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6279
6280 * opncls.c: Formatting.
6281 (_bfd_new_bfd): Use a smaller section hash table.
6282
6283 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6284
6285 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6286 of the other two relocations packed with a REL32 to NONE.
6287
6288 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6289
6290 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6291 (sh_elf_link_hash_newfunc): Initialize it.
6292 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6293 to got.refcount for symbols that are forced local or when
6294 we have direct got refs.
6295 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6296 to correctly adjust got.refcount and plt.refcount.
6297 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6298 (sh_elf_check_relocs): Increment gotplt_refcount.
6299
6300 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6301
6302 * elf32-i386.c (elf_i386_relocate_section): Fix
6303 movl foo@indntpoff, %eax IE->LE transition.
6304
6305 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6306
6307 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6308 sequence and its transitions.
6309
6310 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6311
6312 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6313 to st_value + addend in non-code sections.
6314 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6315 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6316
6317 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6318 Ken Raeburn <raeburn@cygnus.com>
6319 Aldy Hernandez <aldyh@redhat.com>
6320 Eric Christopher <echristo@redhat.com>
6321 Richard Sandiford <rsandifo@redhat.com>
6322
6323 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6324 (bfd_mach_mips5500): New.
6325 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6326 (arch_info_struct): Add corresponding entries here.
6327 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6328 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6329 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6330 bfd_mach_mips5400 and bfd_mach_mips5500.
6331 (_bfd_mips_elf_mach_extends_p): New function.
6332 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6333 the EF_MIPS_MACH flags.
6334 * bfd-in2.h: Regenerate.
6335
6336 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6337
6338 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6339 .got sections.
6340
6341 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6342
6343 * elf.c (map_sections_to_segments): Correct test for start of
6344 writable section in the same page as end of read-only section.
6345
6346 2002-09-27 Matt Thomas <matt@3am-software.com>
6347
6348 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6349 local_got_refcounts usage. Remove allocation of got slot.
6350 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6351 Remove de-allocation of got slot.
6352 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6353 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6354 sections to be GC'ed.
6355 (elf_vax_instantiate_got_entries): New function.
6356 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6357 tests that are now handled by elf_vax_instantiate_got_entries.
6358 Assert GOT entry falls within .got section size. Remove redundant
6359 comparisions. Fix comments.
6360
6361 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6362
6363 * reloc.c: Add x86-64 TLS relocs.
6364 * bfd-in2.h, libbfd.h: Rebuilt.
6365 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6366 relocs. Add TLS relocs.
6367 (x86_64_reloc_map): Add TLS relocs.
6368 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6369 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6370 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6371 (elf64_x86_64_hash_entry): Define.
6372 (struct elf64_x86_64_obj_tdata): New.
6373 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6374 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6375 (link_hash_newfunc): Initialize tls_type.
6376 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6377 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6378 (elf64_x86_64_mkobject): New.
6379 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6380 (elf64_x86_64_tls_transition): New.
6381 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6382 Handle TLS relocs.
6383 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6384 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6385 (elf64_x86_64_size_dynamic_sections): Likewise.
6386 (dtpoff_base, tpoff): New.
6387 (elf64_x86_64_relocate_section): Handle TLS relocs.
6388 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6389 entries.
6390 (bfd_elf64_mkobject): Define.
6391
6392 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6393 DF_STATIC_TLS if shared.
6394
6395 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6396
6397 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6398 empty relocation sections.
6399
6400 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6401
6402 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6403 (ppc64_elf_build_stubs): Build them here instead.
6404
6405 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6406
6407 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6408 addend into r_addend, not *r_offset.
6409 (elf32_sparc_finish_dynamic_symbol): Likewise.
6410 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6411 R_SPARC_RELATIVE's r_offset.
6412
6413 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6414
6415 * dwarf2.c (decode_line_info): Update to correctly decode
6416 the (non-standard DWARF2) out-of-order address sequences
6417 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6418
6419 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6420
6421 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6422
6423 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6424
6425 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6426 for discarded FDEs. Remove redundant assignment.
6427 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6428
6429 2002-09-22 H.J. Lu <hjl@gnu.org>
6430
6431 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6432 the relocation count between different .reloc sections.
6433
6434 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6435
6436 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6437 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6438 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6439 R_PPC_EMB_RELSDA.
6440
6441 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6442 unsigned. Move "symcount" assignment out of loop.
6443 * Makefile.am: Run "make dep-am".
6444 * Makefile.in: Regenerate.
6445 * configure: Regenerate.
6446 * po/SRC-POTFILES.in: Regnerate.
6447
6448 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6449
6450 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6451 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6452 (e.g. IRIX64).
6453
6454 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6455
6456 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6457 even if generating R_PPC_RELATIVE reloc.
6458 (ppc_elf_relocate_section): Make sure relocation is performed
6459 if skip == -2. Clear memory at r_offset when creating dynamic
6460 relocation.
6461
6462 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6463
6464 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6465 BFD_RELOC_386_TLS_GOTIE): Add.
6466 * bfd-in2.h, libbfd.h: Rebuilt.
6467 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6468 and R_386_TLS_GOTIE.
6469 (elf_i386_reloc_type_lookup): Handle it.
6470 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6471 char instead of enum, change GOT_* into defines.
6472 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6473 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6474 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6475 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6476 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6477 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6478 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6479 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6480 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6481 tls_type is GOT_TLS_IE_BOTH.
6482 (elf_i386_size_dynamic_sections): Likewise.
6483 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6484 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6485 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6486 all 4 GOT_TLS_* TLS types.
6487
6488 2002-09-19 Nick Clifton <nickc@redhat.com>
6489
6490 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6491 follow indirect links.
6492
6493 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6494
6495 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6496 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6497 on 64 bit machines.
6498 (ecoff_swap_sym_in) <iss>: Likewise.
6499 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6500 ECOFF information: 'ioptMax' refers to the actual *size*
6501 of the optimization symtab, not the number of entries.
6502
6503 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6504
6505 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6506 ELF_LINK_HASH_NEEDS_PLT logic.
6507
6508 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6509
6510 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6511 correct relocation count.
6512
6513 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6514
6515 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6516 * bfd.c (struct _bfd): Add dynsymcount.
6517 * bfd-in2.h: Regenerated.
6518 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6519 abfd->dynsymcount.
6520 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6521 for overflow.
6522
6523 2002-09-17 Stan Cox <scox@redhat.com>
6524
6525 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6526 (mips_elf64_final_gp): Don't make up gp value.
6527 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6528 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6529 .MIPS.options/.options section.
6530
6531 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6532
6533 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6534 It is benign for FreeBSD < 4.1. Minor reformatting.
6535 * elf64-alpha-fbsd.c: Likewise.
6536
6537 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6538
6539 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6540 addend.
6541
6542 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6543
6544 * elf64-alpha.c (alpha_elf_size_info): Make static.
6545
6546 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6547
6548 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6549 * cpu-tic4x.c: Ditto.
6550
6551 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6552
6553 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6554 duplicate define.
6555
6556 2002-09-16 Bruno Haible <bruno@clisp.org>
6557
6558 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6559 by a target variant implementation.
6560 * elf64-alpha.c: Likewise.
6561 * elf32-i386-fbsd.c: New file.
6562 * elf64-alpha-fbsd.c: New file.
6563 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6564 bfd_elf64_alpha_freebsd_vec.
6565 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6566 bfd_elf64_alpha_freebsd_vec.
6567 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6568 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6569 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6570 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6571 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6572 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6573 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6574
6575 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6576
6577 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6578 NULL.
6579 (elf_i386_relocate_section): Return false after printing error about
6580 unresolvable relocation.
6581
6582 2002-09-12 Nick Clifton <nickc@redhat.com>
6583
6584 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6585 R_ARM_THM_PC11.
6586
6587 2002-09-11 Jeffrey Law <law@redhat.com>
6588
6589 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6590
6591 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6592
6593 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6594 line_ptr before deciding we've found a symbol.
6595
6596 2002-09-11 Nick Clifton <nickc@redhat.com>
6597
6598 * po/da.po: New Danish translation file.
6599 * configure.in (LINGUAS): Add 'da'.
6600 * configure: Regenerate.
6601
6602 2002-09-10 Michael Snyder <msnyder@redhat.com>
6603
6604 * irix-core.c (do_sections, do_sections64): New functions.
6605 (irix_core_core_file_p): Call new functions do_sections,
6606 do_sections64, depending on corefile (32-bit or 64-bit).
6607
6608 2002-09-09 Richard Henderson <rth@redhat.com>
6609
6610 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6611 and PCREL21F like PCREL21B.
6612
6613 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6614
6615 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6616 vector.
6617
6618 2002-09-02 Nick Clifton <nickc@redhat.com>
6619
6620 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6621 names instead of cryptically overloaded bfd_reloc error
6622 codes.
6623 (v850_elf_relocate_section): Likewise.
6624 (v850_elf_relax_section): Replace caching of external symbols
6625 with caching of internal symbols obtained from calling
6626 bfd_elf_get_elf_syms().
6627 Fixup problems with freeing cached allocated memory blocks.
6628
6629 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6630
6631 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6632 (bfd_pj_arch): Use bfd_default_scan.
6633 * cpu-v850.c (scan): Remove.
6634 (N): Use bfd_default_scan.
6635 * cpu-z8k.c (scan_mach): Remove.
6636 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6637 first. Use bfd_default_scan.
6638
6639 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6640 bfd_mach constants.
6641 (ecoff_get_magic): Likewise.
6642 * elf32-v850.c (v850_elf_object_p): Likewise.
6643 (v850_elf_final_write_processing): Likewise.
6644 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6645 (MY(write_object_contents)): Likewise.
6646 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6647 * coffcode.h (coff_write_object_contents): Likewise.
6648 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6649 Remove unnecessary "machine" assignments.
6650 (coff_write_relocs): Test for the absolute section sym by testing
6651 section and flags.
6652
6653 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6654 and bfd_mach_i386_i386_intel_syntax.
6655 * pdp11.c (NAME(aout,machine_type)): Likewise.
6656
6657 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6658
6659 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6660 * bfd-in2.h (align_power): Likewise.
6661
6662 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6663
6664 * Makefile.am: Run "make dep-am".
6665 * Makefile.in: Regenerate.
6666
6667 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6668 * cpu-powerpc.c (powerpc_compatible): Likewise.
6669 * cpu-rs6000.c (rs6000_compatible): Likewise.
6670
6671 2002-08-28 Catherine Moore <clm@redhat.com>
6672
6673 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6674 (v850-elf-reloc): Don't resolve pc relative relocs.
6675 (v850_elf_ignore_reloc): New routine.
6676 (v850_elf_final_link_relocate): Handle new relocs.
6677 (v850_elf_relax_delete_bytes ): New routine.
6678 (v850_elf_relax_section): New routine.
6679 (bfd_elf32_bfd_relax_section): Define.
6680 (HOWTO): New entries for new relocs.
6681 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6682 (BFD_RELOC_V850_LONGJUMP): New reloc.
6683 (BFD_RELOC_V850_ALIGN): New reloc.
6684 * archures.c: Remove redundant v850ea architecture.
6685 * cpu-v850.c: Remove redundant v850ea support.
6686 * libbfd.h: Regenerate.
6687 * bfd-in2.h: Regenerated.
6688
6689 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6690
6691 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6692 * configure.in: Add tic4x_coff vector files.
6693 * configure: Regenerate.
6694 * Makefile.am: Add tic4x target.
6695 * Makefile.in: Regenerate.
6696
6697 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6698
6699 * archures.c: Add the BFD arch type tic4x.
6700 * bfd-in.h: Add BFD_IN_MEMORY flag.
6701 * coff-tic4x.c: New file.
6702 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6703 * cpu-tic4x.c: New file.
6704 * targets.c: Added tic4x- in list of xvecs.
6705 * ticoff.h: New file.
6706 * bfd-in2.h: Regenerate.
6707
6708 2002-08-27 Adam Nemet <anemet@lnxw.com>
6709
6710 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6711 bit of DT_INIT and DT_FINI for Thumb functions.
6712
6713 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6714
6715 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6716
6717 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6718
6719 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6720
6721 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6722
6723 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6724 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6725 Likewise.
6726 (struct elf_sh_pcrel_relocs_copied): Removed.
6727 (struct elf_sh_dyn_relocs): New.
6728 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6729 field with dyn_relocs.
6730 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6731 sections and sym_sec.
6732 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6733 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6734 (sh_elf_create_dynamic_sections): Use create_got_section instead
6735 of _bfd_elf_create_got_section.
6736 (sh_elf_check_relocs): Likewise.
6737 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6738 sections.
6739 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6740 sh_elf_relocate_section, sh_elf_check_relocs,
6741 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6742 Likewise.
6743 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6744 dynamic relocations and avoiding the copy relocation when we
6745 didn't find any dynamic relocations in the section which has
6746 contents or is read-only.
6747 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6748 (sh_elf_size_dynamic_sections): Don't reset the size of
6749 .rela.got section even if dynamic_sections_created flag is off.
6750 Don't use sh_elf_discard_copies. Scan all input bfd and use
6751 allocate_dynrelocs. Call readonly_dynrelocs to determine
6752 whether we need DT_TEXTREL.
6753 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6754 whether the symbol was never referred to.
6755 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6756 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6757 (sh_elf_check_relocs): Call create_got_section if the short-cut
6758 to .got is null. Increment reference counters only instead of
6759 allocating space on dynamic sections here. Don't conditionalize
6760 uninitialized got.offset value when marking the symbol as a
6761 global offset table entry. Keep relocations for symbols satisfied
6762 by a dynamic library to avoid copy relocations for the symbol.
6763 Set dynobj field of an elf hash table if needed.
6764 (sh_elf_finish_dynamic_sections): Handle null section pointer
6765 correctly.
6766 (elf_backend_copy_indirect_symbol): Defined.
6767 (elf_backend_can_refcount): Defined.
6768
6769 2002-08-23 Nick Clifton <nickc@redhat.com>
6770
6771 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6772 previous change. Add comment explaining why.
6773
6774 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6775
6776 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6777 contents of .got.plt[2] to tr0, not address of .got.plt.
6778 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6779 patching absolute plt entry. For shmedia plt entry, set bottom bit
6780 of branch to plt0 as this is a branch to an shmedia instruction.
6781 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6782 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6783 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6784 branch to plt0.
6785 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6786 patching absolute plt entry. For shmedia plt entry, branch to
6787 plt0 is now ptrel, so use relative offset. Set bottom bit of
6788 branch target as it is a branch to an shmedia instruction.
6789
6790 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6791 Richard Shann <richard.shann@superh.com>
6792
6793 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6794 value if .init is an SHmedia function. Similarly for DT_FINI.
6795 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6796
6797 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6798
6799 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6800 dynamic section.
6801 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6802
6803 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6804
6805 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6806 byte read when reading the return address register column.
6807
6808 2002-08-22 Nick Clifton <nickc@redhat.com>
6809
6810 * config.bfd: Add powepc64-*-*bsd* target.
6811
6812 2002-08-22 Graeme Peterson <gp@qnx.com>
6813
6814 * Makefile.am: Add entries for elf32-shqnx.c
6815 * Makefile.in: Regenerate.
6816 * config.bfd: Add support sh-*-nto* target.
6817 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6818 * configure: Regenerate.
6819 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6820 * elf32-sh.c: Do not include elf32-target.h if
6821 ELF32_SH_C_INCLUDED is defined.
6822 * elf32-shqnx.c: New file: Support for QNX.
6823 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6824
6825 2002-08-22 Nick Clifton <nickc@redhat.com>
6826
6827 * po/tr.po: Updated Turkish translation.
6828
6829 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6830 symbols are not read.
6831
6832 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6833
6834 * elf32-m68hc11.c: Formatting fixes.
6835 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6836 * elf32-m68hc12.c: Formatting fixes.
6837 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6838
6839 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6840
6841 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6842 SEC_DATA.
6843 (pmac_xcoff_vec): Likewise.
6844 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6845 (aix5coff64_vec): Likewise.
6846
6847 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6848
6849 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6850 param to elf_backend_copy_indirect_symbol.
6851 (_bfd_elf_link_hash_copy_indirect): Likewise.
6852 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6853 calls to copy_indirect_symbol.
6854 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6855 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6856 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6857 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6858 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6859 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6860 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6861 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6862 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6863 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6864 test refcounts for "used" values.
6865
6866 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6867
6868 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6869 argument declaration.
6870
6871 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6872
6873 * archures.c (bfd_mach_ppc_e500): Added.
6874 * bfd-in2.h: Rebuilt.
6875 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6876
6877 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6878
6879 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6880
6881 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6882
6883 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6884 `bfd_byte'.
6885
6886 2002-08-17 Stan Cox <scox@redhat.com>
6887
6888 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6889 IRIX 6 segment layout for NEWABI.
6890
6891 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6892
6893 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6894 symbols when looking for section referred to by a relocation.
6895 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6896
6897 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6898
6899 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6900
6901 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6902
6903 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6904 missing check for whether the symbol is referenced by DSO before
6905 unexporting it as an unneeded dynamic symbol.
6906
6907 2002-08-14 H.J. Lu <hjl@gnu.org>
6908
6909 * libbfd.h: Regenerate.
6910
6911 2002-08-14 H.J. Lu <hjl@gnu.org>
6912
6913 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6914
6915 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6916
6917 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6918 instructions.
6919 (m68hc11_direct_relax): New to define table of relaxable instructions.
6920 (find_relaxable_insn): New, find a relaxable insn.
6921 (compare_reloc): New to compare two relocs.
6922 (m68hc11_elf_relax_section): New, relax text sections.
6923 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6924 (elf32_m68hc11_check_relocs): New function for GC support.
6925 (elf32_m68hc11_relocate_section): New function for GC support.
6926 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6927 (elf_backend_check_relocs): Likewise.
6928 (elf_backend_relocate_section): Likewise.
6929
6930 2002-08-13 H.J. Lu <hjl@gnu.org>
6931
6932 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6933 definitions in shared objects when checking symbol with
6934 undefined version.
6935
6936 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6937
6938 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6939 (elf32_m68hc11_gc_sweep_hook): Likewise.
6940 (elf_backend_gc_mark_hook): Define for GC section support.
6941 (elf_backend_gc_sweep_hook): Likewise.
6942 (elf_backend_can_gc_sections): Likewise.
6943
6944 * elf32-m68hc12.c: Likewise.
6945
6946 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6947
6948 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6949 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6950 (_bfd_m68hc11_elf_set_private_flags): New function.
6951 Use them to set/check/print ELF flags specific to 68HC11.
6952
6953 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6954 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6955 (_bfd_m68hc12_elf_set_private_flags): New function.
6956 Use them to set/check/print ELF flags specific to 68HC12.
6957
6958 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6959
6960 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6961 fix masks for PC-rel relocs.
6962 (m68hc11_elf_ignore_reloc): New function.
6963
6964 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6965 68HC12 banked addressing relocs.
6966 (m68hc12_phys_addr): New to compute physical address of banked memory.
6967 (m68hc12_phys_page): Likewise for page.
6968 (m68hc12_addr_is_banked): New to see if address is in banked area.
6969 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6970
6971 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6972
6973 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6974 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6975 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6976 * bfd-in2.h: Regenerate.
6977
6978 2002-08-12 H.J. Lu <hjl@gnu.org>
6979
6980 * elflink.h (elf_add_default_symbol): Preserve section across
6981 elf_merge_symbol.
6982
6983 2002-08-09 Graeme Peterson <gp@qnx.com>
6984
6985 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6986 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6987 * Makefile.in: Regenerate.
6988 * config.bfd: Add support for powerpc{le}-*-nto targets.
6989 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6990 * configure: Regenerate.
6991 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6992 common file "elf32-qnx.h", and now include that file.
6993 * elf32-qnx.h: New file: QNX specific common elf backend.
6994 * elf32-ppc.c: Do not include elf32-target.h if
6995 ELF32_PPC_C_INCLUDED is defined.
6996 * elf32-ppcqnx.c: New file: Support for QNX.
6997 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6998 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6999
7000 2002-08-09 Nick Clifton <nickc@redhat.com>
7001
7002 * po/sv.po: Updated Swedish translation.
7003
7004 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7005
7006 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
7007 g->global_gotsym is NULL.
7008
7009 2002-08-08 H.J. Lu <hjl@gnu.org>
7010
7011 * elflink.h (elf_add_default_symbol): Don't warn if a definition
7012 overrides an indirect versioned symbol.
7013
7014 2002-08-08 Jakub Jelinek <jakub@redhat.com>
7015
7016 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
7017 for R_386_TLS_TPOFF32 relocs against symndx 0.
7018
7019 2002-08-07 H.J. Lu <hjl@gnu.org>
7020
7021 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
7022 with undefined version if needed.
7023 (elf_link_assign_sym_version): Match a default symbol with a
7024 version without definition. No need to hide the default
7025 definition separately.
7026
7027 2002-08-08 Alan Modra <amodra@bigpond.net.au>
7028
7029 * elflink.h (elf_link_output_extsym): Don't output symbols from
7030 SEC_EXCLUDE sections.
7031
7032 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
7033
7034 2002-08-07 Alan Modra <amodra@bigpond.net.au>
7035
7036 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
7037 entries.
7038
7039 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7040
7041 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
7042 mismatch.
7043
7044 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7045
7046 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
7047
7048 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7049
7050 * elf32-mips.c (mips_reloc_map): Fix typo.
7051
7052 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7053
7054 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
7055
7056 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7057
7058 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
7059
7060 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7061
7062 * libxcoff.h: Use PARAMS on function declarations.
7063 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
7064 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7065
7066 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
7067 addend.
7068 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
7069
7070 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7071
7072 * coff-rs6000.c: Formatting fixes.
7073 (xcoff_calculate_relocation): Use PARAMS in declaration.
7074 (xcoff_complain_overflow): Likewise.
7075 (xcoff_ppc_relocate_section): Use old-style function pointer call.
7076 (bfd_xcoff_backend_data): Remove useless comments.
7077 (rs6000coff_vec): Likewise.
7078 (bfd_pmac_xcoff_backend_data): Likewise.
7079 (pmac_xcoff_vec): Likewise.
7080
7081 * coff64-rs6000.c: Formatting fixes.
7082 (xcoff64_calculate_relocation): Use PARAMS in declaration.
7083 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
7084 (bfd_xcoff_backend_data): Remove useless comments.
7085 (rs6000coff64_vec): Likewise.
7086 (bfd_xcoff_aix5_backend_data): Likewise.
7087 (aix5coff64_vec): Likewise.
7088
7089 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7090
7091 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
7092 mask entries. Use complain_overflow_dont for R_REF.
7093 (xcoff_reloc_type_ba): Revert last change.
7094 (xcoff_reloc_type_br): Likewise.
7095 (xcoff_reloc_type_crel): Likewise.
7096 (xcoff_ppc_relocate_section): Likewise.
7097 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
7098 (xcoff64_ppc_relocate_section): Likewise.
7099 (xcoff64_howto_table): Revert some of last change to mask entries.
7100 Use complain_overflow_dont for R_REF.
7101
7102 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
7103 relocs with bitsize == 16 have size = 1.
7104 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
7105 (xcoff_reloc_type_br): Likewise.
7106 (xcoff_reloc_type_crel): Likewise.
7107 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7108 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
7109 dst_mask adjustment.
7110 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7111 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
7112 bitsize == 16 have size = 1.
7113
7114 2002-08-01 Denis Chertykov <denisc@overta.ru>
7115
7116 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
7117 (struct misc): New field isymbuf. All free_* fields removed.
7118 (symbol_value): Pass in internal syms. No need to swap syms in.
7119 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
7120 possibly cached info.
7121 (tidyup_after_error): Removed.
7122 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7123 misc. Use new field.
7124 (adjust_all_relocations): Use internal syms. No need to swap syms
7125 in and out.
7126 (add_page_insn): Don't use removed fields of struct misc.
7127
7128 2002-08-01 Nick Clifton <nickc@redhat.com>
7129
7130 * elf32-arm.h: Revert previous delta.
7131
7132 2002-08-01 Nick Clifton <nickc@redhat.com>
7133
7134 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7135 * configure: Regenerate.
7136
7137 2002-07-31 H.J. Lu <hjl@gnu.org>
7138
7139 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7140 selected.
7141
7142 2002-07-31 H.J. Lu <hjl@gnu.org>
7143
7144 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7145 is selected.
7146
7147 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7148
7149 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7150 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7151
7152 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7153
7154 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7155 There is no 8 byte relocation type for this architecture.
7156 (do_ns32k_reloc): Use bfd_vma instead of native types.
7157 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7158 returns void.
7159 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7160 rely on generic code to do that.
7161 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7162 to all table entries.
7163 (_bfd_ns32k_relocate_contents): put_data returns void.
7164 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7165 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7166 return void.
7167
7168 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7169
7170 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7171 archive object is target dependant.
7172
7173 2002-07-31 Adam Nemet <anemet@lnxw.com>
7174
7175 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7176 (THUMB_PLT_ENTRY_SIZE): New macro.
7177 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7178 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7179 ARM_PLT_ENTRY_SIZE.
7180 (elf32_arm_plt_entry): Likewise.
7181 (elf_backend_plt_header_size): Likewise.
7182 (elf32_thumb_plt0_entry): New global.
7183 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7184 into .plt.thumb.
7185 (elf32_thumb_plt_entry): New global.
7186 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7187 Thumb entries. Set the bottom bit of the corresponding GOT entry
7188 for a Thumb PLT entry.
7189 (struct elf32_arm_plt_entry_info): New structure.
7190 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7191 type.
7192 (elf32_arm_link_hash_newfunc): Initialize new member.
7193 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7194 relocations against the PLT.
7195 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7196 first_rel_type if this is the first time we encounter the symbol.
7197 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7198 Determine if relocation needs a PLT entry. Set first_rel_type if
7199 this is the first time we encounter the symbol
7200 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7201 functions as well.
7202 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7203 (elf32_arm_create_dynamic_sections): New function. Create the
7204 .plt.thumb section.
7205 (elf_backend_create_dynamic_sections): Call it.
7206
7207 2002-07-31 Nick Clifton <nickc@redhat.com>
7208
7209 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7210 'alternative' in order to avoid shadowing global symbol of the
7211 same name.
7212 * bfd-in2.h: Regenerate.
7213 * libbfd.h: Regenerate.
7214 * libcoff.h: Regenerate.
7215
7216 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7217
7218 * Makefile.am: Add n32 ABI support.
7219 * Makefile.in: Regenerate.
7220 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7221 bit vectors for mips*-*-linux targets as optional.
7222 * configure.in: Add n32 ABI vectors.
7223 * configure: Regenerate.
7224 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7225 * elfn32-mips.c: New file, n32 ABI support.
7226 * targets.c: Add n32 ABI vectors.
7227
7228 2002-07-30 Graeme Peterson <gp@qnx.com>
7229
7230 * elfarmqnx-nabi.c: New file: Support for QNX.
7231 * config.bfd: Add support for arm-*-nto target.
7232 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7233 * configure: Regenerate.
7234 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7235 * Makefile.in: Regenerate.
7236 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7237 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7238 * elfarm-nabi.c: Do not include elf32-arm.h if
7239 ELFARM_NABI_C_INCLUDED is defined.
7240 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7241
7242 2002-07-30 Nick Clifton <nickc@redhat.com>
7243
7244 * po/sv.po: Updated Swedish translation.
7245
7246 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7247
7248 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7249
7250 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7251
7252 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7253 * archive.c (bfd_generic_archive_p): Likewise.
7254 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7255 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7256 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7257 (xcoff64_archive_p): Likewise.
7258 (xcoff64_openr_next_archived_file): Likewise.
7259 (xcoff64_archive_p): Clean up tdata properly on error.
7260 * coffgen.c (coff_real_object_p): Likewise.
7261 (coff_object_p): Release filehdr and opthdr.
7262 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7263 * ieee.c (ieee_archive_p): Likewise.
7264 * ihex.c (ihex_object_p): Likewise.
7265 (ihex_mkobject): Always allocate tdata.
7266 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7267 * srec.c (srec_mkobject): Always allocate tdata.
7268 (srec_object_p): Clean up tdata properly on error.
7269 (symbolsrec_object_p): Likewise.
7270 * versados.c (versados_object_p): Likewise.
7271 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7272 and bfd_realloc instead of realloc.
7273 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7274 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7275 place of bfd_malloc, simplifying error freeing. Free hash table too.
7276 (vms_object_p): Clean up tdata on error.
7277 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7278 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7279
7280 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7281
7282 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7283
7284 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7285
7286 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7287 flags into resulting BFD.
7288
7289 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7290
7291 From John Reiser <jreiser@BitWagon.com>
7292 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7293 tls_ldm_got.refcount.
7294
7295 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7296
7297 * elf64-mips.c: Update TODO comment.
7298 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7299 mips_elf64_gprel16_reloca): Remove prototypes.
7300 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7301 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7302 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7303 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7304 R_MIPS_HIGHEST.
7305 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7306 R_MIPS_GOT16. Remove wrong comments.
7307 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7308 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7309 from elf32-mips.c.
7310 (mips_elf64_hi16_reloc): Fix formatting.
7311 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7312 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7313 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7314 (mips_elf64_gprel16_reloc): Make static. Add check for
7315 partial_inplace.
7316 (mips_elf64_gprel16_reloca): Remove.
7317 (mips_elf64_literal_reloc): New function.
7318 (mips_elf64_gprel32_reloc): Fix formatting.
7319 (mips_elf64_shift6_reloc): Fix comment. Make static.
7320 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7321 elf32-mips.c.
7322 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7323 elf32-mips.c
7324 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7325 specific relocations.
7326 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7327 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7328 (ELF_MAXPAGESIZE): Add comment.
7329
7330 2002-07-25 Nick Clifton <nickc@redhat.com>
7331
7332 * po/sv.po: Updated Swedish translation.
7333 * po/es.po: Updated Spanish translation.
7334 * po/fr.po: Updated French translation.
7335
7336 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7337
7338 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7339 as elf_link_record_local_dynamic_symbol.
7340 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7341 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7342 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7343 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7344 attempt is made to record a symbol in a discarded section, and
7345 return `2' in that case.
7346
7347 2002-07-24 Nick Clifton <nickc@redhat.com>
7348
7349 * po/sv.po: Updated Swedish translation.
7350 * po/es.po: Updated Spanish translation.
7351
7352 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7353
7354 * po/SRC-POTFILES.in: Regenerate.
7355
7356 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7357 immediately. Remove code handling relocatable linking.
7358 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7359 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7360 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7361 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7362 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7363 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7364 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7365 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7366 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7367 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7368 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7369 * elf32-avr.c (elf_backend_rela_normal): Define.
7370 * elf32-cris.c: Likewise.
7371 * elf32-fr30.c: Likewise.
7372 * elf32-frv.c: Likewise.
7373 * elf32-h8300.c: Likewise.
7374 * elf32-hppa.c: Likewise.
7375 * elf32-ip2k.c: Likewise.
7376 * elf32-sparc.c: Likewise.
7377 * elf32-v850.c: Likewise.
7378 * elf32-vax.c: Likewise.
7379 * elf64-hppa.c: Likewise.
7380 * elf64-sparc.c: Likewise.
7381 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7382 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7383 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7384 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7385 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7386 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7387 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7388 * elf-m10200.c (USE_RELA): Don't define.
7389 * elf-m10300.c: Likewise.
7390 * elfarm-oabi.c: Likewise.
7391 * elf32-i370.c: Likewise.
7392 * elf32-ip2k.c: Likewise.
7393 * elf32-m68k.c: Likewise.
7394 * elf32-mcore.c: Likewise.
7395 * elf32-ppc.c: Likewise.
7396 * elf32-s390.c: Likewise.
7397 * elf32-vax.c: Likewise.
7398 * elf64-ppc.c: Likewise.
7399 * elf64-s390.c: Likewise.
7400 * elf64-x86-64.c: Likewise.
7401 * elfxx-ia64.c: Likewise.
7402 * elf32-avr.c (USE_REL): Don't undef.
7403 * elf32-ip2k.c: Likewise.
7404
7405 2002-07-23 Nick Clifton <nickc@redhat.com>
7406
7407 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7408 'want_p_paddr_set_to_zero'.
7409 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7410 to false;
7411 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7412 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7413
7414 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7415
7416 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7417 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7418 show the Copyright string.
7419 Minor formatting tidy ups.
7420
7421 2002-07-23 Nick Clifton <nickc@redhat.com>
7422
7423 * po/fr.po: Updated French translation.
7424 * po/sv.po: Updated Swedish translation.
7425
7426 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7427
7428 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7429 when outputting relocs.
7430
7431 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7432
7433 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7434 DT_PLTGOT into the dynamic section if there is a PLT.
7435
7436 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7437
7438 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7439 elf32-mips.c.
7440 (_bfd_mips_elf_write_section): Likewise.
7441 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7442 (_bfd_mips_elf_write_section): Likewise.
7443 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7444 (elf32_mips_write_section): Likewise.
7445 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7446 (_bfd_mips_elf_write_section): Likewise.
7447
7448 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7449
7450 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7451 PT_IA_64_UNWIND segments for a given section.
7452
7453 2002-07-17 H.J. Lu <hjl@gnu.org>
7454
7455 * Makefile.am: Fix a typo.
7456 * Makefile.in: Regenerate.
7457
7458 2002-07-15 Denis Chertykov <denisc@overta.ru>
7459 Frank Ch. Eigler <fche@redhat.com>
7460 Ben Elliston <bje@redhat.com>
7461 Alan Lehotsky <alehotsky@cygnus.com>
7462 John Healy <jhealy@redhat.com>
7463 Graham Stott <grahams@redhat.com>
7464 Jeff Johnston <jjohnstn@redhat.com>
7465
7466 * Makefile.am: Add support for ip2k.
7467 * Makefile.in: Regenerate.
7468 * doc/Makefile.in: Regenerate.
7469 * archures.c: Add support for ip2k.
7470 * config.bfd: Add support for ip2k.
7471 * configure.in: Add support for ip2k.
7472 * configure: Regenerate.
7473 * reloc.c: Add support for ip2k.
7474 * targets.c: Add support for ip2k.
7475 * bfd-in2.h: Regenerate.
7476 * libbfd.h: Regenerate.
7477 * cpu-ip2k.c: New file.
7478 * elf32-ip2k.c: New file.
7479
7480 2002-07-17 Ian Rickards <irickard@arm.com>
7481
7482 * dwarf2.c (concat_filename): If we can't establish the directory
7483 just return the filename.
7484
7485 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7486
7487 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7488
7489 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7490
7491 * elflink.h: Formatting fixes, tidy prototypes.
7492 (elf_link_assign_sym_version): Move common code out of loop.
7493
7494 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7495
7496 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7497 reloc section size is zero. Correct reloc output location.
7498
7499 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7500
7501 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7502 the final type for the e_fsel selector when generating PA2.0W code.
7503 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7504 relocations.
7505
7506 2002-07-14 H.J. Lu <hjl@gnu.org>
7507
7508 * elflink.h (elf_link_assign_sym_version): Hide the default
7509 definition if there is a hidden versioned definition.
7510
7511 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7512
7513 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7514 dynamic reference test in assertion when initializing GOT with
7515 static contents. Just assert that there are either no dynamic
7516 sections, the symbol is defined in the regular objects or that the
7517 symbol is undef weak. Tweak comment.
7518 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7519 only if the symbol isn't defined in the program and isn't undef
7520 weak.
7521 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7522 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7523 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7524 (elf_cris_discard_excess_program_dynamics): Don't consider
7525 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7526
7527 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7528
7529 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7530 unresolved debugging relocs in dynamic applications.
7531 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7532 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7533 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7534 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7535 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7536 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7537
7538 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7539
7540 * elf64-ppc.c (ONES): Define.
7541 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7542 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7543 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7544
7545 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7546 (ppc64_elf_set_private_flags): Delete.
7547 (ppc64_elf_section_from_shdr): Delete.
7548 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7549 (ppc64_elf_fake_sections): Delete.
7550 (bfd_elf64_bfd_set_private_flags): Don't define.
7551 (bfd_elf64_get_symbol_info): Likewise.
7552 (elf_backend_section_from_shdr): Likewise.
7553 (elf_backend_fake_sections): Likewise.
7554
7555 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7556
7557 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7558 when not already set.
7559 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7560 (elf_backend_fake_sections): Define.
7561
7562 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7563
7564 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7565 Formatting.
7566 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7567
7568 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7569
7570 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7571 NULL sym_hashes to just before use.
7572 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7573 symbol with non-default visibility.
7574 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7575 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7576 Ditto.
7577 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7578 symbol with non-default visibility.
7579 (cris_elf_check_relocs): At tests for local symbol before
7580 increasing h->plt.refcount, also check for non-default
7581 visibility. Ditto when checking for local symbol to eliminate
7582 pc-relative runtime relocs.
7583
7584 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7585
7586 * elf.c: Formatting.
7587 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7588 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7589 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7590 segments.
7591
7592 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7593 Alan Modra <amodra@bigpond.net.au>
7594
7595 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7596 account the impact of relocation count overflow when computing
7597 section offsets.
7598 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7599 or not to apply the PE COFF reloc overflow handling. Fix a
7600 fencepost error in deciding whether or not to use that technique.
7601
7602 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7603
7604 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7605 change type of locsyms.
7606 (bfd_elf_get_elf_syms): Declare.
7607 * elf.c (bfd_elf_get_elf_syms): New function.
7608 (group_signature): Use bfd_elf_get_elf_syms.
7609 (bfd_section_from_r_symndx): Likewise.
7610 * elfcode.h (elf_slurp_symbol_table): Likewise.
7611 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7612 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7613 locality of various data structures. Properly free internal relocs.
7614 (elf_bfd_final_link): Properly free internal relocs.
7615 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7616 (elf_link_input_bfd): Likewise.
7617 (elf_gc_mark): Likewise. Properly free internal relocs.
7618 (elf_gc_sweep): Properly free internal relocs.
7619 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7620 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7621 internal relocs.
7622 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7623 Properly free possibly cached info.
7624 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7625 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7626 symbol swapping code.
7627 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7628 Properly free possibly cached info.
7629 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7630 (mn10300_elf_relax_delete_bytes): Likewise.
7631 (mn10300_elf_symbol_address_p): Likewise.
7632 (mn10300_elf_get_relocated_section_contents): Likewise.
7633 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7634 (elf32_h8_relax_delete_bytes): Likewise.
7635 (elf32_h8_symbol_address_p): Likewise.
7636 (elf32_h8_get_relocated_section_contents): Likewise.
7637 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7638 (m32r_elf_relax_delete_bytes): Likewise.
7639 (m32r_elf_get_relocated_section_contents): Likewise.
7640 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7641 elf_section_data to determine whether cached.
7642 (sh_elf_relax_section): As above for elf-m10200.c.
7643 (sh_elf_relax_delete_bytes): Likewise.
7644 (sh_elf_get_relocated_section_contents): Likewise.
7645 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7646 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7647 reading of local syms.
7648 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7649 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7650 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7651 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7652 relocs.
7653 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7654 free internal relocs and section contents. Don't read symbols.
7655 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7656 (elf32_hppa_size_stubs): Don't free local syms.
7657 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7658 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7659 possibly cached info.
7660 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7661 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7662 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7663 all_local_syms.
7664 (get_local_syms): Delete function.
7665 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7666 on exit.
7667 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7668
7669 2002-07-05 Jim Wilson <wilson@redhat.com>
7670
7671 * syms.c (decode_section_type): New.
7672 (bfd_decode_symclass): Call decode_section_type.
7673
7674 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7675
7676 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7677 section content start.
7678 Reported by Michael Schumacher <mike@hightec-rt.com>.
7679
7680 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7681
7682 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7683 link order code. Don't actually remove the output section here;
7684 Just set a flag for the linker to do so.
7685 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7686 sections when setting up output section dynsyms.
7687
7688 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7689
7690 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7691 fudge.
7692 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7693 libs here instead.
7694
7695 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7696
7697 * elf64-s390.c (create_got_section): Set .got section alignment to
7698 8 bytes.
7699 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7700
7701 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7702
7703 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7704
7705 2002-07-01 Matt Thomas <matt@3am-software.com>
7706
7707 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7708 to EF_VAX_*.
7709
7710 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7711
7712 * elfxx-mips.c (ABI_64_P): Fix comment.
7713 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7714 new section names for N64 ABI.
7715 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7716 (mips_elf_calculate_relocation): Code formatting.
7717 (mips_elf_create_dynamic_relocation): Likewise.
7718 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7719 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7720 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7721 in any NewABI.
7722 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7723 for NewABI.
7724 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7725 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7726 here, too.
7727
7728 2002-07-01 Andreas Schwab <schwab@suse.de>
7729
7730 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7731 R_X86_64_64 to R_X86_64_RELATIVE.
7732
7733 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7734
7735 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7736 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7737 Run "make dep-am".
7738 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7739 host_aout_vec.
7740 * configure.in (vaxbsd_vec): Add.
7741 * targets.c (vaxbsd_vec): Add.
7742 * Makefile.in: Rebuild.
7743 * configure: Rebuild.
7744 * po/SRC-POTFILES.in: Rebuild.
7745
7746 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7747
7748 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7749 examining to gc_mark_hook, rather than the bfd.
7750 (elf_gc_sections): Adjust.
7751 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7752 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7753 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7754 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7755 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7756 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7757 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7758 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7759 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7760 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7761 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7762 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7763 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7764 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7765 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7766 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7767 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7768 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7769 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7770 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7771 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7772 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7773 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7774 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7775 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7776 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7777 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7778 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7779 redundant local sym tests.
7780 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7781 (link_hash_newfunc): Init is_entry.
7782 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7783 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7784 (create_linkage_sections): Use bfd_make_section_anyway rather than
7785 bfd_make_section.
7786 (ppc64_elf_mark_entry_syms): New function.
7787 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7788 up opd entry to function section map.
7789 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7790 relocs that reference the opd section.
7791 (edit_opd): New function.
7792 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7793 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7794 (get_local_syms): Do so here. Exit if we already have local syms.
7795 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7796 read local syms on non-ELF input.
7797 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7798 than duplicating it's function here. Adjust free of internal
7799 relocs to suit.
7800 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7801 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7802 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7803 _bfd_elf32_link_read_relocs rather than duplicating it's function
7804 here. Adjust free of internal relocs to suit.
7805
7806 2002-07-01 Andreas Jaeger <aj@suse.de>
7807
7808 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7809 are not allowed in shared libs code, enforce -fPIC.
7810
7811 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7812
7813 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7814 trailing zero-sequences when there's previous left-over data.
7815
7816 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7817
7818 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7819 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7820 and opd_rel_sec in order for starting rela section. Check _raw_size.
7821 (elf_backend_reloc_type_class): Define.
7822
7823 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7824
7825 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7826 DWARF2 formats.
7827
7828 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7829
7830 * cpu-powerpc.c: Comment on ordering of arch_info.
7831 * elf32-ppc.c (ppc_elf_object_p): New function.
7832 (elf_backend_object_p): Define.
7833 * elf64-ppc.c (ppc64_elf_object_p): New function.
7834 (elf_backend_object_p): Define.
7835
7836 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7837
7838 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7839 * configure: Regenerate.
7840
7841 2002-06-25 Jason Eckhardt <jle@rice.edu>
7842
7843 * dwarf2.c (decode_line_info): Check unit->addr_size
7844 to read in the proper number of prologue bytes.
7845
7846 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7847
7848 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7849 aix5coff64_vec if 64-bit bfd support has been enabled.
7850 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7851 been enabled.
7852
7853 * targets.c (_bfd_target_vector[]): Only include
7854 aix5coff64_vec if 64-bit bfd support has been enabled.
7855
7856 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7857
7858 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7859 * elf32-hppa.c (hppa_add_stub): Likewise.
7860 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7861 * elflink.h (elf_add_default_symbol): Fix comment typo.
7862 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7863 (elf_link_add_object_symbols): Likewise.
7864 (elf_link_assign_sym_version): Likewise.
7865 * hash.c (bfd_hash_lookup): Likewise.
7866 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7867 * section.c (bfd_get_unique_section_name): Likewise.
7868 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7869 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7870 (assign_section_numbers): Likewise.
7871 (_bfd_elfcore_make_pseudosection): Likewise.
7872 (elfcore_grok_lwpstatus): Likewise.
7873 (elfcore_grok_win32pstatus): Likewise.
7874 (elfcore_write_note): Constify input params. Use PTR instead of
7875 void *. Include terminating NUL in namesz. Correct padding.
7876 Support NULL "name" param. Use memcpy instead of strcpy.
7877 (elfcore_write_prpsinfo): Constify input params.
7878 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7879 (elfcore_write_lwpstatus): Likewise.
7880 (elfcore_write_pstatus): Likewise.
7881 (elfcore_write_prfpreg): Likewise.
7882 (elfcore_write_prxfpreg): Likewise.
7883 * elf-bfd.h (elfcore_write_note): Update declaration.
7884 (elfcore_write_prpsinfo): Likewise.
7885 (elfcore_write_prstatus): Likewise.
7886 (elfcore_write_pstatus): Likewise.
7887 (elfcore_write_prfpreg): Likewise.
7888 (elfcore_write_prxfpreg): Likewise.
7889 (elfcore_write_lwpstatus): Likewise.
7890
7891 2002-06-25 Jason Eckhardt <jle@rice.edu>
7892
7893 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7894 symbols of type stProc and stStaticProc.
7895
7896 2002-06-25 Nick Clifton <nickc@redhat.com>
7897
7898 * ecoff.c: VArious formatting fixes.
7899
7900 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7901
7902 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7903
7904 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7905
7906 * aout-adobe.c: Don't compare against "true" or "false.
7907 * aout-target.h: Likewise.
7908 * aoutx.h: Likewise.
7909 * archive.c: Likewise.
7910 * bout.c: Likewise.
7911 * cache.c: Likewise.
7912 * coff-a29k.c: Likewise.
7913 * coff-alpha.c: Likewise.
7914 * coff-i386.c: Likewise.
7915 * coff-mips.c: Likewise.
7916 * coff-or32.c: Likewise.
7917 * coff64-rs6000.c: Likewise.
7918 * coffcode.h: Likewise.
7919 * coffgen.c: Likewise.
7920 * cpu-ns32k.c: Likewise.
7921 * ecoff.c: Likewise.
7922 * ecofflink.c: Likewise.
7923 * elf.c: Likewise.
7924 * elf32-arm.h: Likewise.
7925 * elf32-cris.c: Likewise.
7926 * elf32-d30v.c: Likewise.
7927 * elf32-i386.c: Likewise.
7928 * elf32-mcore.c: Likewise.
7929 * elf32-ppc.c: Likewise.
7930 * elf32-sh.c: Likewise.
7931 * elf32-sh64.c: Likewise.
7932 * elf32-v850.c: Likewise.
7933 * elf64-alpha.c: Likewise.
7934 * elf64-sh64.c: Likewise.
7935 * elfcode.h: Likewise.
7936 * elfcore.h: Likewise.
7937 * elflink.h: Likewise.
7938 * elfxx-mips.c: Likewise.
7939 * i386os9k.c: Likewise.
7940 * ieee.c: Likewise.
7941 * libbfd.c: Likewise.
7942 * linker.c: Likewise.
7943 * mmo.c: Likewise.
7944 * nlm32-alpha.c: Likewise.
7945 * nlm32-i386.c: Likewise.
7946 * nlm32-ppc.c: Likewise.
7947 * nlm32-sparc.c: Likewise.
7948 * nlmcode.h: Likewise.
7949 * oasys.c: Likewise.
7950 * pdp11.c: Likewise.
7951 * peicode.h: Likewise.
7952 * reloc.c: Likewise.
7953 * som.c: Likewise.
7954 * srec.c: Likewise.
7955 * tekhex.c: Likewise.
7956 * vms.c: Likewise.
7957 * xcofflink.c: Likewise.
7958 * elf64-sparc.c: Edit comment to not use "== false".
7959
7960 * aoutf1.h: Don't use "? true : false".
7961 * ecoff.c: Likewise.
7962 * format.c: Likewise.
7963 * ieee.c: Likewise.
7964 * linker.c: Likewise.
7965 * mmo.c: Likewise.
7966 * oasys.c: Likewise.
7967
7968 2002-06-23 H.J. Lu <hjl@gnu.org>
7969
7970 * elflink.h (elf_link_add_archive_symbols): For the default
7971 version, check references with only one `@' first.
7972
7973 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7974
7975 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7976 function.
7977 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7978 symbol table.
7979 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7980 (elf64_hppa_size_dynamic_sections): Revise to use
7981 elf64_hppa_mark_milli_and_exported_functions.
7982 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7983 symbols out of dynamic symbol table.
7984
7985 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7986
7987 * Makefile.in: Regenerate.
7988 * libbfd.h: Regenerate.
7989 * bfd-in2.h: Regenerate.
7990 * configure: Regenerate.
7991 * po/SRC-POTFILES.in: Regenerate.
7992
7993 * elflink.h: Comment typo fixes.
7994
7995 2002-06-23 H.J. Lu <hjl@gnu.org>
7996
7997 * elf-bfd.h (elf_link_loaded_list): New structure.
7998 (elf_link_hash_table): Add "loaded".
7999 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
8000 * elflink.h (elf_link_check_versioned_symbol): New function.
8001 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
8002
8003 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
8004
8005 * elflink.h (size_dynamic_sections): If the target does not
8006 support an ELF style hash table, return true, indicating that
8007 nothing needed to be done, rather than false, indicating that the
8008 section's size could not be computed.
8009
8010 2002-06-18 Dave Brolley <brolley@redhat.com>
8011
8012 From Catherine Moore, Michael Meissner, Dave Brolley:
8013 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
8014 * targets.c: Support bfd_elf32_frv_vec.
8015 * reloc.c: Add FRV relocs.
8016 * configure.in: Add support for bfd-elf32-frv-vec.
8017 * config.bfd (targ_cpu): Add support for frv-*-elf.
8018 * archures.c: Add frv arch and machines.
8019 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
8020 (ALL_MACHINES_CFILES): Add cpu-frv.c.
8021 (BFD32_BACKENDS): Add elf32-frv.lo.
8022 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
8023 (cpu-frv.lo): New target.
8024 (elf32-frv.lo): New target.
8025 * cpu-frv.c: New file.
8026 * elf32-frv.c: New file.
8027
8028 2002-06-18 Jakub Jelinek <jakub@redhat.com>
8029
8030 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
8031 e_shnum == 0.
8032 Only read the first section header if e_shoff is non-zero.
8033 Don't consider e_shstrndx if there are no sections.
8034
8035 2002-06-17 Tom Rix <trix@redhat.com>
8036
8037 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
8038 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
8039 complain_overflow_bitfield.
8040
8041 2002-06-17 Alan Modra <amodra@bigpond.net.au>
8042
8043 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
8044 (bfd_fdopenr): Likewise.
8045 (bfd_openstreamr): Likewise.
8046 (bfd_openw): Likewise.
8047
8048 * targets.c: Sort target vecs.
8049 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
8050 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
8051 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
8052 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
8053 * configure.in: Sort target vecs. Add m88kmach3_vec.
8054 * configure: Regenerate.
8055
8056 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
8057
8058 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
8059 bpo_reloc_no to break sort order ties, not address of items.
8060
8061 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
8062
8063 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
8064 Skip excluded sections in determing __gp value.
8065 (elf_hppa_final_link_relocate): Use the symbol's address in
8066 R_PARISC_FPTR64 relocations that don't need an opd entry.
8067 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
8068 (elf64_hppa_finalize_dynreloc): Likewise.
8069 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
8070 (elf64_hppa_finish_dynamic_symbol): Break up assert.
8071
8072 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
8073
8074 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
8075 alignment for .bss, .data and .text sections so that sse and sse2
8076 code will work.
8077 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8078
8079 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
8080
8081 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
8082 sh[1234]*-elf*.
8083
8084 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8085
8086 * elflink.h (elf_bfd_final_link): Improve error handling for missing
8087 dynamic sections.
8088
8089 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
8090 for a symbol that has no output section.
8091 (allocate_dynrel_entries): Correct comment.
8092 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
8093 unless we want one.
8094 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
8095 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
8096 with no section. Remove unnecessary parentheses.
8097
8098 2002-06-11 Tom Rix <trix@redhat.com>
8099
8100 * coffcode.h (coff_compute_section_file_positions): Add data
8101 section to AIX loader alignment check.
8102
8103 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
8104 alignment to 4 bytes.
8105 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
8106 power accessor macro.
8107 (do_shared_object_padding): Remove invalid assertion.
8108
8109 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
8110
8111 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
8112 for removed output sections.
8113
8114 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
8115
8116 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
8117 htab_alloc.
8118 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
8119
8120 2002-06-08 H.J. Lu <hjl@gnu.org>
8121
8122 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8123 work around a long long bug in gcc 2.96 on mips.
8124
8125 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8126
8127 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8128 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8129 Regenerate dependency lists.
8130 * Makefile.in: Regenerate.
8131 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8132 vax1knetbsd_vec to targ_selvecs.
8133 * configure.in: Add vax1knetbsd_vec.
8134 * configure: Regenerate.
8135 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8136 * vax1knetbsd.c: New file.
8137 * vaxnetbsd.c: Update copyright years.
8138 (TARGET_PAGE_SIZE): Set to 0x1000.
8139 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8140
8141 2002-06-08 Matt Thomas <matt@3am-software.com>
8142
8143 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8144
8145 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8146
8147 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8148
8149 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8150
8151 * Makefile.am: Run "make dep-am".
8152 * Makefile.in: Regenerate.
8153
8154 * armnetbsd.c: Replace CONST with const.
8155 * corefile.c: Likewise.
8156 * elf32-dlx.c: Likewise.
8157 * elf64-mips.c: Likewise.
8158 * mmo.c: Likewise.
8159 * ns32knetbsd.c: Likewise.
8160
8161 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8162 table is elf64-sparc.
8163
8164 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8165
8166 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8167 Fix RELA addends to get not shifted in the result. Don't do special
8168 handling of R_MIPS_64 for NewABI.
8169
8170 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8171
8172 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8173 (NAME(aout,slurp_reloc_table)): Likewise.
8174 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8175 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8176 (xcoff_write_archive_contents_big): Likewise.
8177 (xcoff_generate_rtinit): Likewise.
8178 (xcoff_generate_rtinit): Likewise, and check error return.
8179 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8180 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8181 (coff_get_normalized_symtab): Likewise.
8182 (coff_make_empty_symbol): Likewise.
8183 (bfd_coff_set_symbol_class): Likewise.
8184 * cofflink.c (coff_link_add_symbols): Likewise.
8185 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8186 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8187 (bfd_ecoff_write_accumulated_debug): Likewise.
8188 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8189 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8190 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8191 * ieee.c (do_with_relocs): Use bfd_zalloc.
8192 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8193 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8194 (NAME(aout,slurp_reloc_table)): Likewise.
8195 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8196 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8197 * som.c (som_build_and_write_symbol_table): Likewise.
8198 (som_slurp_string_table): Likewise.
8199 (som_slurp_symbol_table): Likewise.
8200 (som_bfd_ar_write_symbol_stuff): Likewise.
8201 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8202 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8203 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8204 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8205 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8206
8207 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8208
8209 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8210 "group" union.
8211 (elf_group_name): Update.
8212 (elf_group_id): Define.
8213 (bfd_elf_set_group_contents): Declare.
8214 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8215 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8216 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8217 that sym for the signature.
8218 (_bfd_elf_compute_section_file_positions): Don't call
8219 set_group_contents for "ld -r" case.
8220 (swap_out_syms): Use bfd_zalloc.
8221 * elflink.h (elf_link_add_archive_symbols): Likewise.
8222 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8223 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8224
8225 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8226
8227 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8228 relocs in opd for non-shared too.
8229
8230 2002-06-06 Jeffrey Law <law@redhat.com>
8231
8232 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8233 relocations.
8234
8235 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8236
8237 * merge.c: Include libiberty.h.
8238 * elf-strtab.c: Include libiberty.h.
8239
8240 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8241
8242 * peXXigen.c (pe_print_idata): Remove unused variable.
8243
8244 2002-06-06 David Heine <dlheine@tensilica.com>
8245
8246 * elf.c (assign_file_positions_for_segments): Remove unallocated
8247 sections from the section to segment mapping for PT_LOAD segments.
8248 Update comment about empty loadable segments.
8249
8250 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8251
8252 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8253 is within the .stabstr section.
8254
8255 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8256
8257 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8258 are "const PTR", not "const PTR *".
8259 (bfd_elf32_swap_symbol_in): Likewise.
8260 (bfd_elf64_swap_symbol_in): Likewise.
8261 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8262 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8263 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8264 (elf_link_add_object_symbols): Likewise.
8265 (elf_link_record_local_dynamic_symbol): Likewise.
8266 (elf_link_input_bfd): Likewise.
8267 (elf_gc_mark): Likewise.
8268 (elf_reloc_symbol_deleted_p): Likewise.
8269 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8270 (mn10200_elf_relax_delete_bytes): Likewise.
8271 (mn10200_elf_symbol_address_p): Likewise.
8272 (mn10200_elf_get_relocated_section_contents): Likewise.
8273 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8274 (mn10300_elf_relax_section): Likewise.
8275 (mn10300_elf_relax_delete_bytes): Likewise.
8276 (mn10300_elf_symbol_address_p): Likewise.
8277 (mn10300_elf_get_relocated_section_contents): Likewise.
8278 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8279 (elf32_h8_relax_delete_bytes): Likewise.
8280 (elf32_h8_symbol_address_p): Likewise.
8281 (elf32_h8_get_relocated_section_contents): Likewise.
8282 * elf32-hppa.c (get_local_syms): Likewise.
8283 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8284 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8285 * elf32-sh.c (sh_elf_relax_section): Likewise.
8286 (sh_elf_relax_delete_bytes): Likewise.
8287 (sh_elf_get_relocated_section_contents): Likewise.
8288 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8289 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8290 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8291 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8292 * elf64-ppc.c (get_local_syms): Likewise.
8293 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8294 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8295
8296 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8297
8298 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8299
8300 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8301
8302 * elf.c (group_signature): Swap in the whole symbol, and handle
8303 extracting section symbol names.
8304 (setup_group): Add comment.
8305 (set_group_contents): When called from objcopy or ld, arrange for
8306 section contents to be written. Write group member output section
8307 indices to allow objcopy to reorganize sections.
8308 (_bfd_elf_copy_private_section_data): Copy group info.
8309
8310 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8311 (bfd_elf32_swap_symbol_in): Update prototype.
8312 (bfd_elf64_swap_symbol_in): Likewise.
8313 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8314 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8315 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8316 (elf_link_add_object_symbols): Likewise.
8317 (elf_link_record_local_dynamic_symbol): Likewise.
8318 (elf_link_input_bfd): Likewise.
8319 (elf_gc_mark): Likewise.
8320 (elf_reloc_symbol_deleted_p): Likewise.
8321 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8322 (mn10200_elf_relax_delete_bytes): Likewise.
8323 (mn10200_elf_symbol_address_p): Likewise.
8324 (mn10200_elf_get_relocated_section_contents): Likewise.
8325 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8326 (mn10300_elf_relax_section): Likewise.
8327 (mn10300_elf_relax_delete_bytes): Likewise.
8328 (mn10300_elf_symbol_address_p): Likewise.
8329 (mn10300_elf_get_relocated_section_contents): Likewise.
8330 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8331 (elf32_h8_relax_delete_bytes): Likewise.
8332 (elf32_h8_symbol_address_p): Likewise.
8333 (elf32_h8_get_relocated_section_contents): Likewise.
8334 * elf32-hppa.c (get_local_syms): Likewise.
8335 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8336 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8337 * elf32-sh.c (sh_elf_relax_section): Likewise.
8338 (sh_elf_relax_delete_bytes): Likewise.
8339 (sh_elf_get_relocated_section_contents): Likewise.
8340 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8341 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8342 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8343 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8344 * elf64-ppc.c (get_local_syms): Likewise.
8345 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8346 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8347 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8348 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8349 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8350 * elf64-mips.c (mips_elf64_size_info): Likewise.
8351 * elf64-s390.c (s390_elf64_size_info): Likewise.
8352 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8353
8354 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8355
8356 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8357 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8358 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8359 _bfd_mips_elf_ignore_discarded_relocs.
8360 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8361
8362 2002-06-05 H.J. Lu <hjl@gnu.org>
8363
8364 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8365 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8366 the SEC_MERGE section.
8367
8368 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8369
8370 * coff-alpha.c: Update copyright date.
8371 * coff-mips.c: Likewise.
8372 * xcoff-target.h: Likewise.
8373
8374 * bfd-in.h: Remove "taken from the source" comment.
8375 * libbfd-in.h: Likewise.
8376 * libcoff-in.h: Likewise.
8377 * bfd-in2.h: Regenerate.
8378 * libbfd.h: Regenerate.
8379 * libcoff.h: Regenerate.
8380
8381 * elf.c (bfd_elf_discard_group): Return true.
8382 * elf-bfd.h (bfd_elf_discard_group): Declare.
8383 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8384 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8385 * bfd.c (bfd_discard_group): Define.
8386 * targets.c (struct bfd_target): Add _bfd_discard_group.
8387 (BFD_JUMP_TABLE_LINK): Here too.
8388 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8389 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8390 * aout-target.h (MY_bfd_discard_group): Define.
8391 * aout-tic30.c (MY_bfd_discard_group): Define.
8392 * binary.c (binary_bfd_discard_group): Define.
8393 * bout.c (b_out_bfd_discard_group): Define.
8394 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8395 * coffcode.h (coff_bfd_discard_group): Define.
8396 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8397 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8398 * i386msdos.c (msdos_bfd_discard_group): Define.
8399 * i386os9k.c (os9k_bfd_discard_group): Define.
8400 * ieee.c (ieee_bfd_discard_group): Define.
8401 * ihex.c (ihex_bfd_discard_group): Define.
8402 * mmo.c (mmo_bfd_discard_group): Define.
8403 * nlm-target.h (nlm_bfd_discard_group): Define.
8404 * oasys.c (oasys_bfd_discard_group): Define.
8405 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8406 * som.c (som_bfd_discard_group): Define.
8407 * srec.c (srec_bfd_discard_group): Define.
8408 * tekhex.c (tekhex_bfd_discard_group): Define.
8409 * versados.c (versados_bfd_discard_group): Define.
8410 * vms.c (vms_bfd_discard_group): Define.
8411 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8412 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8413 (aix5coff64_vec): Likewise.
8414 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8415
8416 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8417
8418 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8419 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8420 (elf32-sh64-com.lo): New dependency list.
8421 * Makefile.in: Regenerate.
8422 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8423 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8424 elf32-sh64-com.lo.
8425 * configure: Regenerate.
8426 * elf32-sh64.c (sh64_address_in_cranges)
8427 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8428 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8429 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8430 * elf32-sh64-com.c: ...here. New file.
8431
8432 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8433
8434 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8435 ATTRIBUTE_UNUSED on used params.
8436 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8437 before calling bfd_section_from_elf_index on local syms.
8438 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8439
8440 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8441
8442 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8443 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8444 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8445 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8446 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8447 * Makefile.in: Regenerate.
8448 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8449 (sh64-*-netbsd*): New targets.
8450 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8451 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8452 * configure: Regenerate.
8453 * elf32-sh64-nbsd.c: New file.
8454 * elf64-sh64-nbsd.c: New file.
8455 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8456 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8457 bfd_elf64_sh64lnbsd_vec.
8458
8459 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8460
8461 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8462 (bfd_section_from_shdr): Likewise. Set section name of group
8463 sections from signature.
8464 (group_signature): Split out from setup_group. Ensure symbol table
8465 is available.
8466 (bfd_elf_discard_group): New function.
8467 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8468 .gnu.linkonce* sections if they are members of a group.
8469 (set_group_contents): Set GRP_COMDAT flag.
8470 * section.c (bfd_discard_group): New function.
8471 * bfd-in.h (bfd_elf_discard_group): Declare.
8472 * bfd-in2.h: Regenerate.
8473 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8474 (elf_linkonce_p): Define.
8475
8476 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8477
8478 * elf.c (bfd_section_from_shdr): Make "name" const.
8479 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8480 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8481 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8482 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8483 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8484 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8485 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8486 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8487 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8488 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8489 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8490
8491 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8492
8493 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8494 ABI.
8495
8496 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8497
8498 * elf32-arc.c: Fix formatting.
8499 * elf32-arm.h: Likewise.
8500 * elf32-cris.c: Likewise.
8501 * elf32-dlx.c: Likewise.
8502 * elf32-hppa.c: Likewise.
8503 * elf32-i386.c: Likewise.
8504 * elf32-i386qnx.c: Likewise.
8505 * elf32-or32.c: Likewise.
8506 * elf32-s390.c: Likewise.
8507 * elf32-sh64.c: Likewise.
8508 * elf32-vax.c: Likewise.
8509 * elf32-xstormy16.c: Likewise.
8510 * elf64-alpha.c: Likewise.
8511 * elf64-mmix.c: Likewise.
8512 * elf64-ppc.c: Likewise.
8513 * elf64-s390.c: Likewise.
8514 * elf64-sh64.c: Likewise.
8515 * elf64-x86-64.c: Likewise.
8516
8517 2002-06-02 Richard Henderson <rth@redhat.com>
8518
8519 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8520 null when there are no got entries for a symbol.
8521 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8522 uninitialized variable warning.
8523
8524 2002-06-01 Richard Henderson <rth@redhat.com>
8525
8526 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8527 undefined symbols here.
8528 (elf64_alpha_relax_section): Do it here. Also test for not
8529 defined in the current module.
8530 (elf64_alpha_relocate_section_r): Split out of ...
8531 (elf64_alpha_relocate_section): ... here. Don't dereference
8532 NULL when looking up local got entries.
8533
8534 2002-06-01 Richard Henderson <rth@redhat.com>
8535
8536 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8537 symbols from JSR relaxation.
8538 (elf64_alpha_size_plt_section_1): New.
8539 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8540 (elf64_alpha_size_rela_got_1): ... here.
8541 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8542 (elf64_alpha_size_rela_got_section): ... here.
8543 (elf64_alpha_size_plt_section): New.
8544 (elf64_alpha_relax_section): Call them.
8545 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8546 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8547
8548 2002-06-01 Richard Henderson <rth@redhat.com>
8549
8550 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8551 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8552 in shared libraries. Fix DTPRELHI and TPRELHI value.
8553 (INSN_ADDQ, INSN_RDUNIQ): New.
8554 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8555 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8556 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8557 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8558 Handle GOTDTPREL and GOTTPREL relocations.
8559 (elf64_alpha_relax_gprelhilo): New.
8560 (elf64_alpha_relax_tls_get_addr): New.
8561 (elf64_alpha_relax_find_tls_segment): New.
8562 (elf64_alpha_relax_section): Handle TLS relocations.
8563 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8564 (elf64_alpha_check_relocs): Set it.
8565
8566 2002-06-01 Richard Henderson <rth@redhat.com>
8567
8568 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8569
8570 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8571 check; don't suppress dynamic relocs for non-allocated sections.
8572
8573 * elf64-alpha.c: Remove dead code.
8574
8575 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8576
8577 * bfd-in2.h: Regenerate.
8578 * libbfd.h: Regenerate.
8579 * po/SRC-POTFILES.in: Regenerate.
8580
8581 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8582 space for bss .plt.
8583
8584 2002-05-31 Graeme Peterson <gp@qnx.com>
8585
8586 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8587 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8588 Run "make dep-am".
8589 * Makefile.in: Regenerate.
8590 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8591 * configure.in: Add bfd_elf32_i386qnx_vec support.
8592 * configure: Regenerate.
8593 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8594 is_contained_by_filepos, and copy_private_bfd_data_p.
8595 * elf.c (assign_file_positions_for_segments): Call backend
8596 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8597 (IS_CONTAINED_BY_FILEPOS): Define.
8598 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8599 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8600 Fix non-K&R call to _bfd_error_handler.
8601 (_bfd_elf_copy_private_section_data): Use backend
8602 copy_private_bfd_data_p.
8603 * elf32-i386.c: Don't include elfxx-target.h when
8604 ELF32_I386_C_INCLUDED is defined.
8605 * elf32-i386qnx.c: New QNX elf backend file.
8606 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8607 elf_backend_is_contained_by_filepos, and
8608 elf_backend_do_copy_private_bfd_data.
8609 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8610
8611 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8612
8613 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8614 Move other similar defines to start of file.
8615
8616 2002-05-30 Tom Rix <trix@redhat.com>
8617
8618 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8619 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8620
8621 2002-05-30 Richard Henderson <rth@redhat.com>
8622
8623 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8624 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8625 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8626 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8627 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8628 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8629 n_local_got_entries to total_got_size and local_got_size.
8630 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8631 (alpha_got_entry_size): New.
8632 (elf64_alpha_relax_with_lituse): Use it.
8633 (elf64_alpha_relax_without_lituse): Likewise.
8634 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8635 (get_got_entry): New.
8636 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8637 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8638 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8639 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8640 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8641 (elf64_alpha_calc_got_offsets): Likewise.
8642 (alpha_dynamic_entries_for_reloc): New.
8643 (elf64_alpha_calc_dynrel_sizes): Use it.
8644 (elf64_alpha_size_dynamic_sections): Likewise.
8645 (elf64_alpha_relocate_section): Handle TLS relocations.
8646 * reloc.c: Add Alpha TLS relocations.
8647 * bfd-in2.h, libbfd.h: Rebuild.
8648
8649 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8650
8651 * peXXigen.c (pe_print_idata): Remove double printed
8652 import table lines; add Bound-To comment.
8653
8654 2002-05-29 Matt Thomas <matt@3am-software.com>
8655
8656 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8657 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8658 (elf32-vax.lo): New rule.
8659 * Makefile.in: Regenerate.
8660 * configure.in (bfd_elf32_vax_vec)
8661 (vaxnetbsd_vec): New vectors.
8662 * configure: Regenerate.
8663 * config.bfd (vax-*-netbsdelf*)
8664 (vax-*-netbsdaout*)
8665 (vax-*-netbsd*): New targets.
8666 * elf32-vax.c: New file.
8667 * reloc.c: Add VAX relocations.
8668 * bfd-in2.h: Regenerate.
8669 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8670
8671 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8672
8673 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8674 and bfd_elf32_bigarm_vec to targ_selvecs.
8675
8676 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8677
8678 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8679 with auto-imported symbols.
8680
8681 2002-05-29 Adam Nemet <anemet@lnxw.com>
8682
8683 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8684 sections only record bfd.
8685 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8686 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8687 * bfd-in2.h: Regenerate.
8688
8689 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8690
8691 * syms.c (_bfd_stab_section_find_nearest_line): Move
8692 declaration and initialisation of saw_line and saw_func out of
8693 for loop.
8694
8695 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8696
8697 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8698 (bfd_elf64_get_symbol_info): Define.
8699 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8700
8701 2002-05-29 Andrey Volkov <avolkov@transas.com>
8702
8703 * cpu-h8300.c: Make default h8300 machine first in machine list.
8704
8705 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8706
8707 * config.bfd: Added DLX configuraton.
8708 * Makefile.am: Added DLX configuraton.
8709 * configure.in: Added DLX configuraton.
8710 * archures.c: Add DLX architecture.
8711 * reloc.c: Add DLX relocs.
8712 * targets.c: Added DLX target vector.
8713 * configure: Regenerate.
8714 * Makefile.in: Regenreate.
8715 * bfd-in2.h: Regenreate.
8716 * elf32-dlx.c: New file: Support DLX target.
8717 * cpu-dlx.c: New file: Support DLX target.
8718
8719 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8720
8721 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8722
8723 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8724 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8725 strings to point inside function code sym string.
8726 (func_desc_adjust): Likewise.
8727 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8728
8729 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8730
8731 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8732 (elf64_x86_64_grok_psinfo): Added.
8733
8734 2002-05-24 TAMURA Kent <kent@netbsd.org>
8735
8736 * config.bfd: Add a target for i386-netbsdpe.
8737
8738 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8739
8740 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8741 and is_func_descriptor.
8742 (func_desc_adjust): Hide function code sym in shared libs unless
8743 there is a matching exported function descriptor sym.
8744
8745 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8746
8747 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8748 for symbols from SHF_TLS section.
8749 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8750 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8751 (map_sections_to_segments): Build PT_TLS segment if necessary.
8752 (assign_file_positions_for_segments): Likewise.
8753 (get_program_header_size): Account for PT_TLS segment.
8754 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8755 SEC_THREAD_LOCAL sections to STT_TLS.
8756 * reloc.c: Add 386 and IA-64 TLS relocs.
8757 * section.c (SEC_THREAD_LOCAL): Define.
8758 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8759 Remove.
8760 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8761 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8762 unconditionally.
8763 (struct elf_final_link_info): Add first_tls_sec.
8764 (elf_bfd_final_link): Set first_tls_sec.
8765 Compute elf_hash_table (info)->tls_segment.
8766 (elf_link_output_extsym): Handle STT_TLS symbols.
8767 (elf_link_input_bfd): Likewise.
8768 * syms.c (BSF_THREAD_LOCAL): Define.
8769 * bfd-in2.h: Rebuilt.
8770 * libbfd.h: Rebuilt.
8771 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8772 elf_i386_mkobject, elf_i386_object_p): New functions.
8773 (elf_howto_table): Add TLS relocs.
8774 (elf_i386_reloc_type_lookup): Support TLS relocs.
8775 (elf_i386_info_to_howto_rel): Likewise.
8776 (struct elf_i386_link_hash_entry): Add tls_type.
8777 (struct elf_i386_obj_tdata): New.
8778 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8779 New macros.
8780 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8781 (link_hash_newfunc): Clear tls_type.
8782 (elf_i386_check_relocs): Support TLS relocs.
8783 (elf_i386_gc_sweep_hook): Likewise.
8784 (allocate_dynrelocs): Likewise.
8785 (elf_i386_size_dynamic_sections): Likewise.
8786 (elf_i386_relocate_section): Likewise.
8787 (elf_i386_finish_dynamic_symbol): Likewise.
8788 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8789 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8790 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8791 want_tprel, want_dtpmod, want_dtprel.
8792 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8793 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8794 R_IA64_LTOFF_TPREL22.
8795 (elf_code_to_howto_index): Add TLS relocs.
8796 (elfNN_ia64_check_relocs): Support TLS relocs.
8797 (allocate_global_data_got): Account for TLS .got data.
8798 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8799 (elfNN_ia64_install_value): Supprt TLS relocs.
8800 (set_got_entry): Support TLS relocs.
8801 (elfNN_ia64_relocate_section): Likewise.
8802
8803 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8804
8805 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8806 BLX reloc round the relocation up rather than down.
8807 * coff-arm.c (coff_arm_relocate_section): Likewise.
8808
8809 2002-05-21 H.J. Lu (hjl@gnu.org)
8810
8811 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8812 definition.
8813
8814 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8815
8816 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8817 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8818
8819 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8820
8821 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8822 unresolved relocs.
8823 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8824
8825 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8826
8827 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8828 non-ELF targets.
8829
8830 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8831
8832 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8833 an error value.
8834 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8835 return with false on error.
8836 (elf_link_input_bfd): Check reloc_emitter return value.
8837
8838 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8839
8840 * config.bfd (armeb-*-netbsdelf*): New target.
8841
8842 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8843
8844 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8845 at the plt call stub.
8846
8847 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8848
8849 * cpu-mips.c (mips_compatible): Don't try to check machine
8850 compatibility.
8851
8852 2002-05-18 Tom Rix <trix@redhat.com>
8853
8854 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8855
8856 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8857
8858 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8859 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8860 we've already warned about an undefined symbol. Report more
8861 detail on reloc errors.
8862
8863 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8864
8865 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8866 * configure.in: Invoke AM_INSTALL_LIBBFD.
8867 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8868 (install_libbfd): .. New target.
8869 (uninstall_libbfd): Likewise.
8870 (install-bfdlibLTLIBRARIES): Likewise.
8871 (uninstall-bfdlibLTLIBRARIES): Likewise.
8872 (bfdlibdir): New.
8873 (bfdincludedir): New.
8874 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8875 * aclocal.m4: Regenerate.
8876 * configure: Regenerate.
8877 * Makefile.in: Regenerate.
8878
8879 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8880
8881 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8882 hash loop.
8883
8884 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8885
8886 * config.bfd: Add targets for sh64-linux (little endian and
8887 big endian).
8888
8889 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8890
8891 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8892 is located in the same section as the import table. Instead
8893 check, and if necessary load the section containing the thunk.
8894
8895 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8896
8897 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8898 bfd_bread.
8899 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8900 with bfd_bread.
8901
8902 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8903
8904 * aix5ppc-core.c: Warning fixes.
8905 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8906 * aout-target.h (MY_bfd_link_just_syms): Define.
8907 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8908 * bfd.c (bfd_link_just_syms): Define.
8909 * binary.c (binary_bfd_link_just_syms): Define.
8910 * bout.c (b_out_bfd_link_just_syms): Define.
8911 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8912 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8913 * coffcode.h (coff_bfd_link_just_syms): Define.
8914 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8915 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8916 (_bfd_elf_link_just_syms): Declare.
8917 * elf.c (_bfd_elf_link_just_syms): New function.
8918 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8919 sections haven't already been discarded by the linker.
8920 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8921 sections and SEC_MERGE sections.
8922 (elf_bfd_discard_info): Similarly here.
8923 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8924 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8925 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8926 * ieee.c (ieee_bfd_link_just_syms): Define.
8927 * ihex.c (ihex_bfd_link_just_syms): Define.
8928 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8929 (_bfd_generic_link_just_syms): Declare.
8930 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8931 * linker.c (_bfd_generic_link_just_syms): New function.
8932 * mmo.c (mmo_bfd_link_just_syms): Define.
8933 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8934 * oasys.c (oasys_bfd_link_just_syms): Define.
8935 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8936 * som.c (som_bfd_link_just_syms): Define.
8937 * srec.c (srec_bfd_link_just_syms): Define.
8938 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8939 (BFD_JUMP_TABLE_LINK): And here.
8940 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8941 * versados.c (versados_bfd_link_just_syms): Define.
8942 * vms.c (vms_bfd_link_just_syms): Define.
8943 * libbfd.h: Regenerate.
8944 * bfd-in2.h: Regenerate.
8945
8946 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8947
8948 * elf32-mips.c: Remove superfluous definitions copied from
8949 elfxx-mips.c.
8950 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8951 SGIish vectors to check the special case.
8952 (mips_elf_hi16_reloc): Fix comment.
8953 (mips_elf_got16_reloc): Likewise.
8954 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8955 (elf_reloc_map): Code cleanup.
8956 (mips_reloc_map): Add comment.
8957 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8958 (mips_elf32_rtype_to_howto): Likewise.
8959 (mips_elf32_discard_info): Likewise.
8960 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8961 lead to IRIX compatibility now.
8962
8963 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8964
8965 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8966
8967 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8968
8969 * config.bfd (shle-*-netbsdelf*): Add target which includes
8970 sh64 support.
8971
8972 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8973
8974 * configure.in: Revert 2002-04-07. Instead, auto-configure
8975 HAVE_ST_C_IMPL.
8976 * configure: Regenerate.
8977 * config.in: Regenerate.
8978 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8979 or AIX_5_CORE.
8980
8981 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8982
8983 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8984 corefiles as well.2
8985 * configure: Regenerate.
8986
8987 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8988
8989 * Makefile.am (install-data-local): Install headers to
8990 $(exec_prefix)/include.
8991 * Makefile.in: Regenerate.
8992
8993 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8994 Daniel Jacobowitz <drow@mvista.com>
8995
8996 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8997 map BFD_RELOC_RVA.
8998
8999 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
9000
9001 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
9002 hppa*-*-openbsd*): New targets.
9003 * configure.in (alpha*-*-openbsd*): Set COREFILE.
9004 * configure: Regenerate.
9005
9006 2002-05-10 Tom Rix <trix@redhat.com>
9007
9008 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
9009 xcoff64_ppc_relocate_section.
9010 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
9011 * libxcoff.h: Common xcoff_reloc_type function declaration.
9012
9013 2002-05-10 Alan Modra <amodra@bigpond.net.au>
9014
9015 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
9016 added in 2002-05-09 commit.
9017
9018 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
9019 don't look for stubs on all undefined syms.
9020
9021 2002-05-09 Alan Modra <amodra@bigpond.net.au>
9022
9023 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
9024 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
9025 pcrel_offset.
9026
9027 * elf32-i386.c (elf_howto_table): Comments.
9028 (elf_i386_relocate_section): Handle more relocs for relocatable
9029 linking and against SEC_MERGE sections.
9030
9031 2002-05-08 Alan Modra <amodra@bigpond.net.au>
9032
9033 * elf32-ppc.c (ppc_elf_create_got): New function.
9034 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
9035 _bfd_elf_create_dynamic_sections. Correct .plt flags.
9036 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
9037 _bfd_elf_create_got_section.
9038
9039 2002-05-07 Alan Modra <amodra@bigpond.net.au>
9040
9041 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
9042 * elfxx-target.h (elf_backend_rela_normal): Define.
9043 (elfNN_bed): Init rela_normal.
9044 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
9045 for section symbols here if rela_normal. Simplify abs section test.
9046 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
9047 return immediately. Remove code handling relocatable linking.
9048 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
9049 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9050 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9051 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
9052 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9053 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9054 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
9055 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9056 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9057 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
9058 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9059 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9060 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9061 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
9062 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
9063 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9064 * elf-m10200.c (elf_backend_rela_normal): Define.
9065 * elf-m10300.c (elf_backend_rela_normal): Define.
9066 * elf32-fr30.c (elf_backend_rela_normal): Define.
9067 * elf32-i370.c (elf_backend_rela_normal): Define.
9068 * elf32-i860.c (elf_backend_rela_normal): Define.
9069 * elf32-m68k.c (elf_backend_rela_normal): Define.
9070 * elf32-mcore.c (elf_backend_rela_normal): Define.
9071 * elf32-openrisc.c (elf_backend_rela_normal): Define.
9072 * elf32-ppc.c (elf_backend_rela_normal): Define.
9073 * elf32-s390.c (elf_backend_rela_normal): Define.
9074 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
9075 * elf64-ppc.c (elf_backend_rela_normal): Define.
9076 * elf64-s390.c (elf_backend_rela_normal): Define.
9077 * elf64-x86-64.c (elf_backend_rela_normal): Define.
9078 * elfxx-ia64.c (elf_backend_rela_normal): Define.
9079 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
9080 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
9081
9082 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
9083
9084 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
9085 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
9086
9087 2002-05-06 Alan Modra <amodra@bigpond.net.au>
9088
9089 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
9090 when not relocatable. Fix reloc_emitter call for K&R.
9091
9092 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9093
9094 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
9095 reloading local sym addend mistakenly removed in 2002-05-01 change.
9096
9097 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
9098 (read_abbrevs): Change "offset" param to bfd_vma.
9099 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
9100 Change "abbrev_offset" to bfd_vma.
9101 (read_indirect_string): Use correct conversion chars in error
9102 message format string, cast bfd_vma's to unsigned long.
9103 (read_abbrevs): Likewise.
9104 (read_attribute_value): Likewise.
9105 (decode_line_info): Likewise.
9106 (scan_unit_for_functions): Likewise.
9107 (parse_comp_unit): Likewise.
9108
9109 2002-05-04 Tom Rix <trix@redhat.com>
9110
9111 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
9112 (coff_swap_reloc_out): Same.
9113 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
9114 (xcoff_swap_reloc_out): Same.
9115 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
9116 case some 16 bit relocs. Add reloc value to output.
9117 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
9118 R_RBR. Improve names.
9119 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
9120 (bfd_xcoff_backend_data): Update with new reloc swap names.
9121 (bfd_pmac_xcoff_backend_data) : Same.
9122 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9123 (xcoff64_swap_reloc_out): Same.
9124 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9125 R_POS. Add reloc value to output.
9126 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9127 bit R_RBR. Improve names, masks.
9128 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9129 (bfd_xcoff_backend_data): Update with new reloc swap names.
9130 (bfd_xcoff_aix5_backend_data) : Same.
9131
9132 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9133
9134 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9135 bfd_count top_index, input_list, all_local_syms.
9136 (elf32_hppa_setup_section_lists): New function, split from
9137 elf32_hppa_size_stubs.
9138 (elf32_hppa_next_input_section): Likewise.
9139 (group_sections): Likewise.
9140 (get_local_syms): Likewise.
9141 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9142 stubs on undefined syms too.
9143 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9144 Only access htab elf fields when we have an elf hash table.
9145 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9146 (elf32_hppa_next_input_section): Declare.
9147
9148 2002-05-04 Bob Byrnes <byrnes@curl.com>
9149
9150 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9151 _bfd_new_bfd.
9152
9153 2002-05-03 H.J. Lu (hjl@gnu.org)
9154
9155 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9156 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9157 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9158 to hide a global symbol.
9159 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9160 forced_local to true.
9161
9162 2002-05-02 Richard Henderson <rth@redhat.com>
9163
9164 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9165 vs SHN_UNDEF to zero.
9166
9167 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9168
9169 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9170 16 bit reloc.
9171 <R_PPC64_SECTOFF_DS>: Likewise.
9172 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9173 SECTOFF reloc.
9174 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9175 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9176 SECTOFF reloc.
9177
9178 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9179 (ppc64_elf_ha_reloc): New function.
9180 (ppc64_elf_brtaken_reloc): New function.
9181 (ppc64_elf_sectoff_reloc): New function.
9182 (ppc64_elf_sectoff_ha_reloc): New function.
9183 (ppc64_elf_toc_reloc): New function.
9184 (ppc64_elf_toc_ha_reloc): New function.
9185 (ppc64_elf_toc64_reloc): New function.
9186 (ppc64_elf_unhandled_reloc): New function.
9187 (ppc64_elf_howto_raw): Use the above.
9188 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9189 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9190 <R_PPC64_SECTOFF_DS>: Likewise.
9191 (IS_ABSOLUTE_RELOC): Update.
9192 (struct ppc_link_hash_table): Add have_undefweak.
9193 (ppc64_elf_link_hash_table_create): Init.
9194 (func_desc_adjust): Set have_undefweak.
9195 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9196 add the .sfpr blr when have_undefweak.
9197 (ppc64_elf_setup_section_lists): Check hash table flavour.
9198 (ppc64_elf_next_input_section): Move output_section->owner test to
9199 ppc64elf.em.
9200 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9201 and relocatable test. Return TOCstart and don't set elf_gp.
9202 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9203 offset calculation. Add assert on weak sym branch tweaks.
9204 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9205 (ppc64_elf_toc): Declare.
9206 (ppc64_elf_next_input_section): Update.
9207
9208 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9209
9210 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9211 file_name.
9212
9213 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9214
9215 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9216 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9217 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9218 call branches. Correct undefined weak destination.
9219 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9220 .sfpr, and correct case where either only savef* or restf* is
9221 needed.
9222
9223 Long branch stubs, multiple stub sections.
9224 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9225 (ppc64_elf_next_input_section): Declare.
9226 * elf64-ppc.c: Move linker-only prototypes.
9227 (STUB_SUFFIX): Define.
9228 (enum ppc_stub_type): New.
9229 (struct ppc_stub_hash_entry): New.
9230 (struct ppc_branch_hash_entry): New.
9231 (struct ppc_link_hash_entry): Add stub_cache, oh.
9232 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9233 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9234 Rename plt_overflow to stub_error.
9235 (ppc_stub_hash_lookup): Define.
9236 (ppc_branch_hash_lookup): Define.
9237 (stub_hash_newfunc): New function.
9238 (branch_hash_newfunc): New function.
9239 (link_hash_newfunc): Init new fields.
9240 (ppc64_elf_link_hash_table_create): Likewise.
9241 (ppc64_elf_link_hash_table_free): New function.
9242 (ppc_stub_name): New function.
9243 (ppc_get_stub_entry): New function.
9244 (ppc_add_stub): New function.
9245 (create_linkage_sections): Use bfd_make_section_anyway. Create
9246 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9247 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9248 and set up for plt call stubs. Link func and func desc syms.
9249 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9250 (func_desc_adjust): Avoid hash lookup when func desc sym available
9251 via shortcut, and set links when processing.
9252 (ppc64_elf_hide_symbol): Likewise.
9253 (allocate_dynrelocs): Don't allocate stub section here.
9254 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9255 Remove sstub code.
9256 (ppc_type_of_stub): New function.
9257 (build_one_stub): Delete.
9258 (ppc_build_one_stub): New function.
9259 (ppc_size_one_stub): New function.
9260 (ppc64_elf_setup_section_lists): New function.
9261 (ppc64_elf_next_input_section): New function.
9262 (group_sections): New function.
9263 (get_local_syms): New function.
9264 (ppc64_elf_size_stubs): Rewrite.
9265 (ppc64_elf_build_stubs): Rewrite.
9266 (ppc64_elf_relocate_section): Look up stub entry for REL24
9267 relocs. Don't propagate REL14* to dynamic objects. Look for long
9268 branch stubs if REL14* or REL24 relocs won't reach.
9269 (bfd_elf64_bfd_link_hash_table_free): Define.
9270
9271 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9272
9273 * config.bfd: Add support for powerpc-*-windiss.
9274
9275 2002-04-30 Tom Rix <trix@redhat.com>
9276
9277 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9278 symbol names into the hash table.
9279
9280 2002-04-28 Tom Rix <trix@redhat.com>
9281
9282 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9283 calulating relocations.
9284 (xcoff_complain_overflow) : Function table for relocation errors.
9285 (xcoff_ppc_relocate_section): Use relocation and complain function
9286 tables.
9287 (xcoff_complain_overflow_unsigned_func): New complain function.
9288 (xcoff_complain_overflow_signed_func): Same.
9289 (xcoff_complain_overflow_bitfield_func): Same.
9290 (xcoff_complain_overflow_dont_func): Same.
9291 (xcoff_reloc_type_crel): New recot function.
9292 (xcoff_reloc_type_br): Same.
9293 (xcoff_reloc_type_ba): Same.
9294 (xcoff_reloc_type_toc): Same.
9295 (xcoff_reloc_type_rel): Same.
9296 (xcoff_reloc_type_neg): Same.
9297 (xcoff_reloc_type_pos): Same.
9298 (xcoff_reloc_type_fail): Same.
9299 (xcoff_reloc_type_noop): Same.
9300 * libxcoff.h : Declare common parts for xcoff64.
9301 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9302 and complain function tables.
9303
9304 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9305
9306 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9307 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9308
9309 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9310
9311 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9312 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9313
9314 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9315 same as the output before calling elf_link_input_bfd.
9316
9317 * coffcode.h (coff_compute_section_file_positions): Set
9318 section_tail after shuffling section list.
9319
9320 2002-04-24 Christian Groessler <chris@groessler.org>
9321
9322 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9323 addresses are 23bit with a special layout, not plain 32bit
9324 values. Prevent relocation of immediate values.
9325
9326 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9327
9328 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9329 MIPS-16 ASE flags are set, print something to indicate that.
9330
9331 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9332
9333 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9334 under which a plt call stub is used.
9335 (final_link_relocate): Similarly.
9336 (allocate_plt_static): Clear h-plabel except when plt entry is
9337 exclusively used for a plabel.
9338 (allocate_dynrelocs): Use the above to simplify plt sizing.
9339 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9340 (elf32_hppa_link_hash_table_create): Init.
9341 (BL22_RP): Define.
9342 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9343 (elf32_hppa_check_relocs): Set has_22bit_branch.
9344
9345 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9346 (final_link_relocate): Likewise.
9347
9348 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9349
9350 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9351 search table if some FDE is DW_EH_PE_aligned encoded either.
9352 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9353
9354 2002-04-22 Richard Smith <richard@ex-parrot.com>
9355 Jakub Jelinek <jakub@redhat.com>
9356
9357 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9358 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9359 encoded personality.
9360 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9361 for CIE/FDE removal.
9362
9363 2002-04-20 Tom Rix <trix@redhat.com>
9364
9365 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9366
9367 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9368
9369 * archures.c (bfd_lookup_arch): Move the list order comment..
9370 (struct bfd_arch_info): ..to where it belongs.
9371 * bfd-in2.h: Regenerate.
9372
9373 * archures.c (bfd_lookup_arch): Add comment on list order.
9374 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9375 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9376 is always at head of list.
9377
9378 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9379
9380 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9381 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9382 definition of these functions for ARM_WINCE builds as they are
9383 not used.
9384 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9385 for ARM_WINCE builds.
9386
9387 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9388
9389 * coff-arm.c (bfd_arm_process_before_allocation):
9390
9391 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9392
9393 * cpu-sh.c (scan_mach): Delete.
9394 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9395 (bfd_sh_arch): Likewise.
9396
9397 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9398
9399 * ihex.c (ihex_write_object_contents): Fix check for records
9400 crossing 64K boundaries.
9401
9402 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9403
9404 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9405 type rather than just assuming entries are ELF.
9406 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9407 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9408 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9409 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9410 rather than elf_link_hash_entry.
9411
9412 2002-04-15 Richard Henderson <rth@redhat.com>
9413
9414 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9415 n32 binaries.
9416
9417 2002-04-15 Michael Snyder <msnyder@redhat.com>
9418
9419 * opncls.c (bfd_close): Write contents if writeable.
9420 Minor formatting tidy-ups.
9421
9422 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9423
9424 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9425
9426 2002-04-12 Michael Snyder <msnyder@redhat.com>
9427
9428 * bfd-in.h (bfd_get_section_lma): New access macro.
9429 Minor white-space fix-up.
9430
9431 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9432
9433 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9434 header pad.
9435
9436 2002-04-09 DJ Delorie <dj@redhat.com>
9437
9438 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9439
9440 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9441
9442 * coffcode.h (coff_read_word): New.
9443 (coff_compute_checksum): New.
9444 (coff_apply_checksum): New.
9445 (coff_write_object_contents): Call coff_apply_checksum () to
9446 apply checksum to PE image.
9447
9448 2002-04-08 Randolph Chung <tausq@debian.org>
9449
9450 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9451 (elf32_hppa_final_link): Split out sorting logic to..
9452 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9453 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9454
9455 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9456
9457 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9458 pattern.
9459 * configure: Re-generate.
9460
9461 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9462
9463 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9464 is greater or equal to 4.3.3.
9465 * configure: Regenerate.
9466 Fix PR gdb/344.
9467
9468 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9469
9470 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9471 R_CRIS_32_PCREL>: Fix typo in name.
9472 (cris_elf_check_relocs): Always create .rela.got here when
9473 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9474 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9475 assume it's created.
9476
9477 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9478
9479 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9480 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9481 define.
9482 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9483 * bfd.c (bfd_link_hash_table_free): Define.
9484 * binary.c (binary_bfd_link_hash_table_free): Define.
9485 * bout.c (b_out_bfd_link_hash_table_free): Define.
9486 * coff-rs6000.c (rs6000coff_vec): Include
9487 _bfd_generic_link_hash_table_free.
9488 (pmac_xcoff_vec): Likewise.
9489 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9490 (aix5coff64_vec): Likewise.
9491 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9492 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9493 (bfd_elf32_bfd_link_hash_table_free): Define.
9494 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9495 (bfd_elf32_bfd_link_hash_table_free): Define.
9496 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9497 define.
9498 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9499 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9500 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9501 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9502 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9503 (_bfd_generic_link_hash_table_free): Add prototype.
9504 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9505 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9506 * linker.c (_bfd_generic_link_hash_table_free): New function.
9507 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9508 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9509 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9510 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9511 * som.c (som_bfd_link_hash_table_free): Define.
9512 * srec.c (srec_bfd_link_hash_table_free): Define.
9513 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9514 * versados.c (versados_bfd_link_hash_table_free): Define.
9515 * vms.c (vms_bfd_link_hash_table_free): New function.
9516 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9517
9518 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9519 instead of bfd_alloc.
9520 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9521 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9522 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9523 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9524 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9525 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9526 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9527 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9528 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9529 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9530 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9531 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9532 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9533 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9534 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9535 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9536 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9537 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9538 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9539 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9540 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9541 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9542 * m68klinux.c (linux_link_hash_table_create): Likewise.
9543 * sparclinux.c (linux_link_hash_table_create): Likewise.
9544 * sunos.c (sunos_link_hash_table_create): Likewise.
9545 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9546
9547 * targets.c: Add _bfd_link_hash_table_free to xvec.
9548
9549 * bfd-in2.h: Regenerate.
9550 * libbfd.h: Regenerate.
9551 * libcoff.h: Regenerate.
9552
9553 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9554
9555 * dep-in.sed: Cope with absolute paths.
9556 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9557 Run "make dep-am".
9558 * Makefile.in: Regenerate.
9559 * coff-arm.c: Fix copyright date.
9560 * cpu-h8300.c: Likewise.
9561 * cpu-i370.c: Likewise.
9562 * cpu-s390.c: Likewise.
9563 * cpu-mips.c: Likewise.
9564 * po/SRC-POTFILES.in: Regenerate.
9565
9566 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9567
9568 * Makefile.am: Add elfxx-mips.c to the known backends.
9569 (elf32-mips.lo): remove dependency to coff/external.h.
9570 * Makefile.in: Regenerate.
9571 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9572 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9573 accordingly.
9574 * configure: Regenerate.
9575 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9576 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9577 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9578 MIPS specific backend functions.
9579 * elf32-mips.c: Moved most code to elfxx-mips.c.
9580 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9581 static.
9582 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9583 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9584 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9585 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9586 interface to allow selection of the right REL or RELA howto table.
9587 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9588 static. Let it refuse n32 objects.
9589 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9590 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9591 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9592 (elf32_mips_ignore_discarded_relocs): Rename from
9593 _bfd_elf32_mips_ignore_discarded_relocs.
9594 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9595 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9596 (elf_mips_howto_table_rela): Remove.
9597 * elf64-mips.c: Moved most code to elfxx-mips.c.
9598 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9599 (mips_elf64_rtype_to_howto): New function.
9600 (mips_elf64_object_p): Likewise.
9601 (elf64_mips_irix_compat): Likewise.
9602 * elfxx-mips.c: New file containing common code merged together from
9603 elf32-mips.c and elf64-mips.c.
9604 * elfxx-mips.h: New file containing MIPS specific prototypes from
9605 elf-bfd.h.
9606 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9607 elf_backend_mips_rtype_to_howto.
9608
9609 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9610
9611 * srec.c (MAXCHUNK, Chunk): Revise comments.
9612 (srec_write_record): Correct buffer size.
9613 (srec_write_header): Do without intermediate buffer.
9614 (srec_write_section): Validate Chunk.
9615 (srec_write_terminator): Pass NULL instead of dummy buffer.
9616 (srec_write_symbols): Pass file and symbol names directly to
9617 bfd_bwrite so sprintf won't overflow buffer.
9618
9619 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9620
9621 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9622 PC relative relocs against hidden symbols.
9623 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9624
9625 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9626
9627 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9628 LMAs, loop over segments until p_vaddr and p_memsz specify an
9629 extent enclosing the section.
9630
9631 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9632
9633 * ihex.c (ihex_write_object_contents): Do not allow records to
9634 cross a 64K boundary - wrap if necessary.
9635
9636 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9637
9638 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9639 which caused the returned LWP ID to always be 0.
9640
9641 2002-04-01 Richard Henderson <rth@redhat.com>
9642
9643 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9644 (elf32_sparc_relocate_section): Use it to figure out when to
9645 initialize .got entries.
9646 * elf64-sparc.c: Similarly.
9647
9648 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9649
9650 * linker.c (link_action): Ignore duplicate warning syms.
9651 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9652 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9653 (elf_adjust_dynamic_symbol): Likewise.
9654 (elf_export_symbol): Likewise.
9655 (elf_link_find_version_dependencies): Likewise.
9656 (elf_link_assign_sym_version): Likewise.
9657 (elf_link_sec_merge_syms): Likewise.
9658 (elf_link_output_extsym): Likewise.
9659 (elf_gc_sweep_symbol): Likewise.
9660 (elf_gc_propagate_vtable_entries_used): Likewise.
9661 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9662 (elf_gc_allocate_got_offsets): Likewise.
9663 (elf_collect_hash_codes): Likewise.
9664 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9665 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9666 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9667 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9668 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9669 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9670 (elf_cris_discard_excess_dso_dynamics): Likewise.
9671 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9672 (mark_PIC_calls): Likewise.
9673 (allocate_plt_static): Likewise.
9674 (allocate_dynrelocs): Likewise.
9675 (readonly_dynrelocs): Likewise.
9676 * elf32-i386.c (allocate_dynrelocs): Likewise.
9677 (readonly_dynrelocs): Likewise.
9678 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9679 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9680 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9681 (mips_elf_sort_hash_table_f): Likewise.
9682 (mips_elf_check_mips16_stubs): Likewise.
9683 * elf32-s390.c (allocate_dynrelocs): Likewise.
9684 (readonly_dynrelocs): Likewise.
9685 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9686 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9687 (xstormy16_relax_plt_realloc): Likewise.
9688 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9689 (elf64_alpha_output_extsym): Likewise.
9690 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9691 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9692 (mips_elf64_check_mips16_stubs): Likewise.
9693 (mips_elf64_output_extsym): Likewise.
9694 * elf64-ppc.c (func_desc_adjust): Likewise.
9695 (allocate_dynrelocs): Likewise.
9696 (readonly_dynrelocs): Likewise.
9697 * elf64-s390.c (allocate_dynrelocs): Likewise.
9698 (readonly_dynrelocs): Likewise.
9699 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9700 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9701 (readonly_dynrelocs): Likewise.
9702 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9703 * aoutx.h (aout_link_write_other_symbol): Likewise.
9704 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9705 (_bfd_coff_write_global_sym): Likewise.
9706 * i386linux.c (linux_tally_symbols): Likewise.
9707 * m68klinux.c (linux_tally_symbols): Likewise.
9708 * sparclinux.c (linux_tally_symbols): Likewise.
9709 * pdp11.c (aout_link_write_other_symbol): Likewise.
9710 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9711 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9712 (xcoff_write_global_symbol): Likewise.
9713
9714 * cofflink.c (_bfd_coff_final_link): Formatting.
9715 * cpu-mips.c (mips_compatible): Make static, prototype.
9716 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9717 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9718 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9719 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9720 (mips_elf64_final_link): Likewise.
9721 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9722 prototype.
9723
9724 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9725
9726 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9727 (SWAP_OUT_RELOC_OFFSET): Define.
9728
9729 2002-03-27 Gregory Steuck <greg@nest.cx>
9730
9731 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9732 terminating NULL if empty symbol table.
9733 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9734
9735 2002-03-26 H.J. Lu (hjl@gnu.org)
9736
9737 * elflink.h (elf_link_input_bfd): Revert the last change since
9738 the gcc exception handling isn't fixed yet.
9739
9740 2002-03-26 H.J. Lu (hjl@gnu.org)
9741
9742 * elflink.h (elf_link_input_bfd): Complain about relocations
9743 against local symbols in discarded sections.
9744
9745 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9746
9747 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9748
9749 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9750
9751 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9752 section file offset for !SEC_LOAD sections.
9753
9754 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9755
9756 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9757 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9758
9759 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9760
9761 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9762 Whitespace changes.
9763 * archive.c: Update copyright date.
9764 * bfd-in2.h: Regenerate.
9765 * libbfd.h: Regenerate.
9766 * Makefile.am: Run "make dep-am"
9767 * Makefile.in: Regenerate.
9768 * po/SRC-POTFILES.in: Regenerate.
9769
9770 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9771
9772 * dwarf2.c (struct funcinfo): Move up.
9773 (lookup_address_in_function_table): New argument function_ptr.
9774 Set it.
9775 (lookup_address_in_line_table): New argument function. If function
9776 is non-NULL, use it to handle ``addr'' before the first line note of
9777 the function.
9778 (comp_unit_find_nearest_line): Update and swap calls to
9779 lookup_address_in_function_table and lookup_address_in_line_table.
9780 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9781 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9782
9783 2002-03-20 Tom Rix <trix@redhat.com>
9784
9785 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9786 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9787 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9788
9789 2002-03-19 Tom Rix <trix@redhat.com>
9790
9791 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9792 dynamic objects in archives.
9793
9794 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9795
9796 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9797 STT_NOTYPE symbols to STT_OBJECT.
9798
9799 2002-03-18 Jan Hubicka <jh@suse.cz>
9800
9801 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9802
9803 2002-03-18 Tom Rix <trix@redhat.com>
9804
9805 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9806 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9807 * coff-rs6000 (do_pad) : New function for archive padding.
9808 (do_copy) : New function for object file copying in archives.
9809 (do_shared_object_padding) : New function for padding shared
9810 objects to their text section alignment in archives.
9811 (bfd_xcoff_ar_achive_set_magic) : Stub.
9812 (xcoff_write_armap_big) : Use do_copy and do_pad.
9813 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9814 do_copy and do_pad.
9815 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9816 bfd_xcoff_magic_number.
9817 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9818 fop.
9819 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9820 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9821 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9822 * rs6000-core.c : Update copyright date.
9823 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9824 csectpp.
9825 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9826 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9827 (coff_set_flags) : Use bfd_xcoff_magic_number.
9828 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9829 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9830 * Makefile.am : Same.
9831 * config.bfd : Same.
9832 * targets.c : Same.
9833 * configure : Regnerate.
9834 * Makefile.in : Same.
9835 * bfd-in2.h : Same.
9836
9837 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9838
9839 * po/fr.po: Updated version.
9840
9841 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9842
9843 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9844 * libbfd.h: Regenerate.
9845 * archive.c (coff_write_armap): Pass on failures from
9846 bfd_write_bigendian_4byte_int.
9847
9848 2002-03-14 H.J. Lu <hjl@gnu.org>
9849
9850 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9851 error to bfd_error_nonrepresentable_section for reinit_array
9852 section in DSO.
9853
9854 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9855
9856 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9857 OR it in rather than replacing previously selected flags.
9858
9859 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9860 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9861
9862 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9863
9864 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9865 (N): Use the above.
9866 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9867 ensure reloc size matches before calling elf_link_input_bfd.
9868 Add an assert to check reloc size when counting output relocs.
9869
9870 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9871
9872 * mmo.c (mmo_get_loc): Return NULL rather than false.
9873
9874 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9875
9876 * po/fr.po: Updated version.
9877
9878 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9879
9880 * archures.c (bfd_default_compatible): Test bits_per_word.
9881 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9882 bfd_default_compatible.
9883 * cpu-i370.c (i370_compatible): Likewise.
9884 * cpu-sparc.c (sparc_compatible): Likewise.
9885 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9886
9887 * elflink.h: Formatting fixes.
9888 (elf_link_output_extsym): Merge undefined and undef weak cases.
9889
9890 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9891 when word size of input matches output word size.
9892
9893 2002-03-12 Andreas Jaeger <aj@suse.de>
9894
9895 * cpu-i386.c (i386_compatible): New. Use it instead of
9896 bfd_default_compatible.
9897
9898 2002-03-07 H.J. Lu (hjl@gnu.org)
9899
9900 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9901 as the type for bfd_reloc_val.
9902
9903 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9904
9905 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9906 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9907 (elf_hppa_final_link_relocate): Correct relocations for indirect
9908 references to local data through the DLT. Fix .opd creation for
9909 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9910 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9911 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9912 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9913 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9914 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9915 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9916
9917 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9918
9919 * merge.c (_bfd_merge_sections): Don't segfault if there
9920 is nothing to merge due to GC.
9921
9922 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9923
9924 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9925 symbols that have been forced local.
9926
9927 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9928 to output forced local syms for non-shared link.
9929 (elf_link_output_extsym): Tweak condition for calling backend
9930 adjust_dynamic_symbol so that previous behaviour is kept.
9931 Whitespace changes throughout file.
9932
9933 2002-03-04 H.J. Lu <hjl@gnu.org>
9934
9935 * elf.c (bfd_section_from_shdr): Handle special sections,
9936 .init_array, .fini_array and .preinit_array.
9937 (elf_fake_sections): Likewise.
9938
9939 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9940 DT entry only if the section is in output for .init_array,
9941 .fini_array and .preinit_array. Complain about .preinit_array
9942 section in DSO.
9943 (elf_bfd_final_link): Warn zero size for .init_array,
9944 .fini_array and .preinit_array sections.
9945
9946 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9947 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9948 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9949 .preinit_array.
9950
9951 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9952
9953 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9954 * configure: Regenerate.
9955
9956 2002-03-02 Tom Rix <trix@redhat.com>
9957
9958 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9959 symbolic equiv.
9960 * coff-rs6000.c (xcoff_howto_table): Same.
9961
9962 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9963
9964 * elflink.h (size_dynamic_sections): If section named
9965 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9966 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9967 ".init_array" and ".fini_array".
9968 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9969 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9970 DT_FINI_ARRAY.
9971
9972 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9973
9974 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9975 dynsyms.
9976
9977 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9978
9979 * elf64-hppa.h: Update copyright date.
9980
9981 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9982 (ppc64_elf_relocate_section): Don't generate power4 style branch
9983 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9984
9985 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9986
9987 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9988 last patch.
9989 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9990
9991 2002-02-21 Andreas Jaeger <aj@suse.de>
9992
9993 * elf64-x86-64.c: Major rework that introduces all recent changes
9994 to the x86-64 backend. Get a closer match to elf32-i386.
9995 (struct elf64_x86_64_dyn_relocs): Rename from
9996 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9997 all users.
9998 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9999 sections.
10000 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
10001 remove casts, initialize new hash members.
10002 (create_got_section): New.
10003 (elf64_x86_64_create_dynamic_sections): New.
10004 (elf64_x86_64_copy_indirect_symbol): New.
10005 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
10006 relocs, .got or .relgot here but do it in allocate_dynrelocs.
10007 Reference count possible .plt and .got entries. Don't test input
10008 section SEC_READONLY here to try to avoid copy relocs, and keep
10009 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
10010 DF_TEXTREL here. Delay setting of variables until needed. Cache
10011 pointer to "sreloc" section in elf_section_data. Tweak condition
10012 under which .got created. Report files with bad relocation
10013 section names.
10014 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
10015 Reference count possible .plt entries. Don't deallocate .got and
10016 .relgot space here.
10017 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
10018 do copy reloc processing for weakdefs. Remove redundant casts and
10019 aborts. Delay setting of vars until needed. Move creation of
10020 dynamic symbols and allocation of .plt and .rela.plt to
10021 allocate_dynrelocs. Replace BFD_ASSERT with abort.
10022 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
10023 (allocate_dynrelocs): New.
10024 (readonly_dynrelocs): New.
10025 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
10026 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
10027 Zero out the dynamic allocated content space.
10028 (elf64_x86_64_discard_copies): Removed.
10029 (elf64_x86_64_relocate_section): Make use of dynamic section
10030 short-cuts. Localise vars, and delay setting. Better error
10031 reporting, replace BFD_ASSERT with abort. Check
10032 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
10033 regular object file and tread the weak definition as the normal
10034 one. Don't discard relocs for undefweak or undefined symbols and
10035 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
10036 relocs.
10037 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
10038 symbols that have been forced local. Use same test to decide if
10039 we can use a relative reloc for got as relocate_section. Expand
10040 SHN_UNDEF comment. Move expressions out of function calls.
10041 Replace BFD_ASSERT with abort.
10042 (bfd_elf64_bfd_final_link): Removed.
10043 (elf_backend_copy_indirect_symbol): Define.
10044
10045 2002-02-20 Tom Rix <trix@redhat.com>
10046
10047 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
10048 (_bfd_xcoff_reloc_type_lookup): Use it.
10049 * coff64-rs6000.c (xcoff64_howto_table): Same.
10050 (xcoff64_reloc_type_lookup): Same.
10051
10052 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
10053
10054 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
10055 little endian.
10056
10057 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
10058
10059 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
10060 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
10061 * bfd-in2.h: Regenerate.
10062 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
10063 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
10064 with "s390:64-bit".
10065 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
10066 (elf_s390_reloc_type_lookup): Likewise.
10067 (elf_s390_check_relocs): Likewise.
10068 (elf_s390_gc_sweep_hook): Likewise.
10069 (elf_s390_relocate_section): Likewise.
10070 (elf_s390_object_p): Use renamed architecture define.
10071 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
10072
10073 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
10074
10075 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
10076
10077 2002-02-19 Jakub Jelinek <jakub@redhat.com>
10078
10079 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
10080 absptr -> pcrel optimization for shared libs.
10081 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
10082 library cannot be converted to pcrel.
10083 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
10084 relative.
10085 * elf32-i386.c (elf_i386_relocate_section): If
10086 _bfd_elf_section_offset returned -2, skip, but make sure the
10087 relocation is installed.
10088 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
10089 * elf32-cris.c (cris_elf_relocate_section): Likewise.
10090 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
10091 * elf32-i370.c (i370_elf_relocate_section): Likewise.
10092 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
10093 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
10094 * elf32-s390.c (elf_s390_relocate_section): Likewise.
10095 * elf32-sh.c (sh_elf_relocate_section): Likewise.
10096 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
10097 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
10098 * elf64-s390.c (elf_s390_relocate_section): Likewise.
10099 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
10100 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
10101 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10102 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
10103 _bfd_elf_section_offset returning -2 the same way as -1.
10104 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
10105 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
10106 and BFD_ASSERT.
10107 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
10108
10109 2002-02-18 Tom Rix <trix@redhat.com>
10110
10111 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
10112 (bfd_xcoff_size_dynamic_sections): Same.
10113 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
10114 (bfd_xcoff_size_dynamic_sections): Same.
10115 * coff-rs6000.c (xcoff_generate_rtinit): Same.
10116 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
10117 * libxcoff.h (struct xcoff_backend_data_rec): Same.
10118 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
10119 * bfd-in2.h: Regenerate.
10120
10121 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10122
10123 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10124 (struct ppc_link_hash_table): Add sfpr.
10125 (ppc64_elf_link_hash_table_create): Init it.
10126 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10127 .glink out to..
10128 (create_linkage_sections): ..here. Make .sfpr too.
10129 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10130 dynobj early.
10131 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10132 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10133 ._restf* functions, and create as needed.
10134 (func_desc_adjust): Only force_local for shared libs.
10135
10136 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10137
10138 * configure.in: Bump version number post 2.12 branching.
10139 * configure: Regenerate.
10140
10141 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10142
10143 * mmo.c: Correct and improve comments.
10144 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10145 zero-pad. Use input to fill up non-empty bfd buffer.
10146 (mmo_flush_chunk): New function.
10147 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10148 changed. Don't emit location specifier if VMA is same as
10149 *LAST_VMAP after omitting leading zero contents. Call
10150 mmo_flush_chunk before emitting location specifier.
10151 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10152 with mmo_write_loc_chunk calls.
10153 (mmo_internal_write_section): Call mmo_flush_chunk after
10154 mmo_write_chunk.
10155 (mmo_write_symbols_and_terminator): Move :Main to first position
10156 in symbol array. Add faked one if it does not exist if there are
10157 other symbols. Don't add it if there are no symbols at all. Move
10158 out test for value of :Main from symbol loop. Rename table
10159 fakemain to maintable and variable mainsym to fakemain.
10160
10161 2002-02-15 Richard Henderson <rth@redhat.com>
10162
10163 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10164 section with no got matches any got. Simplify error generaion.
10165
10166 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10167
10168 Support arbitrary length fill patterns.
10169 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10170 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10171 Call default_data_link_order.
10172 (default_fill_link_order): Delete.
10173 (default_data_link_order): New function.
10174 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10175 of bfd_fill_link_order with bfd_data_link_order.
10176 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10177 * elf64-mips.c (mips_elf64_final_link): Likewise.
10178
10179 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10180 Correct value returned in "end" for "0x<non-hex>".
10181
10182 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10183
10184 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10185 (scan): Test against 'mach' field in info structure.
10186
10187 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10188
10189 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10190
10191 2002-02-14 Matt Fredette <fredette@netbsd.org>
10192
10193 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10194 EF_M68000.
10195
10196 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10197
10198 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10199 non-zero physical addresses when adjusting the LMAs of new
10200 sections.
10201
10202 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10203
10204 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10205 from _bfd_elf_hppa_gen_reloc_type.
10206 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10207 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10208 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10209 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10210
10211 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10212
10213 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10214 loading its contents if there's nothing to do in it.
10215
10216 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10217
10218 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10219 64k boundary.
10220
10221 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10222 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10223 (ppc64_elf_finish_dynamic_sections): Set values for them.
10224
10225 2002-02-11 Michael Snyder <msnyder@redhat.com>
10226
10227 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10228 * elf.c (elfcore_grok_pstatus): Add prototype.
10229 (elfcore_grok_lwpstatus): Add prototype.
10230 (elfcore_write_lwpstatus): New function.
10231 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10232
10233 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10234
10235 * elf32-sh.c: Added missing prototypes.
10236 * elf32-sh64.c: Likewise.
10237 (sh_elf_align_loads): Mark unused args as such.
10238 * elf64-sh64.c: Added missing prototypes.
10239 (struct elf_sh64_link_hash_entry): Fix typo.
10240 (sh_elf64_relocate_section): Fix info argument passed to
10241 _bfd_elf_section_offset.
10242
10243 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10244
10245 * Makefile.am: "make dep-am".
10246 * Makefile.in: Regenerate.
10247 * aclocal.m4: Regenerate.
10248 * config.in: Regenerate.
10249 * configure: Regenerate.
10250
10251 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10252
10253 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10254 variable warnings.
10255 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10256 comparison warning.
10257 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10258 cast warnings for the common case.
10259
10260 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10261
10262 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10263 vectors.
10264 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10265 vectors.
10266
10267 2002-02-09 Richard Henderson <rth@redhat.com>
10268
10269 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10270 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10271 (elf64_alpha_relocate_section): Likewise.
10272 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10273 * bfd-in2.h, libbfd.h: Rebuild.
10274
10275 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10276
10277 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10278 that base-plus-offset reloc accounting is consistent.
10279 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10280 up to date for undefined symbols.
10281
10282 2002-02-08 Eric Christopher <echristo@redhat.com>
10283
10284 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10285
10286 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10287 sections for the O32 ABI.
10288
10289 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10290
10291 * elf32-arm.h: Fix formatting of _("...").
10292 * elf32-d10v.c: Likewise.
10293 * elf32-m68k.c: Likewise.
10294 * elf32-mips.c: Likewise.
10295
10296 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10297
10298 * coff-or32.c: Fix compile time warning messages.
10299
10300 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10301
10302 Contribute sh64-elf.
10303 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10304 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10305 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10306 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10307 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10308 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10309 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10310 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10311 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10312 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10313 New relocs.
10314 * libbfd.h, bfd-in2.h: Rebuilt.
10315 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10316 (sh_reloc_map): Map them.
10317 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10318 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10319 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10320 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10321 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10322 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10323 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10324 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10325 datalabel_got_offset.
10326 (sh_elf_link_hash_newfunc): Initialize it.
10327 (sh_elf_relocate_section): Augment the scope of
10328 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10329 GOT and GOTOFF handling to new SHmedia relocation types. Support
10330 GOT_BIAS.
10331 (sh_elf_check_relocs): Likewise.
10332 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10333 PLT entries using movi_shori_putval. Support GOT_BIAS.
10334 (sh_elf_finish_dynamic_sections): Likewise.
10335 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10336 relocation, it's now done by the caller.
10337 (GOT_BIAS): New.
10338 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10339 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10340 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10341 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10342 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10343 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10344 sh64_elf64_hash_table): New.
10345 (sh_elf64_howto_table): Introduce new relocs.
10346 (sh_elf64_info_to_howto): Accept new PIC relocs.
10347 (sh_elf64_relocate_section): Augment the scope of
10348 seen_stt_datalabel. Support new PIC relocs.
10349 (sh_elf64_check_relocs): Support new PIC relocs.
10350 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10351 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10352 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10353 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10354 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10355 movi_shori_putval, movi_3shori_putval,
10356 sh64_elf64_create_dynamic_sections,
10357 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10358 sh64_elf64_size_dynamic_sections,
10359 sh64_elf64_finish_dynamic_symbol,
10360 sh64_elf64_finish_dynamic_sections): New.
10361 (elf_backend_create_dynamic-sections,
10362 bfd_elf64_bfd_link_hash_table_create,
10363 elf_backend_adjust_dynamic_symbol,
10364 elf_backend_size_dynamic_sections,
10365 elf_backend_finish_dynamic_symbol,
10366 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10367 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10368 elf_backend_got_header_size, elf_backend_plt_header_size):
10369 Define.
10370 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10371 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10372 match official numbers and names; moved unmaching ones to the
10373 range 0xf2-0xff.
10374 * elf32-sh64.c, elf64-sh64.c: Likewise.
10375 2001-03-12 DJ Delorie <dj@redhat.com>
10376 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10377 sections.
10378 2001-03-12 DJ Delorie <dj@redhat.com>
10379 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10380 be aligned.
10381 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10382 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10383 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10384 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10385 .cranges section with SEC_SORT_ENTRIES set.
10386 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10387 incoming sorted .cranges section.
10388 (sh64_bfd_elf_copy_private_section_data): New.
10389 (sh64_elf_final_write_processing): Only sort .cranges and modify
10390 start address if called by linker.
10391 2001-01-08 Ben Elliston <bje@redhat.com>
10392 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10393 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10394 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10395 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10396 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10397 line. Add comments before all entries.
10398 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10399 comment.
10400 (sh_elf64_reloc): Correct head comment.
10401 (sh_elf64_relocate_section): Correct spacing.
10402 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10403 instead call reloc_dangerous callback.
10404 <case R_SH_SHMEDIA_CODE>: New case.
10405 (sh_elf64_gc_mark_hook): Correct spacing.
10406 (sh_elf64_check_relocs): Ditto.
10407 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10408 New case.
10409 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10410 functions.
10411 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10412 clarify describing comment. Add comments before all entries.
10413 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10414 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10415 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10416 Sort .cranges section in final link. Prepare to set bit 0 on
10417 entry address.
10418 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10419 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10420 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10421 .cranges section.
10422 (sh64_backend_section_from_shdr): New, to recognize
10423 SHT_SH5_CR_SORTED on incoming .cranges section.
10424 (elf_backend_section_from_shdr): Define.
10425 (sh64_elf_final_write_processing): Sort outgoing .cranges
10426 section. (New, temporarily disabled:) Set bit 0 on entry address
10427 according to ISA type.
10428 (sh64_find_section_for_address): New.
10429 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10430 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10431 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10432 bfd_malloc, not xmalloc.
10433 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10434 global.
10435 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10436 temporarily disabled) setting bit 0 on entry address.
10437 (elf_backend_final_write_processing): Define.
10438 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10439 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10440 be a proper relocation for PTA and PTB rather than a marker.
10441 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10442 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10443 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10444 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10445 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10446 Zero src_mask.
10447 * elf64-sh64.c: Ditto.
10448 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10449 * elf32-sh64.c: Include opcodes/sh64-opc.h
10450 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10451 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10452 parameters. No unused parameters. Caller changed.
10453 <case R_SH_PT_16>: New case.
10454 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10455 * Makefile.in: Regenerate.
10456 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10457 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10458 all code sections.
10459 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10460 (sh64_elf_merge_private_data): Ditto.
10461 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10462 to access stored section flags.
10463 (sh64_elf_final_write_processing): Return immediately unless
10464 called by linker. Use sh64_elf_section_data (cranges) to get size
10465 of linker-generated cranges entries.
10466 (sh64_elf_copy_private_data): Add missing "return true".
10467 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10468 (sh_elf64_merge_private_data): Ditto.
10469 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10470 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10471 elf64-sh64.c:sh64_elf_fake_sections.
10472 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10473 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10474 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10475 (sh64_elf_final_write_processing): New.
10476 (elf_backend_final_write_processing): Define.
10477 (sh64_elf_fake_sections): Get header flags from tdata field.
10478 (sh64_elf_copy_private_data): Do not call
10479 sh64_elf_copy_private_data_internal, just copy e_flags field.
10480 (sh64_elf_merge_private_data): Do not call
10481 sh64_elf_copy_private_data_internal.
10482 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10483 Remove EF_SH64_ABI64, let ELF size make difference.
10484 Remove SH64-specific BFD section flag.
10485 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10486 containing SHmedia through elf_section_data (asect)->tdata
10487 non-zero, not using a BFD section flag.
10488 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10489 (sh64_elf_merge_private_data): Similar.
10490 (elf_backend_section_flags): Don't define.
10491 (sh64_elf_backend_section_flags): Delete.
10492 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10493 not EF_SH64_ABI64.
10494 (sh_elf64_merge_private_data): Similar.
10495 * section.c (Section flags definitions): Don't define
10496 SEC_SH_ISA_SHMEDIA.
10497 (bfd-in2.h): Regenerate.
10498 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10499 Make DataLabel references work with partial linking.
10500 * elf32-sh64.c: Fix formatting.
10501 (sh64_elf_link_output_symbol_hook): New.
10502 (elf_backend_link_output_symbol_hook): Define to
10503 sh64_elf_link_output_symbol_hook.
10504 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10505 undefined if partial linking. Adjust sanity check.
10506 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10507 (elf_backend_link_output_symbol_hook): Define to
10508 sh64_elf64_link_output_symbol_hook.
10509 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10510 undefined if partial linking. Adjust sanity check.
10511 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10512 Implement semantics for inter-file DataLabel references.
10513 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10514 (sh64_elf64_add_symbol_hook): New.
10515 (sh_elf64_relocate_section): If passing an indirect symbol with
10516 st_type STT_DATALABEL on the way to a symbol with st_other
10517 STO_SH5_ISA32, do not bitor 1 to the relocation.
10518 (elf_backend_add_symbol_hook): Define to
10519 sh64_elf64_add_symbol_hook.
10520 * elf64-sh32.c: Tweak comments.
10521 (DATALABEL_SUFFIX): Define.
10522 (sh64_elf_add_symbol_hook): New.
10523 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10524 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10525 symbol with st_type STT_DATALABEL on the way to a symbol with
10526 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10527 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10528 Pass through STT_DATALABEL.
10529 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10530 (elf_backend_get_symbol_type): Define.
10531 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10532 (elf_backend_get_symbol_type): Define.
10533 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10534 * elf32-sh64.c: Tweak comments.
10535 (sh64_elf_copy_private_data_internal): Add prototype.
10536 (bfd_elf32_bfd_set_private_flags): Define.
10537 (sh64_elf_copy_private_data_internal): Compare machine name, not
10538 textual BFD target name, to check whether to copy section flag
10539 SHF_SH5_ISA32.
10540 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10541 Tweak section-contents-type-mismatch message.
10542 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10543 Validize reloc-types.
10544 * elf64-sh64.c: New file.
10545 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10546 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10547 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10548 Regenerate dependencies.
10549 * Makefile.in: Regenerate.
10550 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10551 bfd_elf64_sh64l_vec.
10552 * configure.in: Handle bfd_elf64_sh64_vec and
10553 bfd_elf64_sh64l_vec.
10554 * configure: Regenerate.
10555 * po/POTFILES.in: Regenerate.
10556 * po/bfd.pot: Regenerate.
10557 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10558 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10559 anything else but EF_SH64 and EF_SH64_ABI64.
10560 (sh64_elf_merge_private_data): Emit error for anything else but
10561 EF_SH64 and EF_SH64_ABI64.
10562 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10563 from targ_selvecs.
10564 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10565 bfd_elf32_sh64l_vec as a temporary measure.
10566 * configure: Regenerate.
10567 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10568 * cpu-sh.c (arch_info_struct): Include sh5 item
10569 unconditionalized.
10570 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10571 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10572 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10573 * elf32-sh64.c: Tweak comments.
10574 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10575 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10576 (sh64_elf_copy_private_data_internal): Wrap long line.
10577 (sh64_elf_merge_private_data): Rewrite to allow objects from
10578 SH64 subsets to be linked together.
10579 (INCLUDE_SHMEDIA): Define.
10580 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10581 Parenthesize plus-expression inside or-expression.
10582 <global symbol>: Ditto.
10583 (sh_elf_set_mach_from_flags): Remove code refusing
10584 deleted EF_SH64_32BIT_ABI flag.
10585 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10586 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10587 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10588 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10589 (sh_elf_relocate_section) <local symbol>: Or 1 in
10590 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10591 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10592 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10593 relocation.
10594 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10595 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10596 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10597 Regenerate dependencies.
10598 * Makefile.in: Regenerate.
10599 * archures.c: Add bfd_mach_sh5.
10600 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10601 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10602 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10603 * configure: Regenerate.
10604 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10605 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10606 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10607 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10608 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10609 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10610 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10611 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10612 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10613 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10614 in item for SH5.
10615 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10616 for SHmedia relocs.
10617 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10618 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10619 shmedia_prepare_reloc, goto final_link_relocate if it returns
10620 non-zero, else fail as before.
10621 (sh_elf_set_mach_from_flags): Provide function only if not defined
10622 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10623 (sh_elf_set_private_flags): Provide function only if not defined
10624 as a macro.
10625 (sh_elf_copy_private_data): Similar.
10626 (sh_elf_merge_private_data): Similar.
10627 * section.c (SEC_SH_ISA_SHMEDIA): New.
10628 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10629 * elf32-sh64.c: New file.
10630 * libbfd.h: Regenerate.
10631 * bfd-in2.h: Regenerate.
10632 * po/POTFILES.in: Regenerate.
10633 * po/bfd.pot: Regenerate.
10634 * bfd-in2.h: Regenerate.
10635 * libbfd.h: Regenerate.
10636
10637 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10638
10639 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10640 been included, not drag it in.
10641 * bfd-in2.h: Regenerate.
10642
10643 2002-02-06 H.J. Lu (hjl@gnu.org)
10644
10645 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10646 the mach and ISA fields if necessary.
10647
10648 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10649
10650 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10651 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10652 be sure exactly which architecture this represents.
10653
10654 2002-02-05 Nick Clifton <nickc@redhat.com>
10655
10656 * po/tr.po: Updated translation.
10657
10658 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10659
10660 From Jimi X <jimix@watson.ibm.com>
10661 * archures (bfd_mach_ppc64): Define.
10662 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10663 (bfd_powerpc_arch): Define.
10664 * bfd-in2.h: Regenerate.
10665 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10666 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10667 (bfd_powerpc_archs): Add default powerpc64 arch.
10668
10669 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10670
10671 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10672 against section syms in readonly sections. Don't do the global
10673 sym check if we find one.
10674 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10675 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10676 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10677 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10678 (elf_s390_grok_prstatus): Add missing prototype.
10679
10680 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10681
10682 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10683 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10684 Call bfd_get_section_by_name only once. Initialize
10685 bpodata->n_bpo_relocs_this_section.
10686 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10687 referring to DSOs.
10688 (bpo_reloc_request_sort_fn): Don't use difference of values as
10689 return-value.
10690
10691 2002-02-02 David O'Brien <obrien@FreeBSD>
10692
10693 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10694 version 4.5 and later the same as 5-CURRENT.
10695 * configure: Re-generate.
10696
10697 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10698
10699 * config.bfd (hppa*-*-netbsd*): New target.
10700
10701 2002-01-31 Philipp Thomas <pthomas@suse.de>
10702
10703 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10704 to front of message. Unify messages with elf32-arm.h. Use
10705 commas where neccessary.
10706 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10707 ERROR in messages. Unify messages with coff-arm.c. Correct
10708 VFP/FPA error message.
10709 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10710 APCS-32 for translation.
10711
10712 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10713
10714 Perform on-demand global register allocation from
10715 R_MMIX_BASE_PLUS_OFFSET relocs.
10716 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10717 bpo_reloc_request, struct bpo_greg_section_info): New.
10718 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10719 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10720 _bfd_mmix_check_all_relocs,
10721 _bfd_mmix_prepare_linker_allocated_gregs,
10722 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10723 (elf_mmix_howto_table): Correct src_mask for most relocs.
10724 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10725 case.
10726 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10727 case. Fix typo in comment. New label do_mmix_reloc.
10728 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10729 store first object file with a base-plus-offset reloc. Call
10730 mmix_elf_check_common_relocs for the part common with mmo.
10731 (mmix_elf_final_link): Write out linker-allocated register
10732 contents section.
10733 (elf_backend_gc_sweep_hook): Define.
10734 (bfd_elf64_bfd_relax_section): Define.
10735
10736 * mmo.c: Don't include <ctype.h>
10737 (mmo_init): Correct init-once logic.
10738
10739 2002-02-01 Tom Rix <trix@redhat.com>
10740
10741 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10742
10743 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10744
10745 * Makefile.am: Run "make dep-am"
10746 * Makefile.in: Regenerate.
10747
10748 2002-01-31 David O'Brien <obrien@FreeBSD>
10749
10750 * configure.in: Recognize the differences in core files from FreeBSD
10751 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10752 5-CURRENT.
10753 * configure: Regenerate.
10754
10755 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10756
10757 * coff-or32.c: New file.
10758 * cpu-or32.c: New file.
10759 * elf32-or32.c: New file.
10760 * archures.c: Add support for or32.
10761 * targets.c: Add support for or32.
10762 * bfd-in2.h: Regenerate.
10763 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10764 coff_write_object_contents): Add support for or32.
10765 * config.bfd: Add target.
10766 * configure.in: Add support for or32.
10767 * configure: Regenerate.
10768 * Makefile.am: Add support for or32.
10769 * Makefile.in: Regenerate.
10770 * po/SRC-POTFILES.in: Add or32 files.
10771 * po/bfd.pot: Regenerate.
10772
10773 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10774 Don Lindsay <lindsayd@cisco.com>
10775
10776 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10777 false' with a return of a bfd_reloc_ error code.
10778
10779 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10780
10781 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10782 unexport unreferenced symbols when --export-dynamic. Call
10783 _bfd_elf_strtab_delref when unexporting.
10784
10785 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10786
10787 * bfd-in.h: Include <stdbool.h> if it is available.
10788 * bfd-in2.h: Regenerated.
10789
10790 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10791
10792 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10793 not go via the plt.
10794
10795 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10796
10797 * archures.c: Tidy up formatting of embedded comments.
10798 * bfd.c: Tidy up formatting of embedded comments.
10799 * bfd-in.h: Fix formatting of comments.
10800 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10801 * section.c: Tidy up formatting of embedded comments.
10802 * syms.c: Tidy up formatting of embedded comments.
10803 * targets.c: Tidy up formatting of embedded comments.
10804
10805 * bfd-in2.h: Regenerate.
10806
10807 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10808
10809 * vms-tir.c (cmd_name): New function.
10810 (tir_cmd_name): New function.
10811 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10812 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10813 Fix formatting.
10814
10815 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10816 translation.
10817 (pe_print_pdata): Rearrange message to aid in translation.
10818
10819 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10820 translation.
10821
10822 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10823
10824 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10825
10826 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10827 message to aid in translation.
10828
10829 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10830 to aid in translation.
10831
10832 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10833
10834 2002-01-30 Philipp Thomas <pthomas@suse.de>
10835
10836 * coff-arm.c, elf32-elf.h: Unify messages.
10837
10838 2002-01-30 Nick Clifton <nickc@redhat.com>
10839
10840 * po/sv.po: Updated translation.
10841
10842 2002-01-30 Philipp Thomas <pthomas@suse.de>
10843
10844 * dwarf2.c (read_abbrev): Use full section name in error message.
10845 (decode_line_info): Likewise.
10846
10847 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10848 message.
10849
10850 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10851
10852 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10853 descriptor symbols for undefined function code syms. Clear
10854 ELF_LINK_NON_ELF so that they can stay weak.
10855
10856 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10857 Mitch Lichtenberg <mpl@broadcom.com>
10858
10859 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10860 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10861 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10862 generation.
10863 * bfd-in2.h: Regenerate.
10864
10865 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10866
10867 * elf32-mips.c: Add additional comments about HI16 relocation
10868 processing.
10869 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10870 pc-relative relocations. (Reverts change made on 2001-10-31.)
10871 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10872 for pc-relative relocations.
10873 (mips_elf_calculate_relocation): Add a comment about a kludge
10874 in the R_MIPS_GNU_REL_HI16 handling.
10875 (_bfd_mips_elf_relocate_section): Implement that kludge;
10876 adjust pc-relative HI16 relocation for difference in HI16 and
10877 LO16 addresses, since it can't easily be done in
10878 mips_elf_calculate_relocation.
10879
10880 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10881
10882 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10883 relocations with PC32 relocations for undefined or weak symbols.
10884 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10885 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10886
10887 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10888
10889 * elfcore.h (elf_core_file_p): Improve comment for last change.
10890
10891 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10892
10893 * configure: Regenerated.
10894
10895 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10896
10897 * elfcore.h (elf_core_file_p): Set the machine architecture
10898 before processing the program headers.
10899
10900 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10901
10902 * configure.in <64-bit configuration>: If using gcc, check and
10903 emit error for egcs-1.1.2.
10904 * configure: Regenerate.
10905
10906 2002-01-26 Egor Duda <deo@logos-m.ru>
10907
10908 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10909 as possible to avoid stack corruption.
10910
10911 2002-01-26 Richard Henderson <rth@redhat.com>
10912
10913 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10914 for non-allocated sections.
10915
10916 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10917
10918 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10919 prstat.pr_reg even if it is a struct.
10920
10921 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10922
10923 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10924
10925 2002-01-25 Philipp Thomas <pthomas@suse.de>
10926
10927 * coffgen.c (coff_print_symbol): Don't mark info message
10928 for translation.
10929
10930 2002-01-25 Nick Clifton <nickc@redhat.com>
10931
10932 * po/fr.po: Updated translation.
10933 * po/es.po: Updated translation.
10934
10935 2002-01-25 Philipp Thomas <pthomas@suse.de>
10936
10937 * coff-alpha.c (alpha_relocate_section): Unify warning message
10938 for GP relative relocations without GP defined.
10939 * coff-mips.c (mips_relocate_section): Likewise.
10940
10941 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10942
10943 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10944 unsigned overflow when new_offset < old_offset.
10945
10946 2002-01-24 Philipp Thomas <pthomas@suse.de>
10947
10948 * bfd.c (_bfd_abort): Fix typo.
10949
10950 2002-01-23 Richard Henderson <rth@redhat.com>
10951
10952 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10953 plt entries for undefweak symbols.
10954
10955 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10956
10957 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10958 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10959 (bfd_elf32_h8300_vec): Ditto.
10960
10961 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10962
10963 * elf64-ppc.c: Remove stale part of ABI comment.
10964 (NO_OPD_RELOCS): Define.
10965 (ppc64_elf_check_relocs): Use it.
10966 (ppc64_elf_relocate_section): Here too.
10967 (build_one_stub): Don't point function syms at the stub. Instead,
10968 hijack plt.offset.
10969 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10970 really go to the stub. Make all dynamic relocs in opd against
10971 locals.
10972 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10973 plt.offset.
10974
10975 2002-01-22 Richard Henderson <rth@redhat.com>
10976
10977 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10978
10979 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10980
10981 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10982 TOC_BASE_OFF adjustment.
10983
10984 * Makefile.am: Run "make dep-am".
10985 * Makefile.in: Regenerate.
10986 * po/SRC-POTFILES.in: Regenerate.
10987
10988 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10989
10990 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10991 host defines.
10992
10993 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10994
10995 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10996 Check for and emit error if sgot is NULL at this point.
10997
10998 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10999
11000 * config.bfd (ia64*-*-netbsd*): New target.
11001
11002 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
11003
11004 * som.c (som_write_space_strings): Comment typo fix.
11005
11006 2002-01-21 Alan Modra <amodra@bigpond.net.au>
11007
11008 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
11009 is_func_descriptor fields.
11010 (link_hash_newfunc): Init them.
11011 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
11012 dot are candidates for plt entries. When processing .opd relocs,
11013 set function descriptor strings to point inside function code
11014 string, and set new ppc_link_hash_entry fields.
11015 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
11016 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
11017 function descriptors. It's now done in..
11018 (func_desc_adjust): New.
11019 (ppc64_elf_func_desc_adjust): New.
11020 (define elf_backend_always_size_sections): Define.
11021 (ppc64_elf_hide_symbol): New.
11022 (define elf_backend_hide_symbol): Define.
11023 (allocate_dynrelocs): Remove code looking up function descriptors
11024 as that has been done earlier.
11025 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
11026 table.
11027 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
11028 up function descriptor.
11029 (build_one_stub): Look up the function code sym. Check for
11030 invalid plt offsets.
11031 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
11032 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
11033
11034 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
11035 boolean param.
11036 (_bfd_elf_link_hash_hide_symbol): Likewise.
11037 * elflink.h (elf_link_add_object_symbols): Adjust call to
11038 elf_backend_hide_symbol.
11039 (elf_fix_symbol_flags): Likewise.
11040 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
11041 than bfd_alloc.
11042 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
11043 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
11044 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
11045 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
11046 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
11047 and adjust to suit.
11048 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
11049 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
11050 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
11051
11052 2002-01-18 Alan Modra <amodra@bigpond.net.au>
11053
11054 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
11055 dynamic function descriptor symbol, not the associated function
11056 symbol.
11057
11058 2002-01-17 Eric Christopher <echristo@redhat.com>
11059
11060 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
11061
11062 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
11063
11064 * po/bfd.pot: Regenerate.
11065 * po/fr.po: Regenerate.
11066
11067 2002-01-17 Alan Modra <amodra@bigpond.net.au>
11068
11069 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
11070 Remove "Elf_Internal_Shdr *" param.
11071 (_bfd_mips_elf_section_from_bfd_section): Ditto.
11072 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
11073 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
11074 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
11075 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
11076 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
11077 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
11078 function to override special sections. Remove hdr arg from
11079 backend call, and don't loop.
11080
11081 2002-01-16 Eric Christopher <echristo@redhat.com>
11082
11083 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
11084 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
11085 relocations requiring gp0 and gp.
11086
11087 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
11088
11089 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
11090 EF_ARM_VFP_FLOAT.
11091 (elf32_arm_print_private_bfd_data): Likewise.
11092
11093 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
11094
11095 * po/tr.po: Import new version.
11096
11097 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11098
11099 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
11100 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
11101 (ORI_R0_R0_0): Correct.
11102
11103 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11104
11105 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
11106 when plt_not_loaded.
11107 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
11108 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
11109 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
11110 (ppc64_elf_glink_code): Delete.
11111 (PPC64_ELF_GLINK_SIZE): Delete.
11112 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
11113 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
11114 ORI_R0_R0_0): Define.
11115 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
11116 (struct ppc_link_hash_table): Add sstub and plt_overflow.
11117 (ppc64_elf_link_hash_table_create): Init them.
11118 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
11119 Don't copy to shared lib.
11120 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11121 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11122 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11123 room for .stub and .glink code.
11124 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11125 DT_PPC64_GLINK.
11126 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11127 bfd_elf64_bfd_final_link.
11128 (bfd_elf64_bfd_final_link): Don't define.
11129 (ppc64_elf_size_stubs): New.
11130 (build_plt_stub): New.
11131 (build_one_stub): New.
11132 (ppc64_elf_build_stubs): New.
11133 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11134 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11135 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11136 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11137 case output sections not separate. Adjust DT_RELASZ to not
11138 include plt relocs. Set reserved got entry. Set got and plt
11139 entry size.
11140 (elf_backend_got_header_size): Set to 8.
11141 * elf64-ppc.h: New file.
11142
11143 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11144
11145 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11146 sections, use bfd_section_list_remove.
11147 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11148 * elflink.h (elf_link_add_object_symbols): When removing all
11149 sections, use bfd_section_list_clear.
11150
11151 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11152
11153 * po/sv.po: New file: Swedish translation.
11154 * configure.in (ALL_LINGUAS): Add sv.
11155 * configure: Regenerate.
11156
11157 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11158
11159 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11160 * elf.c (merge_sections_remove_hook): New function.
11161 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11162 _bfd_merge_sections.
11163 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11164 * libbfd.h: Rebuilt.
11165 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11166 Call remove_hook if a SEC_EXCLUDE section is encountered.
11167
11168 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11169
11170 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11171 (xstormy16_reloc_map): Initialise new field with correct howto
11172 table.
11173 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11174 howto entry.
11175
11176 2002-01-10 Michael Snyder <msnyder@redhat.com>
11177
11178 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11179 (elfcore_write_pstatus): Use long instead of pid_t;
11180 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11181
11182 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11183
11184 * elf.c: Update copyright years.
11185 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11186 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11187
11188 2002-01-08 Michael Snyder <msnyder@redhat.com>
11189
11190 Add capability to write corefile note sections, for gdb.
11191 * elf.c (elfcore_write_note): New function.
11192 (elfcore_write_prpsinfo): New function.
11193 (elfcore_write_prstatus): New function.
11194 (elfcore_write_pstatus): New function.
11195 (elfcore_write_prfpreg): New function.
11196 (elfcore_write_prxfpreg): New function.
11197 * elf-bfd.h: Add prototypes for above functions.
11198
11199 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11200
11201 * elf.c (elf_fake_sections): Propagate errors from
11202 elf_backend_fake_section.
11203
11204 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11205
11206 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11207 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11208 (elf32-sh-nbsd.lo): New rule.
11209 * Makefile.in: Regenerate.
11210 * config.bfd (sh*le-*-netbsdelf*): New target.
11211 (sh*-*-netbsdelf*): New target.
11212 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11213 (bfd_elf32_shnbsd_vec): New vector.
11214 (bfd_elf32_shlnbsd_vec): New vector.
11215 * configure: Regenerate.
11216 * elf32-sh-nbsd.c: New file.
11217 * targets.c: Update copyright years.
11218 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11219 bfd_elf32_shnbsd_vec.
11220
11221 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11222
11223 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11224
11225 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11226
11227 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11228 of a symbol in a section that will be deleted.
11229
11230 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11231
11232 * po/es.po: New file: Spanish translation.
11233 * configure.in (ALL_LINGUAS): Add es.
11234 * configure: Regenerate.
11235
11236 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11237
11238 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11239 argument so we can handle HP-UX specially.
11240 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11241 (elfNN_hpux_backend_section_from_bfd_section): New for support
11242 of SHN_IA_64_ANSI_COMMON.
11243 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11244 (is_unwind_section_name): Add special HP-UX support.
11245 (elfNN_ia64_section_from_shdr): Add support for more sections.
11246 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11247 add support for more sections.
11248 (elfNN_ia64_additional_program_headers): Modify
11249 is_unwind_section_name call.
11250 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11251 only one unwind section in segment.
11252
11253 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11254
11255 * syms.c (_bfd_generic_make_empty_symbol): New function.
11256 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11257 _bfd_generic_make_empty_symbol.
11258 * libbfd.h: Regenerate.
11259 * bfd-in2.h: Regenerate.
11260 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11261 (hppabsd_core_get_symtab_upper_bound): Don't define.
11262 (hppabsd_core_get_symtab): Likewise.
11263 (hppabsd_core_print_symbol): Likewise.
11264 (hppabsd_core_get_symbol_info): Likewise.
11265 (hppabsd_core_bfd_is_local_label_name): Likewise.
11266 (hppabsd_core_get_lineno): Likewise.
11267 (hppabsd_core_find_nearest_line): Likewise.
11268 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11269 (hppabsd_core_read_minisymbols): Likewise.
11270 (hppabsd_core_minisymbol_to_symbol): Likewise.
11271 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11272 Formatting fixes.
11273 * hpux-core.c: Similarly.
11274 * irix-core.c: Similarly.
11275 * osf-core.c: Similarly.
11276 * sco5-core.c: Similarly.
11277 * binary.c (binary_make_empty_symbol): Remove function, define as
11278 _bfd_generic_make_empty_symbol.
11279 * ihex.c (ihex_make_empty_symbol): Likewise.
11280 * mmo.c (mmo_make_empty_symbol): Likewise.
11281 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11282 * srec.c (srec_make_empty_symbol): Likewise.
11283 * versados.c (versados_make_empty_symbol): Likewise.
11284 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11285 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11286 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11287 rather than _bfd_vms_make_empty_symbol.
11288 * vms-misc.c (new_symbol): Likewise.
11289
11290 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11291
11292 * section.c (bfd_section_init): Remove unnecessary initialisations.
11293 (bfd_section_list_clear): New function.
11294 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11295 (_bfd_strip_section_from_output): Use them.
11296 * coffcode.h (coff_set_alignment_hook): Likewise.
11297 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11298 * elf64-mips.c (mips_elf64_final_link): Likewise.
11299 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11300 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11301 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11302 * bfd-in2.h: Regenerate.
11303
11304 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11305 rather than doing our own section handling. Clean up after errors
11306 with bfd_release and bfd_section_list_clear. Handle unexpected
11307 flags.
11308 * aoutf1.h (sunos4_core_file_p): Likewise.
11309 * aix386-core.c (aix386_core_file_p): Likewise.
11310 * cisco-core.c (cisco_core_file_validate): Likewise.
11311 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11312 * trad-core.c (trad_unix_core_file_p): Likewise.
11313
11314 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11315 with bfd_release and bfd_section_list_clear.
11316 * hpux-core.c (hpux_core_core_file_p): Likewise.
11317 * irix-core.c (irix_core_core_file_p): Likewise.
11318 * lynx-core.c (lynx_core_file_p): Likewise.
11319 * osf-core.c (osf_core_core_file_p): Likewise.
11320 * rs6000-core.c (rs6000coff_core_p): Likewise.
11321 * sco5-core.c (sco5_core_file_p): Likewise.
11322
11323 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11324 sign extension adjustments without conditionals.
11325
11326 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11327
11328 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11329 CIE at .eh_frame start is removed due to no FDEs referencing it.
11330
11331 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11332
11333 * config.bfd (x86_64-*-netbsd*): New target.
11334 * configure.in (x86_64-*-netbsd*): Set COREFILE
11335 to netbsd-core.lo.
11336 * configure: Regenerated.
11337
11338 2002-01-03 Tom Rix <trix@redhat.com>
11339
11340 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11341 for recent bfd_make_section_anyway change.
11342
11343 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11344
11345 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11346 R_ARM_THM_PC11 reloc.
11347
11348 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11349
11350 * configure.in (LINGUAS): Add ja.
11351 * configure: Regenerate.
11352 * po/ja.po: Import from translation project's web site.
11353
11354 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11355
11356 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11357 messages to ease translation into other languages.
11358
11359 For older changes see ChangeLog-0001
11360 \f
11361 Local Variables:
11362 mode: change-log
11363 left-margin: 8
11364 fill-column: 74
11365 version-control: never
11366 End: