* elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
[binutils-gdb.git] / bfd / ChangeLog
1 2004-01-01 Grant Edwards <grante@visi.com>
2
3 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
4 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
5 (elf32_h8_gc_sweep_hook): New function.
6 (elf_backend_gc_mark_hook): Define.
7 (elf_backend_gc_sweep_hook): Define.
8 (elf_backend_can_gc_sections): Define.
9
10 2003-12-19 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
11
12 Adfd m32r-linux and PIC support. Add new ABI that uses RELA.
13 * config.bfd (m32r*-*-linux*, m32r*le-*-linux*, m32r*le-*-*): Added.
14 * configure.in (bfd_elf32_m32rlin_vec, bfd_elf32_m32rlelin_vec,
15 bfd_elf32_m32rle_vec): Added
16 * configure: Regenerated.
17 * elf32-m32r.c (m32r_info_to_howto, m32r_elf_adjust_dynamic_symbol,
18 m32r_elf_size_dynamic_sections, m32r_elf_create_dynamic_sections,
19 m32r_elf_finish_dynamic_sections, m32r_elf_finish_dynamic_symbol,
20 allocate_dynrelocs, readonly_dynrelocs, m32r_elf_reloc_type_class,
21 m32r_elf_fake_sections): Added.
22 (m32r_elf_howto_table): Added
23 R_M32R_16_RELA, R_M32R_32_RELA, R_M32R_24_RELA,
24 R_M32R_10_PCREL_RELA, R_M32R_18_PCREL_RELA,
25 R_M32R_26_PCREL_RELA, R_M32R_HI16_ULO_RELA,
26 R_M32R_HI16_SLO_RELA, R_M32R_LO16_RELA,
27 R_M32R_SDA16_RELA, R_M32R_RELA_GNU_VTINHERIT,
28 R_M32R_RELA_GNU_VTENTRY, R_M32R_GOT24,
29 R_M32R_26_PLTREL, R_M32R_COPY, R_M32R_GLOB_DAT,
30 R_M32R_JMP_SLOT, R_M32R_RELATIVE, R_M32R_GOTOFF,
31 R_M32R_GOTPC24, R_M32R_GOT16_HI_ULO,
32 R_M32R_GOT16_HI_SLO, R_M32R_GOT16_LO,
33 R_M32R_GOTPC_HI_ULO, R_M32R_GOTPC_HI_SLO,
34 R_M32R_GOTPC_LO.
35 (m32r_elf_relocate_section, m32r_elf_check_relocs): Changed for
36 New ABI.
37 * reloc.c: Add BFD_RELOC_M32R_GOT24, BFD_RELOC_M32R_26_PLTREL,
38 BFD_RELOC_M32R_COPY, BFD_RELOC_M32R_GLOB_DAT,
39 BFD_RELOC_M32R_JMP_SLOT, BFD_RELOC_M32R_RELATIVE,
40 BFD_RELOC_M32R_GOTOFF, BFD_RELOC_M32R_GOTPC24,
41 BFD_RELOC_M32R_GOT16_HI_ULO, BFD_RELOC_M32R_GOT16_HI_SLO,
42 BFD_RELOC_M32R_GOT16_LO, BFD_RELOC_M32R_GOTPC_HI_ULO,
43 BFD_RELOC_M32R_GOTPC_HI_SLO, BFD_RELOC_M32R_GOTPC_LO.
44 * targets.c (bfd_elf32_m32rlin_vec, bfd_elf32_m32rlelin_vec,
45 bfd_elf32_m32rle_vec): Added.
46 * bfd-in2.h: Regenerated.
47 * libbfd.h: Regenerated.
48
49 2003-12-19 Danny Smith <dannysmith@users.sourceforge.net>
50
51 * coffcode.h (styp_to_sec_flags): Don't treat .reloc section
52 as SEC_DEBUGGING.
53
54 2003-12-18 Richard Sandiford <rsandifo@redhat.com>
55
56 * elf32-mips.c (elf_mips_howto_table_rel): Replace all uses of
57 mips_elf_generic_reloc with _bfd_mips_elf_generic_reloc. Use
58 _bfd_mips_elf_hi16_reloc for R_MIPS_HI16 and R_MIPS_GNU_REL_HI16,
59 _bfd_mips_elf_lo16_reloc for R_MIPS_LO16 and R_MIPS_GNU_REL_LO16,
60 and _bfd_mips_elf_got16_reloc for R_MIPS_GOT16. Change rightshift
61 to 16 for R_MIPS_HI16 and R_MIPS_GNU_REL_HI16.
62 (mips_elf_generic_reloc, struct mips_hi16, mips_elf_hi16_reloc)
63 (mips_elf_lo16_reloc, mips_elf_got16_reloc): Delete.
64 (_bfd_mips_elf32_gprel16_reloc): Remove special case.
65 (mips_elf_gprel32_reloc, mips32_64bit_reloc): Likewise.
66
67 * elf64-mips.c (mips_elf64_howto_table_rel): Replace all uses of
68 mips_elf_generic_reloc with _bfd_mips_elf_generic_reloc. Use
69 _bfd_mips_elf_hi16_reloc for R_MIPS_HI16, _bfd_mips_elf_lo16_reloc
70 for R_MIPS_LO16 and _bfd_mips_elf_got16_reloc for R_MIPS_GOT16.
71 Change R_MIPS_HI16's rightshift to 16.
72 (mips_elf64_howto_table_rela): Replace all uses of
73 mips_elf_generic_reloc with _bfd_mips_elf_generic_reloc.
74 Use _bfd_mips_elf_generic_reloc for R_MIPS_GOT16 as well.
75 (mips_elf64_hi16_reloc, mips_elf64_got16_reloc): Delete.
76 (mips_elf64_shift6_reloc): Remove special case. Use
77 _bfd_mips_elf_generic_reloc instead of returning bfd_reloc_continue.
78
79 * elfn32-mips.c (prev_reloc_section): Delete.
80 (prev_reloc_address, prev_reloc_addend): Delete.
81 (elf_mips_howto_table_rel, elf_mips_howto_table_rela): As for
82 elf64-mips.c
83 (GET_RELOC_ADDEND, SET_RELOC_ADDEND): Delete.
84 (mips_elf_generic_reloc, struct mips_hi16, mips_elf_hi16_reloc)
85 (mips_elf_lo16_reloc, mips_elf_got16_reloc): Delete.
86 (mips_elf_gprel16_reloc): Delete use of GET_RELOC_ADDEND.
87 (mips_elf_literal_reloc, mips_elf_gprel32_reloc): Likewise.
88 (mips16_jump_reloc, mips16_gprel_reloc): Likewise.
89 (mips_elf_shift6_reloc): Likewise. Delete use of SET_RELOC_ADDEND.
90
91 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Use
92 _bfd_relocate_contents to install an in-place addend.
93 (mips_hi16): New structure.
94 (mips_hi16_list): Moved from elf32-mips.c.
95 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_got16_reloc): New functions.
96 (_bfd_mips_elf_lo16_reloc, _bfd_mips_elf_generic_reloc): New functions.
97 (mips_elf_calculate_relocation): Assume addend is unshifted.
98 (_bfd_mips_elf_relocate_section): Don't apply the howto rightshift
99 on top of the usual high-part shift. Don't shift the addend right
100 before calling mips_elf_calculate_relocation.
101
102 * elfxx-mips.h (_bfd_mips_elf_hi16_reloc): Declare.
103 (_bfd_mips_elf_got16_reloc, _bfd_mips_elf_lo16_reloc): Declare.
104 (_bfd_mips_elf_generic_reloc): Declare.
105
106 2003-12-16 Eric Youngdale <eric@mkssoftware.com>
107 Nick Clifton <nickc@redhat.com>
108
109 * peicode.h (pe_ILF_build_a_bfd): Only skip one instance of each
110 prefix character, if they are present.
111
112 2003-12-15 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
113 Nick Clifton <nickc@redhat.com>
114
115 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Ensure that correct flags
116 are set on known section types.
117
118 2003-12-12 Nick Clifton <nickc@redhat.com>
119
120 * po/ro.po: Updated translation.
121
122 2003-12-12 Alan Modra <amodra@bigpond.net.au>
123
124 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Check for
125 NULL dyn_h.
126
127 2003-12-11 Nick Clifton <nickc@redhat.com>
128
129 * elf.c (INCLUDE_SECTION_IN_SEGMENT): Skip PT_GNU_STACK segments.
130
131 2003-12-08 Richard Sandiford <rsandifo@redhat.com>
132
133 * elfxx-mips.h, elfxx-mips.c, cpu-mips.c: Convert prototypes.
134 Remove casts that were only needed for K&R compatibility.
135
136 2003-12-08 Alan Modra <amodra@bigpond.net.au>
137
138 * elf-bfd.h (struct elf_backend_data): Remove "bfd *" and add
139 "elflink_hash_entry *" param to elf_backend_link_output_symbol_hook.
140 Add "elflink_hash_entry *" param to elf_backend_output_arch_syms.
141 * elflink.h (elf_link_output_sym): Add "elflink_hash_entry *" param,
142 and pass to output_symbol_hook.
143 (elf_bfd_final_link): Adjust elf_link_output_sym calls.
144 (elf_link_output_extsym): Likewise.
145 (elf_link_input_bfd): Likewise.
146 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Adjust.
147 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
148 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
149 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
150 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
151 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
152 * elf64-sparc.c (sparc64_elf_output_arch_syms): Likewise.
153 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
154 Validate dynh->h against h.
155 * elf64-ppc.c (struct ppc_link_hash_entry): Add adjust_done bitfield.
156 (link_hash_newfunc): Init it.
157 (adjust_opd_syms): New function.
158 (ppc64_elf_edit_opd): Set adjust_done when global .opd sym adjusted.
159 Set opd.adjust for all .opd relocs. Call adjust_opd_syms.
160 (ppc64_elf_tls_optimize): Adjust possible .opd sym values here.
161 (ppc64_elf_relocate_section): Also adjust syms not a multiple of 24.
162 (ppc64_elf_output_symbol_hook): New function.
163 (elf_backend_link_output_symbol_hook): Define.
164
165 2003-12-07 Richard Sandiford <rsandifo@redhat.com>
166
167 * elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
168 Remove casts that were only needed for K&R compatibility.
169
170 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
171
172 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
173 partial_inplace for these relocs to FALSE for comptability with
174 the MS linker.
175 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
176 generated by MS linker, and brings the relocation in line the MS
177 PE documentation.
178
179 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
180
181 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
182
183 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
184
185 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
186 need_relax_finalize field in link_info instead of
187 relax_finalizing to check if the relax finalize pass is being
188 done.
189
190 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
191
192 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
193 Change ARM26* to ARM_26* in comments to match definitions.
194 (coff_arm_adjust_symndx): Replace hard-coded constants with
195 appropriate definitions (ARM_26*).
196
197 2003-12-04 Alan Modra <amodra@bigpond.net.au>
198
199 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
200 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
201 (mn10300_elf_relax_section): Likewise.
202 * nlm32-alpha.c (ONES): Define.
203 (nlm32_alpha_howto_table): Use it to avoid warnings.
204
205 2003-12-04 Alan Modra <amodra@bigpond.net.au>
206
207 * elf32-i386.c (elf_i386_object_p): Delete.
208 (elf_backend_object_p): Don't define.
209 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
210 * elf32-sh.c (sh_elf_object_p): Likewise.
211 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
212 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
213 * elf64-s390.c (elf_s390_object_p): Likewise.
214 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
215
216 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
217
218 * archures.c (bfd_mach_m32r2): Add new machine type.
219 * bfd-in2.h: Regenerate.
220 * cpu-m32r.c : Add new machine type.
221 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
222 m32r_elf_merge_private_bfd_data): Add support for new machine
223 type.
224
225 2003-12-03 Dave Airlie <airlied@linux.ie>
226
227 * config.bfd: Add vax-linux-gnu target.
228 * configure.in: Likewise.
229 * configure: Regenerate.
230
231 2003-12-03 Alan Modra <amodra@bigpond.net.au>
232
233 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
234 bfd_link_hash_entry field "next" -> "und_next".
235 * linker.c (_bfd_link_hash_newfunc): Likewise.
236 (bfd_link_add_undef): Likewise.
237 (_bfd_generic_link_add_archive_symbols): Likewise.
238 (_bfd_generic_link_add_one_symbol): Likewise.
239 * xcofflink.c (xcoff_link_add_symbols): Likewise.
240
241 2003-12-02 Nick Clifton <nickc@redhat.com>
242
243 * configure.in (ALL_LINGUAS): Add ro.
244 * po/ro.po: New Romanian translation.
245
246 2003-12-02 Alan Modra <amodra@bigpond.net.au>
247
248 * Makefile.am: Run "make dep-am".
249 * Makefile.in: Regenerate.
250
251 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
252
253 * coffcode.h (coff_compute_section_file_positions): Set page_size
254 to 1 instead of 0 in the case file alignment value is zero.
255
256 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
257
258 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
259 * coff64-rs6000.c: Likewise.
260 * coffcode.h: Likewise.
261 * elf32-vax.c: Likewise.
262 * hash.c: Likewise.
263 * hppabsd-core.c: Likewise.
264 * hpux-core.c: Likewise.
265 * ihex.c: Likewise.
266 * netbsd-core.c: Likewise.
267 * osf-core.c: Likewise.
268 * pdp11.c: Likewise.
269 * ptrace-core.c: Likewise.
270 * sco5-core.c: Likewise.
271 * section.c: Likewise.
272 * sunos.c: Likewise.
273 * trad-core.c: Likewise.
274
275 2003-12-01 Alan Modra <amodra@bigpond.net.au>
276
277 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
278 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
279 (_bfd_elf_link_just_syms): Likewise.
280 (bfd_elf_get_needed_list): Likewise.
281 (bfd_elf_get_runpath_list): Likewise.
282 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
283 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
284 creator flavour.
285 (elf32_hppa_set_gp): Look up output sections rather than using htab.
286 * elf32-i960.c: Comment fix. Formatting.
287 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
288 rather than testing creator flavour.
289 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
290 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
291 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
292 is_elf_hash_table change. Remove redundant test.
293 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
294 testing creator flavour.
295 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
296 (_bfd_elf_fix_symbol_flags): Likewise.
297 (_bfd_elf_adjust_dynamic_symbol): Likewise.
298 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
299 checks. Use is_elf_hash_table rather than testing creator flavour.
300 Use hash_table throughout in place of info->hash.
301 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
302 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
303 check.
304 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
305 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
306 testing creator flavour.
307 (elf_gc_sections): Add is_elf_hash_table check.
308 (elf_gc_common_finalize_got_offsets): Likewise.
309 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
310 redundant check.
311 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
312 rather than testing creator flavour.
313
314 2003-11-28 Christian Groessler <chris@groessler.org>
315
316 * cpu-z8k.c: Convert to ISO C90.
317 * coff-z8k.c: Likewise.
318
319 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
320
321 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
322 Add link info argument.
323 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
324 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
325 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
326 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
327 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
328 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
329 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
330 * elf.c (assign_file_positions_except_relocs,
331 assign_file_positions_for_segments): Likewise. Adjust calls.
332
333 2003-11-27 Mark Kettenis <kettenis@gnu.org>
334
335 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
336 of the note.
337
338 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
339 Richard Sandiford <rsandifo@redhat.com>
340
341 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
342 (mips_elf_set_no_stub): New function.
343 (mips_elf_multi_got): Call it.
344 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
345 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
346 use mips_elf_create_dynamic_relocation to deal with any compatibility
347 issues. Store the adjusted addend in the GOT slot.
348
349 2003-11-25 Mattias Engdegård <mattias@virtutech.se>
350
351 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
352 procesing N_BINCL stabs.
353
354 2003-11-25 Alan Modra <amodra@bigpond.net.au>
355
356 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
357 ppc_stub_plt_call to symbols defined in shared libs.
358
359 2003-11-22 Jakub Jelinek <jakub@redhat.com>
360
361 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
362 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
363 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
364 (elf_i386_check_relocs): Set it.
365 (elf_i386_finish_dynamic_symbol): If it is not set,
366 clear st_value of SHN_UNDEF symbol.
367
368 2003-11-20 Jim Blandy <jimb@redhat.com>
369
370 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
371 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
372
373 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
374
375 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
376 section for reloc output and subtract the output section's address
377 from the addend when converting a relocation into one against a
378 section symbol.
379 * elf64-s390.c (elf_s390_relocate_section): Likewise.
380
381 2003-11-18 James E Wilson <wilson@specifixinc.com>
382
383 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
384 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
385 for ia64_info->rel_fptr_sec.
386
387 2003-11-18 Alan Modra <amodra@bigpond.net.au>
388
389 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
390 size is zero.
391
392 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
393
394 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
395 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
396 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
397 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
398 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
399 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
400 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
401 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
402 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
403 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
404 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
405 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
406 (elf_backend_copy_indirect_symbol): Don't define.
407
408 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
409
410 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
411 GOT entries.
412
413 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
414
415 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
416 to R_390_RELATIVE. Convert the other relocations against local
417 symbols to relocations against the start of the section.
418 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
419 to R_390_RELATIVE. Convert the other relocations against local
420 symbols to relocations against the start of the section.
421
422 2003-11-11 Nick Clifton <nickc@redhat.com>
423
424 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
425 info->executable not info->shared to decide if a .interp section
426 should be present.
427 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
428 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
429 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
430 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
431 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
432 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
433 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
434 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
435 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
436 * elflink.h (size_dynamic_sections): Likewise.
437
438 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
439
440 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
441 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
442 found initialise the tls data directory entry.
443
444 2003-11-07 Alan Modra <amodra@bigpond.net.au>
445
446 * elf32-ppc.c (ppc_elf_install_value): Delete.
447 (shared_stub_entry, stub_entry): Make them arrays of ints.
448 Remove initial branch.
449 (ppc_elf_relax_section): Write one branch around all trampolines
450 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
451 branch range check. Only use shared_stub_entry when shared.
452 Test that branches can reach stubs. Write trampolines out at
453 end so that just one realloc is used. Handle little-endian
454 mode. Move relevant code from ppc_elf_install_value to here.
455 (ppc_elf_relocate_section): Move code handling RELAX32 from
456 ppc_elf_install_value to here.
457
458 2003-11-06 Alan Modra <amodra@bigpond.net.au>
459
460 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
461 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
462 cases.
463 (shared_stub_entry): Correct opcode.
464 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
465 (ppc_elf_relocate_section): Handle them.
466
467 2003-11-05 Alan Modra <amodra@bigpond.net.au>
468
469 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
470 updated section in case of merged section.
471 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
472 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
473 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
474 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
475 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
476 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
477 * elf32-cris.c (cris_elf_relocate_section): Likewise.
478 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
479 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
480 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
481 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
482 * elf32-i370.c (i370_elf_relocate_section): Likewise.
483 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
484 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
485 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
486 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
487 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
488 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
489 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
490 * elf32-s390.c (elf_s390_relocate_section): Likewise.
491 * elf32-sh.c (sh_elf_relocate_section): Likewise.
492 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
493 * elf32-v850.c (v850_elf_relocate_section) Likewise.
494 * elf32-vax.c (elf_vax_relocate_section): Likewise.
495 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
496 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
497 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
498 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
499 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
500 * elf64-s390.c (elf_s390_relocate_section): Likewise.
501 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
502 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
503 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
504 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
505
506 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
507 section for reloc output.
508 * elf32-i370.c (i370_elf_relocate_section): Likewise.
509 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
510 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
511 * elf32-vax.c (elf_vax_relocate_section): Likewise.
512 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
513 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
514
515 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
516 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
517 return value.
518 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
519 sec->id.
520
521 2003-11-05 Alan Modra <amodra@bigpond.net.au>
522
523 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
524 (elf32_d10v_relocate_section): Use them to handle -r reloc
525 adjustments, and in place of _bfd_elf_rela_local_sym.
526
527 * cpu-iq2000.c (arch_info_struct): Warning fix.
528
529 2003-11-05 Alan Modra <amodra@bigpond.net.au>
530
531 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
532 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
533 weakdefs.
534 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
535 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
536 NON_GOT_REF.
537 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
538 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
539 non-default visibility.
540 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
541 SYMBOL_CALLS_LOCAL.
542
543 2003-11-04 Alan Modra <amodra@bigpond.net.au>
544
545 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
546 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
547 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
548 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
549 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
550 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
551 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
552
553 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
554 "dereferencing type-punned pointer" warnings.
555
556 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
557 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
558 * bfd-in2.h: Regenerate.
559 * binary.c (binary_set_section_contents): Ditto.
560 * bout.c (b_out_set_section_contents): Ditto.
561 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
562 * coffcode.h (coff_set_section_contents): Ditto.
563 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
564 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
565 * elf.c (_bfd_elf_set_section_contents): Ditto.
566 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
567 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
568 * i386msdos.c (msdos_set_section_contents): Ditto.
569 * ieee.c (ieee_set_section_contents): Ditto.
570 * ihex.c (ihex_set_section_contents): Ditto.
571 * libaout.h (NAME(aout,set_section_contents)): Ditto.
572 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
573 (_bfd_generic_set_section_contents): Ditto.
574 * libbfd.h: Regenerate.
575 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
576 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
577 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
578 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
579 * mmo.c (mmo_set_section_contents): Ditto.
580 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
581 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
582 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
583 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
584 * nlmcode.h (nlm_set_section_contents): Ditto.
585 * oasys.c (oasys_set_section_contents): Ditto.
586 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
587 * ppcboot.c (ppcboot_set_section_contents): Ditto.
588 * srec.c (srec_set_section_contents): Ditto.
589 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
590 * tekhex.c (tekhex_set_section_contents): Ditto.
591 (move_section_contents): Ditto.
592 * versados.c (versados_set_section_contents): Ditto.
593 * vms-misc.c (_bfd_save_vms_section): Ditto.
594 * vms.c (vms_set_section_contents): Ditto.
595 * vms.h (_bfd_save_vms_section): Ditto.
596
597 2003-11-04 Alan Modra <amodra@bigpond.net.au>
598
599 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
600 rather than htab.
601 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
602 relbrlt size.
603 (ppc64_elf_build_stubs): Allocate space for relbrlt.
604
605 2003-11-04 Alan Modra <amodra@bigpond.net.au>
606
607 * bfd-in.h (_bfd_elf_tls_setup): Declare.
608 * bfd-in2.h: Regenerate.
609 * elf-bfd.h (struct elf_link_tls_segment): Delete.
610 (struct elf_link_hash_table): Add tls_sec and tls_size.
611 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
612 * elflink.c (_bfd_elf_tls_setup): New function.
613 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
614 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
615 saving tls segment info, round segment size up.
616 (elf_link_output_extsym): Adjust code using tls segment info.
617 (elf_link_input_bfd): Likewise.
618 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
619 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
620 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
621 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
622 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
623 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
624 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
625 (elfNN_ia64_dtprel_base): Likewise.
626 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
627 (alpha_get_tprel_base): Likewise.
628 (struct alpha_relax_info): Remove tls_segment.
629 (elf64_alpha_relax_got_load): Adjust invocation of
630 alpha_get_dtprel_base and alpha_get_tprel_base.
631 (elf64_alpha_relax_tls_get_addr): Likewise.
632 (elf64_alpha_relax_section): Likewise.
633 (elf64_alpha_relocate_section): Likewise.
634 (elf64_alpha_relax_find_tls_segment): Delete.
635 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
636 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
637 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
638 * elf32-ppc.h (ppc_elf_tls_setup): Update.
639 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
640 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
641 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
642 (ppc64_elf_relocate_section): Likewise.
643 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
644
645 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
646
647 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
648 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
649 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
650 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
651 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
652 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
653 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
654 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
655 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
656 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
657 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
658 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
659 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
660 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
661 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
662 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
663 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
664 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
665 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
666 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
667 * elfxx-target.h (elf_backend_plt_header_size): Don't define
668 or include in target initializer.
669
670 2003-11-03 Andrew Cagney <cagney@redhat.com>
671
672 * section.c (bfd_set_section_contents): Make the "location" buffer
673 constant.
674 * bfd-in2.h: Re-generate.
675
676 2003-10-30 Andrew Cagney <cagney@redhat.com>
677
678 * syms.c: Replace "struct symbol_cache_entry" with "struct
679 bfd_symbol".
680 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
681 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
682 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
683 * bfd-in2.h: Re-generate.
684
685 2003-10-30 Jakub Jelinek <jakub@redhat.com>
686
687 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
688 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
689 fields.
690 (struct elfNN_ia64_local_hash_table): Remove.
691 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
692 to htab_t. Add loc_hash_memory field.
693 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
694 Removed.
695 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
696 functions.
697 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
698 loc_hash_table. Initialize loc_hash_memory.
699 (elfNN_ia64_hash_table_free): New function.
700 (elfNN_ia64_local_hash_lookup): Remove.
701 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
702 callback.
703 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
704 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
705 (bfd_elfNN_bfd_link_hash_table_free): Define.
706
707 2003-10-30 Alan Modra <amodra@bigpond.net.au>
708
709 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
710 symbol string in place.
711
712 2003-10-30 Jim Blandy <jimb@redhat.com>
713
714 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
715 object's mach field: all PowerPC machines are supersets of the
716 original rs6000, but not later rs6000 machines.
717
718 2003-10-30 Alan Modra <amodra@bigpond.net.au>
719
720 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
721 Add "val" and "sval" fields.
722 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
723 (read_attribute_value): Expand and adjust DW_* occurrences.
724 (scan_unit_for_functions, parse_comp_unit): Likewise.
725
726 2003-10-30 Phil Edwards <phil@codesourcery.com>
727
728 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
729 other common ELF triples.
730 (i[3-7]86-*-vxworks): Change to ELF format.
731 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
732 (sh-*-vxworks): New stanza.
733
734 2003-10-30 Lars Knoll <lars@trolltech.com>
735 Michael Matz <matz@suse.de>
736 Jakub Jelinek <jakub@redhat.com>
737 Alan Modra <amodra@bigpond.net.au>
738
739 * merge.c (struct sec_merge_sec_info): Update comment.
740 (struct sec_merge_hash_entry): Remove entsize.
741 (sec_merge_hash_lookup): Only adjust alignment when creating.
742 (sec_merge_emit): Remove register keyword.
743 (cmplengthentry, last4_eq, last_eq): Delete.
744 (strrevcmp, strrevcmp_align, is_suffix): New.
745 (merge_strings): Use them to implement fast suffix merging.
746 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
747 Make "len" signed.
748 (_bfd_elf_strtab_add): Lose on >2G strings.
749 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
750 (cmplengthentry, last4_eq): Delete.
751 (strrevcmp, is_suffix): New.
752 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
753
754 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
755
756 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
757 SEC_ALLOC.
758
759 2003-10-29 Philip Blundell <philb@gnu.org>
760
761 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
762 code sequence.
763 (PLT_HEADER_SIZE): New.
764 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
765 (struct elf32_arm_relocs_copied): ... this. Count both
766 pcrel and non-pcrel relocs. All uses updated.
767 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
768 sections and symbol/section mapping cache.
769 (create_got_section): New.
770 (elf32_arm_create_dynamic_sections): New.
771 (elf_backend_create_dynamic_sections): Use it.
772 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
773 (elf32_arm_check_relocs): Likewise.
774 (elf32_arm_adjust_dynamic_symbol): Likewise.
775 (elf32_arm_copy_indirect_symbol): New.
776 (elf32_arm_link_hash_table_create): Initialise new fields.
777 (elf32_arm_gc_sweep_hook): Implement.
778 (elf32_arm_discard_copies): Delete.
779 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
780 (elf32_arm_finish_dynamic_sections): Likewise.
781 (elf_backend_can_refcount): Define.
782 (elf_backend_copy_indirect_symbol): Likewise.
783 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
784
785 2003-10-29 Alan Modra <amodra@bigpond.net.au>
786
787 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
788 (elf_backend_grok_psinfo): Define.
789 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
790
791 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
792 sections with the same name.
793 (elfcore_grok_lwpstatus): Likewise.
794 (elfcore_grok_win32pstatus): Likewise.
795 (elfcore_grok_note): Likewise.
796 (elfcore_grok_nto_status): Likewise.
797 (elfcore_grok_nto_gregs): Likewise.
798
799 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
800
801 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
802 objects.
803
804 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
805
806 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
807
808 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
809
810 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
811 hash table for real symbols.
812
813 2003-10-23 Michael Snyder <msnyder@redhat.com>
814
815 * section.c (asection): Fix typo in comment.
816
817 2003-10-23 Alan Modra <amodra@bigpond.net.au>
818
819 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
820 reloc symbol index to it. Don't allow gd syms in shared libs
821 to be optimized.
822 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
823 (ppc64_elf_size_stubs): Likewise.
824 (ppc64_elf_relocate_section): Check that tls relocs are only used
825 with tls syms, and similarly for non-tls. Correct symbol used
826 when optimizing toc tls code.
827
828 2003-10-22 Nick Clifton <nickc@redhat.com>
829
830 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
831 processing an executable.
832
833 2003-10-22 Jakub Jelinek <jakub@redhat.com>
834
835 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
836 field changes.
837 (_bfd_elf_link_assign_sym_version): Likewise.
838 * elflink.h (size_dynamic_sections): Likewise.
839
840 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
841 Michael Snyder <msnyder@redhat.com>
842
843 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
844 bfd_mach_sh4a_nofpu): New machine types.
845 * bfd-in2.h: Rebuilt.
846 * cpu-sh.c (compatible): Remove unused function.
847 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
848 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
849 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
850
851 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
852
853 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
854 describing mismatched formats involving the Maverick FP type.
855
856 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
857
858 * binary.c (binary_object_p): Pass machine flag along with
859 architecture.
860
861 2003-10-21 Thorsten Brehm <brehm@gmx.net>
862
863 * archures.c (bfd_default_scan): Add support for mcf528x.
864 * ieee.c (ieee_write_processor): Likewise.
865
866 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
867 Bernardo Innocenti <bernie@develer.com>
868
869 * archures.c: Add MCF528x (MCFv4) support.
870 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
871 * bfd-in2.h: Regenerate.
872
873 2003-10-20 Andrew Cagney <cagney@redhat.com>
874
875 * targets.c: Replace "struct sec" with "struct bfd_section"
876 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
877 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
878 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
879 * aout-tic30.c, aout-target.h:
880 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
881
882 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
883
884 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
885 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
886 (struct _mmix_elf_section_data): New member pjs.
887 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
888 functions.
889 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
890 (mmix_reloc_map): Ditto.
891 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
892 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
893 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
894 unused.
895 (mmix_elf_check_relocs): Move early return to after
896 mmix_elf_check_common_relocs call.
897 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
898 (_bfd_mmix_before_linker_allocation): Rename from
899 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
900 Arrange to set the initial relaxable size of sections.
901 (_bfd_mmix_after_linker_allocation): Rename from
902 _bfd_mmix_finalize_linker_allocated_gregs.
903 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
904 (bfd_elf64_get_section_contents): Define.
905 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
906 * libbfd.h, bfd-in2.h: Regenerate.
907
908 * reloc.c (bfd_generic_relax_section): Default-set
909 section->_cooked_size here.
910 (bfd_generic_get_relocated_section_contents): Don't set it here.
911 Explain why.
912
913 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
914
915 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
916 output section has been discarded.
917
918 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
919
920 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
921 (h8300_reloc16_extra_cases): Likewise.
922 (h8300_bfd_link_add_symbols): Likewise.
923
924 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
925
926 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
927 (h8300sn_info_struct): Likewise.
928 (h8300hn_info_struct): Likewise.
929
930 2003-10-16 Pavel Roskin <proski@gnu.org>
931
932 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
933 for sections which lack size info.
934
935 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
936
937 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
938 mingw32.
939
940 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
941
942 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
943 undefined patterns with '*'.
944
945 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
946
947 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
948 use the last CIE from a different section.
949 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
950 size of the output section.
951
952 2003-10-07 Roland McGrath <roland@redhat.com>
953
954 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
955 new section from p_align header field.
956
957 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
958
959 * elf32-xtensa.c (xtensa_read_table_entries): The external size
960 of entry is 8 bytes.
961
962 2003-10-15 Andrew Cagney <cagney@redhat.com>
963
964 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
965 with NAME##_canonicalize_symtab.
966 * libcoff-in.h (coff_canonicalize_symtab): Update.
967 * xsym.h (bfd_sym_canonicalize_symtab): Update.
968 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
969 * coffgen.c (coff_canonicalize_symtab): Update.
970 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
971 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
972 * ieee.c (ieee_vec): Update comment.
973 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
974 * mmo.c (mmo_canonicalize_symtab): Update.
975 * nlm-target.h (nlm_canonicalize_symtab): Update.
976 * nlmcode.h (nlm_canonicalize_symtab): Update.
977 * i386msdos.c (msdos_canonicalize_symtab): Update.
978 * hp300hpux.c (MY (canonicalize_symtab)): Update.
979 * oasys.c (oasys_canonicalize_symtab): Update.
980 * som.c (som_canonicalize_symtab): Update.
981 * pef.c (bfd_pef_canonicalize_symtab): Update.
982 * nlmcode.h (nlm_canonicalize_symtab): Update.
983 * xsym.c (bfd_sym_canonicalize_symtab): Update.
984 * vms.c (vms_canonicalize_symtab): Update.
985 * versados.c (versados_canonicalize_symtab): Update.
986 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
987 * ieee.c (ieee_canonicalize_symtab): Update.
988 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
989 * reloc.c: Update comment.
990 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
991 * coff64-rs6000.c (aix5coff64_vec): Update.
992 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
993 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
994 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
995 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
996 * hp300hpux.c (MY_canonicalize_symtab): Update.
997 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
998 * aout-tic30.c (MY_canonicalize_symtab): Update.
999 * aout-target.h (MY_canonicalize_symtab): Update.
1000 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
1001 * elf.c (_bfd_elf_canonicalize_symtab): Update.
1002 * elfcode.h (elf_canonicalize_symtab): Update.
1003 * ihex.c (ihex_canonicalize_symtab): Update.
1004 * tekhex.c (tekhex_canonicalize_symtab): Update.
1005 * binary.c (binary_canonicalize_symtab): Update.
1006 * srec.c (srec_canonicalize_symtab): Update.
1007
1008 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
1009
1010 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
1011
1012 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1013
1014 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
1015 relocations.
1016 (sh_elf_check_relocs): Likewise.
1017
1018 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
1019 (sh64_elf_merge_symbol_attribute): New.
1020 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
1021 (sh64_elf64_merge_symbol_attribute): New.
1022
1023 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1024
1025 * elf-bfd.h (struct elf_backend_data): New function pointer member
1026 elf_backend_merge_symbol_attribute.
1027 * elflink.h (elf_link_add_object_symbols): Adjust call to
1028 elf_backend_merge_symbol_attribute if the backend defined it.
1029 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
1030 (elfNN_bed): Add that to the initializer.
1031
1032 2003-10-14 Bob Wilson <bob.wilson@acm.org>
1033
1034 * elf32-xtensa.c (get_is_linkonce_section): Delete.
1035 (xtensa_is_property_section, xtensa_is_littable_section): Use
1036 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
1037 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
1038 (xtensa_get_property_section_name): Check section name instead of
1039 calling get_is_linkonce_section. Remove unused bfd parameter. Use
1040 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
1041 linkonce section names by appending ".xt.insn" or ".xt.lit".
1042 (xtensa_read_table_entries): Remove bfd argument in call to
1043 xtensa_get_property_section_name. Free section name when done.
1044 (elf_xtensa_combine_prop_entries): Free leaking table.
1045
1046 2003-10-13 Richard Sandiford <rsandifo@redht.com>
1047
1048 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
1049 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
1050 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
1051 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
1052 that were needed.
1053 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
1054 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
1055
1056 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
1057
1058 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
1059 (bfd_elf64_ia64_after_parse): Likewise.
1060 * bfd-in2.h: Regenerated.
1061
1062 * elfxx-ia64.c (oor_ip): New.
1063 (oor_branch_size): Likewise.
1064 (bfd_elfNN_ia64_after_parse): Likewise.
1065 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
1066 equals sizeof (oor_ip).
1067
1068 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1069
1070 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
1071 renumbering of some relocation numbers.
1072
1073 2003-10-11 Alan Modra <amodra@bigpond.net.au>
1074
1075 * coff-sh.c: Move definition of MAP and guard more code with
1076 COFF_IMAGE_WITH_PE.
1077
1078 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
1079 * bfd-in2.h: Regenerate.
1080
1081 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
1082
1083 * Makefile.am: Run "make dep-am".
1084 * Makefile.in: Regenerate.
1085 * doc/Makefile.in: Likewise.
1086
1087 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
1088
1089 * cofflink.c: Include "safe-ctype.h".
1090 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
1091
1092 2003-10-08 Dave Brolley <brolley@redhat.com>
1093 On behalf of Michael Snyder <msnyder@redhat.com>
1094
1095 * archures.c: Add FRV fr550 machine.
1096 * cpu-frv.c: Ditto.
1097 * elf32-frv.c: Ditto.
1098 * bfd-in2.h: Regenerate.
1099
1100 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1101
1102 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
1103 for non-SGI N64 ABI. Improve code consitency.
1104
1105 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
1106
1107 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
1108 rightshift to 2.
1109
1110 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
1111
1112 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
1113 parameter.
1114 * cofflink.c (coff_link_add_symbols): Deal with split stab
1115 sections.
1116 * elflink.h (elf_link_add_object_symbols): Deal with split stab
1117 sections.
1118 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
1119 * libbfd.h: Regenerated.
1120
1121 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
1122 overflow, set reloc start position to after the count
1123 reloc. Subtract one from num relocs. Give error on 0xffff relocs
1124 and no overflow.
1125 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
1126 overflow.
1127 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
1128 0xffff.
1129
1130 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
1131
1132 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
1133 last CIE/FDE if needed.
1134
1135 2003-10-06 Nick Clifton <nickc@redhat.com>
1136
1137 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
1138 BFD64 is enabled.
1139
1140 2003-10-06 Matt Thomas <matt@3am-software.com>
1141
1142 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
1143
1144 2003-10-06 Robert Millan <robertmh@gnu.org>
1145
1146 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
1147 * config.bfd: Likewise.
1148 * configure: Regenerate.
1149
1150 2003-10-04 Christian Groessler <chris@groessler.org>
1151
1152 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
1153 and R_CALLR.
1154
1155 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1156
1157 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
1158 * elf32-m68hc11.c: Likewise.
1159 * elf32-m68hc12.c: Likewise.
1160 * elf32-m68hc1x.h: Likewise.
1161
1162 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1163
1164 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
1165 of flags between HC12 and HCS12.
1166
1167 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
1168
1169 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1170 which become empty after merging.
1171
1172 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1173
1174 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1175 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1176
1177 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1178
1179 * archures.c (bfd_mach_mipsisa64r2): New define.
1180 * bfd-in2.h: Regenerate.
1181 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1182 * cpu-mips.c (I_mipsisa64r2): New enum value.
1183 (arch_info_struct): Add entry for I_mipsisa64r2.
1184 * elfxx-mips.c (_bfd_elf_mips_mach)
1185 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1186 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1187 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1188
1189 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1190
1191 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1192 Handle SHN_IA_64_ANSI_COMMON.
1193 (elf_backend_section_from_bfd_section): Defined.
1194
1195 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1196
1197 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1198 of a pointer to section. Check bad symbol index.
1199 (_bfd_elf_link_read_relocs): Modify calls to
1200 elf_link_read_relocs_from_section.
1201
1202 2003-09-23 DJ Delorie <dj@redhat.com>
1203
1204 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1205 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1206 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1207 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1208 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1209 R_SH_PSHA, R_SH_PSHL added.
1210 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1211 (sh_elf_relocate_section): Support new relocs.
1212
1213 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1214
1215 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1216 dynamic relocation offsets.
1217
1218 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1219
1220 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1221 hash table using _bfd_generic_link_hash_table_free.
1222
1223 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1224
1225 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1226 type of prefix_length and suffix_length to int. Rename "attributes"
1227 to "attr". Comment.
1228 (_bfd_elf_get_sec_type_attr): Update prototype.
1229 * elf.c (get_special_section): Rewrite.
1230 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1231 attr and type pointers.
1232 (_bfd_elf_new_section_hook): Adjust for above.
1233 (special_sections): Merge suffix with prefix. Set
1234 prefix_length for all entries. Set suffix_length appropriately.
1235 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1236 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1237 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1238 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1239 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1240 * elf32-v850.c (v850_elf_special_sections): Likewise.
1241 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1242 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1243 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1244 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1245 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1246 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1247 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1248 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1249
1250 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1251
1252 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1253 ->got if the section already exists.
1254
1255 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1256
1257 * dwarf2.c (decode_line_info): Cope with an initially empty
1258 filename table.
1259
1260 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1261
1262 * acinclude.m4: Include ../config/accross.m4.
1263 * aclocal.m4: Regenerated.
1264
1265 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1266 or long long.
1267 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1268 (host64): Remove if HOST_64BIT_TYPE is set to long.
1269
1270 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1271 long and long long.
1272 (HOST_U_64BIT_TYPE): Likewise.
1273 (host64): Likewise.
1274 * configure: Regenerated.
1275
1276 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1277
1278 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1279 since some ABIs round up the size of the struct.
1280
1281 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1282
1283 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1284 the old symbol is undefined and the new symbol is defined.
1285
1286 2003-09-18 Andreas Schwab <schwab@suse.de>
1287
1288 * simple.c (bfd_simple_get_relocated_section_contents): Use
1289 _bfd_generic_link_hash_table_create instead of
1290 bfd_link_hash_table_create.
1291
1292 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1295 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1296
1297 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1298 Randolph Chung <randolph@tausq.org>
1299
1300 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1301 hppa_link_hash_newfunc, hppa_build_one_stub,
1302 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1303 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1304 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1305 for generating import stubs for calls to statically linked PIC
1306 functions.
1307 (hppa_type_of_stub): Don't generate an import stub for calls to
1308 statically linked pic functions. Generate import stubs for calls
1309 in a shared object, to functions not in a regular file, and to
1310 defined weak functions. Add new argument INFO.
1311 (hppa_build_one_stub): Don't undef ADDIL_DP.
1312 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1313 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1314 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1315 non-shared link. Convert instructions that use the the linkage table
1316 pointer, or a facsimile thereof, to use the global data pointer when
1317 the reloc has been changed.
1318
1319 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1320
1321 * archures.c: Add new machine names for hppa.
1322 * bfd-in2.h: Regenerate.
1323 * cpu-hppa.c: Use the new machine names.
1324
1325 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1326
1327 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1328 all_local_syms member.
1329 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1330 to get the local symbols.
1331
1332 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1333
1334 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1335 (elf_backend_special_sections): Define.a
1336
1337 PR savannah/4950:
1338 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1339 section is read-only.
1340
1341 2003-09-04 Nick Clifton <nickc@redhat.com>
1342
1343 * archures.c (bfd_mach_v850e1): Define.
1344 * bfd-in2.h: Regenerate.
1345 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1346 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1347 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1348 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1349 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1350 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1351 linked with v850e binaries. Mark the output as v850e.
1352
1353 2003-09-03 Nick Clifton <nickc@redhat.com>
1354
1355 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1356 symbols that are used in relocs.
1357
1358 2003-08-30 Robert Millan <robertmh@gnu.org>
1359
1360 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1361 * config.bfd: Likewise.
1362 * configure: Regenerate.
1363
1364 2003-08-31 Christian Groessler <chris@groessler.org>
1365
1366 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1367 instead of returning bfd_reloc_continue.
1368
1369 2003-08-31 Andreas Jaeger <aj@suse.de>
1370
1371 * merge.c: Update to ISO C90.
1372
1373 2003-08-27 Ian Lance Taylor <ian@airs.com>
1374
1375 * configure.in: Check for strtoull.
1376 * bfd.c (bfd_scan_vma): Use strtoull when available.
1377 * configure, config.in: Regenerate.
1378
1379 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1380 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1381 __GNUC__ when deciding whether to use long long for
1382 BFD_HOST_64_BIT.
1383 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1384
1385 2003-08-27 Christian Groessler <chris@groessler.org>
1386
1387 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1388 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1389 functions.
1390 (elf32_i860_howto_table): Insert the new functions as
1391 'special_function's in the proper reloc type entries.
1392
1393 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1394
1395 * elf32-frv.c (elf32_frv_relocate_section): Use
1396 _bfd_elf_rela_local_sym.
1397
1398 2003-08-26 Michael Snyder <msnyder@redhat.com>
1399
1400 * cpu-frv.c: Remove unused enum.
1401
1402 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1403
1404 * reloc.c: Fix documentation for MIPS ELF relocations.
1405 libbfd.h: Regenerate.
1406 bfd-in2.h: Regenerate.
1407
1408 2003-08-24 Jason Eckhardt <jle@rice.edu>
1409
1410 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1411
1412 2003-08-24 Jason Eckhardt <jle@rice.edu>
1413
1414 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1415 shift by 2 before storing the relocated value.
1416
1417 2003-08-23 Jason Eckhardt <jle@rice.edu>
1418
1419 * coff-i860.c (coff_i860_reloc_nyi): New function.
1420 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1421 LOWn, SPLITn, and BRADDR.
1422 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1423 before trying to access the entry.
1424 (coff_i860_rtype_to_howto): Likewise.
1425 (coff_i860_reloc_type_lookup): New function.
1426 (i860_reloc_processing): New function.
1427 (coff_bfd_reloc_type_lookup): Define macro.
1428 (RELOC_PROCESSING): Define macro.
1429 Minor formatting adjustments.
1430
1431 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1432
1433 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1434
1435 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1436
1437 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1438 .got section at 8 bytes.
1439
1440 2003-08-21 Nick Clifton <nickc@redhat.com>
1441
1442 * cofflink.c: Update to ISO C90 and tidy up formatting.
1443
1444 2003-08-21 Randolph Chung <tausq@debian.org>
1445
1446 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1447 can have OSABI=Linux or OSABI=SysV. Check for both.
1448 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1449
1450 2003-08-21 Nick Clifton <nickc@redhat.com>
1451
1452 * po/sv.po: Updated Swedish translation.
1453
1454 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1455
1456 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1457
1458 2003-08-20 Nick Clifton <nickc@redhat.com>
1459
1460 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1461 replace some duplicated code in most elfxx-xxxx.c files. This
1462 version uses the new fields in bfd_link_info.
1463
1464 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1465 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1466 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1467 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1468 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1469 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1470 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1471 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1472 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1473 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1474 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1475 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1476 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1477 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1478 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1479 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1480 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1481 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1482 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1483
1484 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1485 elf_hppa_remark_useless_dynamic_symbols,
1486 elf_hppa_relocate_section): Use the new fields in
1487 bfd_link_info structure.
1488 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1489 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1490 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1491 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1492 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1493 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1494
1495 * elflink.h (elf_link_output_extsym): Fix test for reporting
1496 undefined symbols in shared libraries. Remove redundant test
1497 of shlib_undefined when reporting references to forced local
1498 symbols.
1499
1500 2003-08-18 Andreas Schwab <schwab@suse.de>
1501
1502 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1503 executables.
1504
1505 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1506
1507 * simple.c (bfd_simple_get_relocated_section_contents): Move
1508 reloc_done hack to before first bfd_section_size call. Change all
1509 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1510
1511 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1512
1513 * elf64-ppc.c: Don't include elf/ppc.h.
1514
1515 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1516
1517 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1518 code to work with 64-bit bfds.
1519
1520 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1521
1522 * dep-in.sed: Remove libintl.h.
1523 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1524 (POTFILES.in): Remove target.
1525 * Makefile.in: Regenerate.
1526
1527 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1528
1529 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1530 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1531 use the function sym from the previous reloc.
1532
1533 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1534
1535 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1536 fatal if -pie.
1537 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1538 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1539 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1540 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1541 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1542 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1543 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1544 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1545 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1546 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1547 on undefined symbols if -pie.
1548 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1549
1550 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1551
1552 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1553 branch to __libc_start_main.
1554
1555 2003-08-08 Dmitry Diky <diwil@mail.ru>
1556
1557 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1558 gcc order.
1559 * cpu-msp430.c: Likewise.
1560 * elf32-msp430.c: Likewise.
1561 * bfd-in2.h: Regenerate.
1562
1563 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1564
1565 * elfxx-target.h: Remove PTR cast.
1566 * targets.c (bfd_target): Make backend_data const void *.
1567 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1568 * elf-m10300.c: Likewise.
1569 * elf.c: Likewise.
1570 * elf32-hppa.c: Likewise.
1571 * elf32-i386.c: Likewise.
1572 * elf32-m68hc1x.c: Likewise.
1573 * elf32-ppc.c: Likewise.
1574 * elf32-s390.c: Likewise.
1575 * elf32-sh.c: Likewise.
1576 * elf32-sh64.c: Likewise.
1577 * elf32-sparc.c: Likewise.
1578 * elf32-xtensa.c: Likewise.
1579 * elf64-mips.c: Likewise.
1580 * elf64-ppc.c: Likewise.
1581 * elf64-s390.c: Likewise.
1582 * elf64-sh64.c: Likewise.
1583 * elf64-sparc.c: Likewise.
1584 * elf64-x86-64.c: Likewise.
1585 * elfcode.h: Likewise.
1586 * elfcore.h: Likewise.
1587 * elflink.c: Likewise.
1588 * elflink.h: Likewise.
1589 * elfxx-ia64.c: Likewise.
1590 * elfxx-mips.c: Likewise.
1591 * elfxx-mips.h: Likewise.
1592 * elf.c (prep_headers): Remove useless check for null backend_data.
1593 * bfd-in2.h: Regenerate.
1594
1595 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1596 (NAME): Use ## rather than CONCAT4 macro.
1597 * elfcode.h: Remove one remaining PARAMS macro.
1598 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1599 * elf-strtab.c: Likewise.
1600 * elf-hppa.h: Likewise.
1601 * elf32-hppa.h: Likewise.
1602 * elf32-hppa.c: Likewise.
1603 (elf32_hppa_add_symbol_hook): Delete.
1604 (elf_backend_add_symbol_hook): Don't define.
1605 * libhppa.h: Convert to C90. Replace INLINE with inline.
1606
1607 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1608
1609 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1610 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1611 function descriptors, but warn.
1612 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1613 stub syms so that we can avoid a stub sym if we already have a
1614 plt sym. Do not redefine an existing symbol.
1615 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1616 glink.
1617
1618 2003-08-06 Nick Clifton <nickc@redhat.com>
1619
1620 * po/fr.po: Updated French translation.
1621
1622 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1623
1624 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1625 SEC_LINKER_CREATED.
1626
1627 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1628
1629 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1630 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1631
1632 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1633
1634 * coffcode.h (coff_slurp_line_table): Return with a warning
1635 message if the line number table could not be read.
1636
1637 2003-08-04 Nick Clifton <nickc@redhat.com>
1638
1639 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1640 to messages produced for .gnu.warning.SYMBOL sections.
1641
1642 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1643
1644 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1645 * elfcore.h: Likewise.
1646 * elflink.c: Likewise.
1647 * elflink.h: Likewise.
1648 * elf.c (sym_is_global): Remove INLINE.
1649 (align_file_position): Replace INLINE with inline.
1650 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1651 (elf_file_p): Replace INLINE with inline.
1652
1653 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1654
1655 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1656
1657 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1658
1659 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1660
1661 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1662
1663 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1664 ElfNN_External_Rela instead of Elf64_External_Rela.
1665
1666 2003-08-01 Nick Clifton <nickc@redhat.com>
1667
1668 * config.bfd: Add code to catch obsolete configurations and warn
1669 about them unless --enable-obsolete is used. Use this to mark
1670 vax-vms port as obsolete.
1671
1672 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1673
1674 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1675 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1676 Formatting.
1677 * elfxx-target.h: Remove PARAMS macro. Formatting.
1678
1679 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1680
1681 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1682 * elf64-ppc.c (get_fdh): New function, split out from
1683 ppc64_elf_edit_opd.
1684 (ppc64_elf_check_relocs): Use get_fdh.
1685 (func_desc_adjust): Likewise. Tidy.
1686 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1687 exit. Use get_fdh. Account for superfluous dynamic relocs.
1688 (ppc64_elf_relocate_section): Warning fix.
1689
1690 2003-07-30 Jason Eckhardt <jle@rice.edu>
1691
1692 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1693
1694 2003-07-30 Jason Eckhardt <jle@rice.edu>
1695
1696 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1697
1698 2003-07-30 Randolph Chung <tausq@debian.org>
1699
1700 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1701 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1702
1703 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1704
1705 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1706 Replace PTR with void *. Formatting.
1707 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1708 (make_mapping): Likewise.
1709
1710 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1711
1712 * elf64-ppc.c (func_desc_adjust): Give linker created function
1713 descriptor symbols a size and type.
1714 (ppc64_elf_relocate_section): Correct lq insn test.
1715
1716 2003-07-28 Eric Christopher <echristo@redhat.com>
1717
1718 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1719 (ppc_elf_install_value): New function.
1720 (ppc_elf_sort_rela): Remove.
1721 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1722 and replace with out of range branch stubs.
1723 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1724
1725 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1726
1727 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1728 from input_bfd.
1729
1730 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1731
1732 * elf.c (special_sections): Set attributes for .got and .plt.
1733
1734 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1735
1736 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1737 on function descriptors.
1738 (ELIMINATE_COPY_RELOCS): Expand comment.
1739 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1740 Do include ".toc1".
1741
1742 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1743
1744 * elf.c (_bfd_elf_new_section_hook): Set the default section
1745 type to SHT_NULL.
1746 (elf_fake_sections): Set the section type based on asect->flags
1747 if it is SHT_NULL. Don't abort on processor specific section
1748 types.
1749
1750 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1751
1752 * bfd-in2.h: Regenerated.
1753
1754 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1755
1756 * elf-bfd.h (bfd_elf_special_section): New.
1757 (elf_backend_data): Add special_sections, a pointer to
1758 bfd_elf_special_section.
1759 (elf_section_type). New.
1760 (elf_section_flags): New.
1761 (_bfd_elf_get_sec_type_attr): New.
1762
1763 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1764 real section type/flags.
1765 (special_sections): New.
1766 (get_special_section): New.
1767 (_bfd_elf_get_sec_type_attr): New.
1768 (_bfd_elf_new_section_hook): Check special_section to set
1769 elf_section_type and elf_section_flags.
1770 (elf_fake_sections): Don't use section name to set ELF section
1771 data.
1772
1773 * elf32-m32r.c (m32r_elf_special_sections): New.
1774 (elf_backend_special_sections): Defined.
1775
1776 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1777 (elf_backend_special_sections): Defined.
1778
1779 * elf32-mcore.c (mcore_elf_special_sections): New.
1780 (elf_backend_special_sections): Defined.
1781
1782 * elf32-ppc.c (ppc_elf_special_sections): New.
1783 (elf_backend_special_sections): Defined.
1784
1785 * elf32-sh64.c (sh64_elf_special_sections): New.
1786 (elf_backend_special_sections): Defined.
1787
1788 * elf32-v850.c (v850_elf_special_sections): New.
1789 (elf_backend_special_sections): Defined.
1790
1791 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1792 (elf_backend_special_sections): Defined.
1793
1794 * elf64-alpha.c (elf64_alpha_special_sections): New.
1795 (elf_backend_special_sections): Defined.
1796
1797 * elf64-hppa.c (elf64_hppa_special_sections): New.
1798 (elf_backend_special_sections): Defined.
1799
1800 * elf64-ppc.c (ppc64_elf_special_sections): New.
1801 (elf_backend_special_sections): Defined.
1802
1803 * elf64-sh64.c (sh64_elf64_special_sections): New.
1804 (elf_backend_special_sections): Defined.
1805
1806 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1807 (elf_backend_special_sections): Defined.
1808
1809 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1810
1811 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1812 (elf_backend_special_sections): Defined.
1813
1814 * elfxx-target.h (elf_backend_special_sections): New. Default
1815 to NULL.
1816 (elfNN_bed): Initialize special_sections.
1817
1818 * section.c (bfd_abs_section): Remove const.
1819 (bfd_und_section): Likewise.
1820 (bfd_com_section): Likewise.
1821 (bfd_ind_section): Likewise.
1822
1823 2003-07-24 Nick Clifton <nickc@redhat.com>
1824
1825 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1826 sections are assigned the LOAD attribute.
1827
1828 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1829
1830 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1831 * elf32-sh64-com.c: Likewise.
1832 * elf32-sh64.c: Likewise.
1833 * elf32-sh64.h: Likewise.
1834 * elf64-sh64.c: Likewise.
1835
1836 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1837
1838 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1839 (allocate_dynrelocs): Likewise.
1840 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1841 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1842
1843 2003-07-24 Nick Clifton <nickc@redhat.com>
1844
1845 * po/fr.po: Updated French translation.
1846
1847 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1848
1849 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1850 near the beginning of the file. Swap order of arguments. Call
1851 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1852 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1853 (elf_xtensa_relocate_section): Likewise.
1854 (shrink_dynamic_reloc_sections): Likewise.
1855
1856 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1857
1858 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1859 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1860 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1861 first printing an error message.
1862 (elf_xtensa_finish_dynamic_sections): Likewise.
1863 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1864 discarding literal table entries.
1865 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1866 (elf_xtensa_do_asm_simplify): Likewise.
1867
1868 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1869
1870 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1871 we have a local symbol in common section.
1872
1873 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1874
1875 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1876 weak symbols.
1877
1878 2003-07-22 Nick Clifton <nickc@redhat.com>
1879
1880 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1881 expected RS6000 storage classes.
1882
1883 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1884
1885 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1886 output_bfd unused to silence gcc.
1887
1888 2003-07-21 Nick Clifton <nickc@redhat.com>
1889
1890 * po/sv.po: Updated Swedish translation.
1891
1892 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1893
1894 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1895 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1896 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1897 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1898 now done in _bfd_elf_symbol_refs_local_p.
1899 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1900 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1901 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1902
1903 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1904
1905 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1906
1907 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1908
1909 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1910 (SYMBOL_CALLS_LOCAL): Likewise.
1911
1912 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1913 immediately if symbol isn't defined locally.
1914
1915 2003-07-18 Richard Henderson <rth@redhat.com>
1916
1917 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1918 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1919 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1920 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1921 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1922 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1923 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1924 Update all callers to provide the relocation being resolved.
1925
1926 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1927
1928 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1929 targ_cflags.
1930
1931 2003-07-17 Nick Clifton <nickc@redhat.com>
1932
1933 * po/es.po: New Spanish translation.
1934 * po/sv.po: New Swedish translation.
1935 * po/opcodes.pot: Regenerate.
1936
1937 2003-07-16 Richard Henderson <rth@redhat.com>
1938
1939 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1940 * elfxx-ia64.c, targets.c: Likewise.
1941
1942 2003-07-16 Richard Henderson <rth@redhat.com>
1943
1944 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1945 for symbols defined locally plus -Bsymbolic. Tidy logic.
1946
1947 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1948
1949 * archures.c (bfd_mach_mips7000): New.
1950 * bfd-in2.h: Regenerated.
1951 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1952 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1953 (mips_mach_extensions): Add an entry for it.
1954
1955 2003-07-14 Nick Clifton <nickc@redhat.com>
1956
1957 * po/tr.po: Update with latest version.
1958 * po/SRC-POTFILES.in: Regenerate.
1959 * po/bfd.pot: Regenerate.
1960 * Makfile.in: Regenerate.
1961 * configure: Regenerate.
1962
1963 2003-07-12 Jeff Baker <jbaker@qnx.com>
1964
1965 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1966 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1967 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1968 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1969
1970 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1971
1972 * coffcode.h (coff_set_section_contents): Set the
1973 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1974
1975 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1976
1977 * bfd-in.h (bfd_h8300_pad_address): Declare.
1978 * bfd-in2.h: Regenerate.
1979 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1980 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1981 addresses before checking whether they can be relaxed.
1982 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1983 Don't complain about overflows in general 8-bit relocations.
1984 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1985 Fix handling of R_H8_DIR24A8.
1986
1987 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1988
1989 * elf32-h8300.c: Convert function prototypes and definitions
1990 to C90 syntax.
1991 * coff-h8300.c: Likewise.
1992 * cpu-h8300.c: Likewise.
1993
1994 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1995
1996 * po/SRC-POTFILES.in: Regenerate.
1997 * po/bfd.pot: Likewise.
1998
1999 2003-07-10 Bob Wilson <bob.wilson@acm.org>
2000
2001 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
2002 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
2003 .xt.lit.plt section.
2004 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
2005 and allocate memory for it.
2006 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
2007 section to the .got.loc section.
2008 (elf_xtensa_finish_dynamic_sections): Fix up call to
2009 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
2010 the address of .got.loc.
2011 (relax_property_section): Shrink .got.loc to match changes in any
2012 literal table section.
2013 (xtensa_is_property_section): Change to match
2014 xtensa_get_property_section_name.
2015 (xtensa_is_littable_section): New.
2016
2017 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
2018
2019 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
2020 -1LL.
2021
2022 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2023
2024 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
2025 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
2026 Run "make dep-am".
2027 * Makefile.in: Regenerate.
2028
2029 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
2030
2031 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
2032 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
2033 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
2034 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
2035 * elf32-am33lin.c: Rename global functions.
2036 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
2037 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
2038 * configure.in (bfd_elf32_am33lin_vec): Added.
2039 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
2040 (elf32-am33lin.lo): List dependencies.
2041 * aclocal.m4, configure, Makefile.in: Rebuilt.
2042 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
2043 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
2044 ELF_ARCH was not defined before.
2045 (elf_symbol_leading_char): Define if not defined.
2046 * elf32-am33lin.c: Override the definitions above.
2047 * targets.c (bfd_elf32_am33lin_vec): New.
2048
2049 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2050
2051 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
2052 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
2053 pcrel_relocs_copied.
2054 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
2055 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
2056 ld-linux.so.2 to ld.so.1.
2057 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
2058 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
2059 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
2060 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2061 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
2062 .rela.* section contents with bfd_zalloc.
2063 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
2064 * elf-m10300.c: Added declarations for functions missing them.
2065 Merge some shared-library changes from the i386 back-end. Use
2066 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
2067 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
2068 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
2069 members of elf_link_hash_entry. Adjusted references.
2070 (mn10300_elf_final_link_relocate): dynobj was already loaded
2071 into a local variable, use it.
2072 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
2073 * elf-m10300.c: Add missing function prototypes.
2074 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
2075 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
2076 relocation for dynamic relocations.
2077 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2078 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
2079 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
2080 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
2081 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
2082 (_bfd_mn10300_elf_create_got_section): ... here, so that its
2083 adress is already known at the time we compute relaxations.
2084 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
2085 and PLT32 to narrower relocations.
2086 * libbfd.h, bfd-in2.h: Rebuilt.
2087 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
2088 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
2089 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
2090 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
2091 BFD_RELOC_MN10300_RELATIVE): New relocs.
2092 * libbfd.h, bfd-in2.h: Rebuilt.
2093 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
2094 (struct elf32_mn10300_link_hash_entry): Added DSO-related
2095 fields.
2096 (elf_mn10300_howto): Defined new relocation types.
2097 (mn10300_reloc_map): Map them.
2098 (_bfd_mn10300_elf_create_got_section): New fn.
2099 (mn10300_elf_check_relocs): Handle PIC relocs.
2100 (mn10300_elf_final_link_relocate): Likewise.
2101 (mn10300_elf_relocate_section): Handle DSOs.
2102 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
2103 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
2104 elf_mn10300_pic_plt_entry): New.
2105 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
2106 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
2107 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
2108 elf_mn10300_plt_reloc_offset: New macros.
2109 (ELF_DYNAMIC_INTERPRETER): Likewise.
2110 (_bfd_mn10300_elf_create_dynamic_sections): New function.
2111 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
2112 (_bfd_mn10300_elf_discard_copies): Likewise.
2113 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
2114 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
2115 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
2116 (elf_backend_can_gc_sections,
2117 elf_backend_create_dynamic_sections,
2118 elf_backend_adjust_dynamic_sections,
2119 elf_backend_size_dynamic_sections,
2120 elf_backend_finish_dynamic_symbol,
2121 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2122 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2123 elf_backend_got_header_size, elf_backend_plt_header_size): New
2124 macros.
2125
2126 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2127
2128 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
2129 * elf-m10300.c (compute_function_info): Account for AM33
2130 registers in `movm' when computing stack space for `call' when
2131 linking for AM33/2.0 link.
2132 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
2133 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
2134 * bfd-in2.h: Rebuilt.
2135 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
2136 * elf-m10300.c: Updated.
2137 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
2138 * archures.c (bfd_mach_am332): Defined.
2139 * bfd-in2.h: Rebuilt.
2140 * cpu-m10300.c (bfd_am332_arch): Defined.
2141 (bfd_am33_arch): Chained with am33-2.
2142 * elf-m10300.c (elf_mn10300_mach): Handle am332.
2143 (_bfd_mn10300_elf_final_write_processing): Likewise.
2144
2145 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
2146
2147 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
2148
2149 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2150
2151 * elf64-ppc.c (bfd_elf64_mkobject): Define.
2152 (struct ppc64_elf_obj_tdata): New.
2153 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
2154 (ppc64_elf_mkobject): New function.
2155 (struct got_entry): Add "owner". Move "tls_type".
2156 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
2157 (ppc64_elf_init_stub_bfd): New function.
2158 (create_got_section): Create header .got in dynobj. Create .got
2159 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
2160 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
2161 Look for dynobj .got, and test it.
2162 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
2163 (update_local_sym_info): Likewise.
2164 (ppc64_elf_check_relocs): Likewise.
2165 (ppc64_elf_gc_sweep_hook): Likewise.
2166 (ppc64_elf_tls_optimize): Likewise.
2167 (allocate_dynrelocs): Likewise.
2168 (ppc64_elf_size_dynamic_sections): Likewise.
2169 (ppc64_elf_relocate_section): Likewise.
2170 (ppc64_elf_next_toc_section): Update comment.
2171 (toc_adjusting_stub_needed): Remove unneeded cast.
2172 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2173 testing section flags.
2174 (ppc64_elf_build_stubs): Likewise.
2175 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2176 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2177 (func_desc_adjust): Copy over dynamic info for undef weaks.
2178 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2179 (ppc64_elf_size_stubs): Update prototype.
2180 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2181 input sections rather than scanning dynobj.
2182
2183 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2184
2185 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2186 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2187 (mips_elf_create_msym_section): Delete.
2188 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2189 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2190 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2191 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2192 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2193 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2194 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2195
2196 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2197
2198 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2199 symbols protected.
2200
2201 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2202
2203 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2204 of relocations whose offset is -2.
2205
2206 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2207
2208 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2209 forced-local symbols like other locals. Don't create relocations
2210 against STN_UNDEF in irix objects.
2211
2212 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2213
2214 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2215 compatible objects, add the values of defined external symbols
2216 to the addend.
2217
2218 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2219
2220 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2221 initialize a GOT entry to the symbol's st_value.
2222
2223 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2224
2225 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2226 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2227 (ppc_elf_tdata): Define.
2228 (elf_local_ptr_offsets): Adjust.
2229 (ppc_elf_mkobject): New function.
2230 (bfd_elf32_mkobject): Define.
2231
2232 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2233 * elfcore.h (elf_core_file_p): Likewise.
2234 * section.c (bfd_section_init): Remove prototype.
2235
2236 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2237
2238 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2239 field.
2240 (enum elf_linker_section_enum): Delete.
2241 (struct elf_linker_section): Delete.
2242 (struct elf_linker_section_pointers): Delete.
2243 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2244 Make linker_section_pointers a void**.
2245 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2246 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2247 of old item in elf-bfd.h.
2248 (struct elf_linker_section): Likewise.
2249 (struct elf_linker_section_pointers): Likewise.
2250 (elf_local_ptr_offsets): Define.
2251 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2252 (ppc_elf_link_hash_newfunc): Init it.
2253 (struct ppc_elf_link_hash_table): Add sbss.
2254 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2255 individual fields.
2256 (elf_create_linker_section): Fold into..
2257 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2258 Make rela section here if shared.
2259 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2260 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2261 clearing in a loop.
2262 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2263 section here.
2264 (ppc_elf_check_relocs): Adjust.
2265 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2266 creating .sbss by hand.
2267 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2268
2269 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2270
2271 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2272 complain_overflow_bitfield.
2273 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2274 complain_overflow_bitfield.
2275
2276 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2277
2278 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2279 true even if -pie.
2280
2281 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2282
2283 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2284 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2285 !info->executable.
2286 (get_fptr): For -pie create .opd as writable section and create
2287 .rela.opd as well.
2288 (elfNN_ia64_check_relocs): Change info->shared into
2289 !info->executable.
2290 (allocate_fptr): Likewise.
2291 (allocate_dynrel_entries): Account for a relative reloc for -pie
2292 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2293 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2294 section if -pie.
2295 (set_got_entry): Don't create a relative reloc if -pie
2296 want_ltoff_fptr for undefweak symbol.
2297 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2298 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2299 @fptr().
2300
2301 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2302 even if -pie.
2303 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2304 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2305 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2306 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2307 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2308 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2309 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2310 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2311 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2312
2313 2003-07-04 Paul Clarke <paulc@senet.com.au>
2314
2315 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2316 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2317 <R_H8_DIR32A16>: Fix type of relocation.
2318
2319 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2320
2321 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2322 sections were created already. Remove unnecessary tests of
2323 the previous change.
2324
2325 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2326
2327 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2328 bfd_make_section for existing sections.
2329
2330 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2331
2332 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2333 create_got_section if we already have done so.
2334 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2335 (sh_elf_check_relocs): Likewise.
2336 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2337 htab->root.dynobj instead.
2338 (sh_elf_check_relocs): Likewise.
2339 (sh_elf_finish_dynamic_sections): Likewise.
2340
2341 * section.c (bfd_make_section): Return NULL for existing section.
2342
2343 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2344
2345 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2346 ppc_elf_create_got if we've already done so.
2347
2348 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2349 (_bfd_elf_find_pointer_linker_section): Likewise.
2350 (bfd_elf32_create_pointer_linker_section): Likewise.
2351 (bfd_elf32_finish_pointer_linker_section): Likewise.
2352 (bfd_elf64_create_pointer_linker_section): Likewise.
2353 (bfd_elf64_finish_pointer_linker_section): Likewise.
2354 (_bfd_elf_make_linker_section_rela): Likewise.
2355 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2356 (elf_finish_pointer_linker_section): Likewise.
2357 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2358 (_bfd_elf_create_linker_section): Move this function..
2359 (_bfd_elf_find_pointer_linker_section): ..and this..
2360 * elflink.h (elf_create_pointer_linker_section): ..and this..
2361 (elf_finish_pointer_linker_section): ..and this..
2362 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2363 calls.
2364 (elf_create_linker_section): Convert to C90, tidy.
2365 (elf_find_pointer_linker_section): Likewise.
2366 (elf_create_pointer_linker_section): Likewise.
2367 (elf_finish_pointer_linker_section): Likewise.
2368 * elf32-i370.c: Delete #if 0 code.
2369
2370 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2371
2372 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2373 _restf* to be satisfied by shared libs, and always force them local.
2374 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2375 Correct test for "bl".
2376 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2377 primary opcode 31.
2378
2379 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2380
2381 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2382 (s390_tls_reloc): New function.
2383 (elf_howto_table): Add long displacement relocations R_390_20,
2384 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2385 (elf_s390_reloc_type_lookup): Likewise.
2386 (elf_s390_check_relocs): Likewise.
2387 (elf_s390_gc_sweep_hook): Likewise.
2388 (elf_s390_relocate_section): Likewise.
2389 * elf64-s390.c: Same changes as for elf32-s390.c.
2390 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2391 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2392 BFD_RELOC_390_TLS_GOTIE20.
2393 * bfd-in2.h: Regenerate.
2394 * libbfd.h: Likewise.
2395
2396 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2397
2398 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2399 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2400
2401 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2402
2403 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2404 Replace PTR with void *. Formatting.
2405 * archive64.c: Likewise.
2406 * archures.c: Likewise.
2407 * bfd-in.h: Likewise.
2408 * bfd.c: Likewise.
2409 * bfdio.c: Likewise.
2410 * bfdwin.c: Likewise.
2411 * cache.c: Likewise.
2412 * corefile.c: Likewise.
2413 * format.c: Likewise.
2414 * init.c: Likewise.
2415 * libbfd-in.h: Likewise.
2416 * libbfd.c: Likewise.
2417 * linker.c: Likewise.
2418 * opncls.c: Likewise.
2419 * reloc.c: Likewise.
2420 * section.c: Likewise.
2421 * simple.c: Likewise.
2422 * syms.c: Likewise.
2423 * targets.c: Likewise.
2424 * bfd-in2.h: Regenerate.
2425 * libbfd.h: Regenerate.
2426
2427 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2428 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2429 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2430 (bfd_getb64): Rewrite without parens.
2431 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2432 * cache.c (insert, snip): Remove INLINE.
2433 * linker.c (bfd_link_add_undef): Likewise.
2434
2435 2003-06-29 Andreas Jaeger <aj@suse.de>
2436
2437 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2438 unnecessary prototypes. Replace PTR with void *.
2439 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2440 trim plt entries. Move undefweak non-default visibility test ...
2441 (allocate_dynrelocs): ... from here.
2442 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2443 Change all callers.
2444 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2445 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2446 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2447 dynreloc and .got relocs.
2448 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2449 for .got relocs.
2450
2451 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2452
2453 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2454
2455 2003-06-27 Nick Clifton <nickc@redhat.com>
2456
2457 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2458 bfd_add_gnu_debuglink_section and only create the section, do not
2459 fill in its contents.
2460 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2461 contents of a .gnu-debuglink section.
2462 * bfd-in2.h: Regenerate.
2463
2464 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2465
2466 * elfxx-mips.c: Revert .got alignment to 2**4.
2467
2468 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2469
2470 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2471
2472 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2473
2474 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2475 relocation header setup.
2476
2477 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2478
2479 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2480 (ppc_elf_reloc_type_lookup): Modify comment.
2481 (ppc_elf_info_to_howto): Ditto.
2482 (ppc_elf_relocate_section): Ditto.
2483 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2484
2485 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2486
2487 * aout-ns32k.c: Correct spelling of "relocatable".
2488 * aoutx.h: Likewise.
2489 * bfd-in.h: Likewise.
2490 * bfd.c: Likewise.
2491 * bout.c: Likewise.
2492 * coff-a29k.c: Likewise.
2493 * coff-alpha.c: Likewise.
2494 * coff-arm.c: Likewise.
2495 * coff-i386.c: Likewise.
2496 * coff-i860.c: Likewise.
2497 * coff-i960.c: Likewise.
2498 * coff-m68k.c: Likewise.
2499 * coff-m88k.c: Likewise.
2500 * coff-mcore.c: Likewise.
2501 * coff-mips.c: Likewise.
2502 * coff-or32.c: Likewise.
2503 * coff-ppc.c: Likewise.
2504 * coff-rs6000.c: Likewise.
2505 * coff-sh.c: Likewise.
2506 * coff-tic80.c: Likewise.
2507 * coff64-rs6000.c: Likewise.
2508 * cofflink.c: Likewise.
2509 * cpu-ns32k.c: Likewise.
2510 * ecoff.c: Likewise.
2511 * ecofflink.c: Likewise.
2512 * elf-bfd.h: Likewise.
2513 * elf-eh-frame.c: Likewise.
2514 * elf-hppa.h: Likewise.
2515 * elf-m10200.c: Likewise.
2516 * elf-m10300.c: Likewise.
2517 * elf.c: Likewise.
2518 * elf32-arm.h: Likewise.
2519 * elf32-avr.c: Likewise.
2520 * elf32-cris.c: Likewise.
2521 * elf32-d10v.c: Likewise.
2522 * elf32-dlx.c: Likewise.
2523 * elf32-fr30.c: Likewise.
2524 * elf32-frv.c: Likewise.
2525 * elf32-h8300.c: Likewise.
2526 * elf32-hppa.c: Likewise.
2527 * elf32-i370.c: Likewise.
2528 * elf32-i386.c: Likewise.
2529 * elf32-i860.c: Likewise.
2530 * elf32-i960.c: Likewise.
2531 * elf32-ip2k.c: Likewise.
2532 * elf32-iq2000.c: Likewise.
2533 * elf32-m32r.c: Likewise.
2534 * elf32-m68hc11.c: Likewise.
2535 * elf32-m68hc1x.c: Likewise.
2536 * elf32-m68k.c: Likewise.
2537 * elf32-mcore.c: Likewise.
2538 * elf32-mips.c: Likewise.
2539 * elf32-msp430.c: Likewise.
2540 * elf32-openrisc.c: Likewise.
2541 * elf32-ppc.c: Likewise.
2542 * elf32-s390.c: Likewise.
2543 * elf32-sh.c: Likewise.
2544 * elf32-sh64.c: Likewise.
2545 * elf32-sparc.c: Likewise.
2546 * elf32-v850.c: Likewise.
2547 * elf32-vax.c: Likewise.
2548 * elf32-xstormy16.c: Likewise.
2549 * elf32-xtensa.c: Likewise.
2550 * elf64-alpha.c: Likewise.
2551 * elf64-hppa.c: Likewise.
2552 * elf64-mips.c: Likewise.
2553 * elf64-mmix.c: Likewise.
2554 * elf64-ppc.c: Likewise.
2555 * elf64-s390.c: Likewise.
2556 * elf64-sh64.c: Likewise.
2557 * elf64-sparc.c: Likewise.
2558 * elf64-x86-64.c: Likewise.
2559 * elfcode.h: Likewise.
2560 * elflink.h: Likewise.
2561 * elfn32-mips.c: Likewise.
2562 * elfxx-ia64.c: Likewise.
2563 * elfxx-mips.c: Likewise.
2564 * i386linux.c: Likewise.
2565 * ieee.c: Likewise.
2566 * libcoff-in.h: Likewise.
2567 * linker.c: Likewise.
2568 * m68klinux.c: Likewise.
2569 * pdp11.c: Likewise.
2570 * pe-mips.c: Likewise.
2571 * peXXigen.c: Likewise.
2572 * reloc.c: Likewise.
2573 * reloc16.c: Likewise.
2574 * sparclinux.c: Likewise.
2575 * sunos.c: Likewise.
2576 * syms.c: Likewise.
2577 * versados.c: Likewise.
2578 * vms.c: Likewise.
2579 * xcofflink.c: Likewise.
2580 * bfd-in2.h: Regenerate.
2581 * libcoff.h: Regenerate.
2582 * libbfd.h: Regenerate.
2583
2584 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2585
2586 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2587 local sym errors.
2588
2589 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2590 prototypes and casts. Replace PTR with void *. Formatting.
2591 * elf32-ppc.c: Likewise. Break long strings too.
2592 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2593 (ppc_elf_unhandled_reloc): Internationalize error message.
2594 * elf32-ppc.h: Remove PARAMS.
2595
2596 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2597
2598 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2599 APUinfo slots.
2600 (ppc_elf_final_write_processing): Likewise.
2601
2602 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2603
2604 * elflink.h (elf_link_input_bfd): Check raw size when using
2605 kept_section to preserve debug information discarded by
2606 linkonce.
2607
2608 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2609
2610 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2611 (ppc64_elf_setup_section_lists): Set it.
2612 (ppc64_elf_relocate_section): Check sym section id against top_id.
2613 (ppc_build_one_stub): Comment on top_id.
2614
2615 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2616
2617 * config.bfd: Add tic4x-*-rtems*.
2618
2619 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2620
2621 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2622 prototypes and casts. Replace PTR with void *. Format copyright.
2623 Mention ABI links.
2624 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2625 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2626 (ppc_type_of_stub): Make r_type an enum.
2627 (ppc64_elf_size_stubs): Likewise.
2628 * elf64-ppc.h: Remove PARAMS macro.
2629
2630 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2631
2632 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2633 elf hash tab fields.
2634
2635 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2636 (ppc64_elf_info_to_howto): Likewise.
2637 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2638 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2639
2640 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2641
2642 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2643 reloc overflow on discarded eh_frame entries.
2644
2645 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2646
2647 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2648 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2649 Return error condition.
2650 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2651 that have has_gp_reloc set.
2652 (struct ppc_link_hash_table): Add stub_count.
2653 (ppc_build_one_stub): Increment it.
2654 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2655 individual fields.
2656 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2657
2658 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2659
2660 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2661 size calculation from addend. Round size up.
2662
2663 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2664
2665 * elf32-cris.c (cris_elf_relocate_section) <case
2666 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2667 symbol from a normal object or an undefined weak symbol.
2668
2669 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2670
2671 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2672 R_PPC64_TOC relocs.
2673
2674 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2675
2676 * section.c (struct sec): Put back kept_section.
2677 (STD_SECTION): Put back kept_section initialization.
2678 * bfd-in2.h: Regenerate.
2679
2680 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2681 sections for relocateable output. Use kept_section to preserve
2682 debug information discarded by linkonce.
2683
2684 2003-06-17 Roland McGrath <roland@redhat.com>
2685
2686 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2687 segment-relative relocation between different segments.
2688
2689 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2690
2691 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2692 optimizations earlier.
2693
2694 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2695 Restore previous input_list type.
2696 (ppc64_elf_link_hash_table_create): Undo last change.
2697 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2698 per output section, but don't bother with bfd_abs_section marker.
2699 (ppc64_elf_next_input_section): Adjust for multiple input section
2700 lists.
2701 (group_sections): Likewise.
2702
2703 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2704
2705 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2706 *r_offset == r_addend for RELATIVE relocs against .got.
2707
2708 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2709
2710 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2711
2712 2003-06-17 Nick Clifton <nickc@redhat.com>
2713
2714 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2715 in the vtable_entries_used array to allow for the accessing
2716 the largest element.
2717
2718 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2719
2720 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2721 input_list.
2722 (ppc64_elf_link_hash_table_create): Init input_list here.
2723 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2724 per output section. Set toc_off for abs and other standard sections.
2725 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2726 (ppc64_elf_next_input_section): Adjust for single input section list.
2727 Don't set toc_curr from input bfds that haven't set elf_gp.
2728 (group_sections): Adjust for single input section list.
2729
2730 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2731
2732 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2733
2734 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2735 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2736 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2737 got section for RELATIVE relocs. Fix wrong comment. Change condition
2738 under which dynamic relocs update the section contents.
2739
2740 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2741
2742 * config.bfd: Add i386-netbsd-gnu target.
2743
2744 2003-06-12 Nick Clifton <nickc@redhat.com>
2745
2746 * opncls.c (calc_crc32): Rename to
2747 bfd_calc_gnu_debuglink_crc32 and export.
2748 (GNU_DEBUGLINK): Define and use to replace occurrences of
2749 hard-coded ".gnu_debuglink" in the code.
2750 (get_debug_link_info): Prevent aborts by replacing call to
2751 xmalloc with a call to malloc.
2752 (find_separate_debug_file): Prevent aborts by replacing calls
2753 to xmalloc and xstrdup with calls to malloc and strdup.
2754 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2755 section to a bfd.
2756 * bfd-in2.h: Regenerate.
2757
2758 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2759
2760 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2761 New target (was i[3-7]86-*-openbsd* before).
2762 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2763 (vax-*-openbsd*): New target.
2764
2765 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2766
2767 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2768 for n32, too.
2769 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2770 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2771 (mips_elf_create_got_section): Likewise.
2772 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2773
2774 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2775
2776 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2777 (elf_mips_howto_table_rel): Use it.
2778 (gprel32_with_gp): Move prototype.
2779 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2780 Use mips_elf_generic_reloc.
2781 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2782 Code cleanup.
2783 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2784 zero addend.
2785 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2786 as in the other *_gprel*_reloc functions.
2787 (gprel32_with_gp): Handle partial_inplace properly.
2788 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2789 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2790 Do addend handling directly instead of calling
2791 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2792 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2793 of zero addend. Handle partial_inplace properly.
2794 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2795 addend.
2796 (mips_elf64_gprel16_reloc): Likewise.
2797 (mips_elf64_literal_reloc): Likewise.
2798 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2799 logic as in the other *_gprel*_reloc functions. Handle
2800 partial_inplace properly.
2801 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2802 addend. Handle partial_inplace properly.
2803 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2804 of calling _bfd_mips_elf_gprel16_with_gp.
2805 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2806 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2807 of zero addend.
2808 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2809 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2810 of calling _bfd_mips_elf_gprel16_with_gp.
2811 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2812 partial_inplace properly. Fix wrong addend handling. Fix overflow
2813 check.
2814 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2815 exported.
2816 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2817 (_bfd_mips_elf_relocate_section): Likewise.
2818 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2819 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2820 (_bfd_mips_elf_sign_extend): New prototype.
2821
2822 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2823
2824 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2825 New target (was sparc-*-openbsd* before).
2826 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2827
2828 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2829 * configure: Regenerate.
2830
2831 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2832
2833 * po/Make-in (DESTDIR): New.
2834 (install-data-yes): Support $(DESTDIR).
2835 (uninstall): Likewise.
2836
2837 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2838
2839 * Makefile.am (config.status): Depend on version.h.
2840 Run "make dep-am".
2841 * Makefile.in: Regenerate.
2842 * po/SRC-POTFILES.in: Regenerate.
2843
2844 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2845 Gary Hade <garyhade@us.ibm.com>
2846
2847 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2848
2849 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2850
2851 * archures.c (bfd_mach_h8300sxn): New architecture.
2852 * bfd-in2.h: Regenerate.
2853 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2854 (h8300sxn_info_struct): New.
2855 (h8300sx_info_struct): Link to it.
2856 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2857 (elf32_h8_final_write_processing): Likewise.
2858
2859 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2860
2861 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2862 elfxx-target.h so that we can use elf_backend_got_header_size.
2863 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2864 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2865 associated macros.
2866 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2867 dst_mask.
2868 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2869 ppc_stub_plt_branch_r2off.
2870 (struct ppc_stub_hash_entry): Reorganize.
2871 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2872 toc_curr, toc_off and emit_stub_syms.
2873 (ppc64_elf_link_hash_table_create): Init them.
2874 (ppc_stub_name): Correct string size.
2875 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2876 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2877 used.
2878 (ppc_type_of_stub): Tweak root.type test.
2879 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2880 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2881 ppc_stub_plt_branch_r2off.
2882 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2883 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2884 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2885 Initialize elf_gp and toc_curr.
2886 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2887 (ppc64_elf_next_input_section): Set toc_off.
2888 (group_sections): Ensure groups have the same TOC.
2889 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2890 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2891 Build new glink stub.
2892 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2893 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2894 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2895 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2896 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2897 (STD_SECTION): Update.
2898 * ecoff.c (bfd_debug_section): Update comment.
2899 * bfd-in2.h: Regenerate.
2900
2901 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2902
2903 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2904 NULL function pointers.
2905
2906 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2907
2908 * simple.c (bfd_simple_get_relocated_section_contents): Call
2909 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2910
2911 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2912
2913 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2914 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2915 swaptables.
2916 * coff-tic4x.c: Ditto
2917 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2918 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2919 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2920 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2921 swap tables.
2922 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2923 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2924 * coff-apollo.c: Ditto
2925 * coff-arm.c: Ditto
2926 * coff-h8300.c: Ditto
2927 * coff-h8500.c: Ditto
2928 * coff-i960.c: Ditto
2929 * coff-m68k.c: Ditto
2930 * coff-m88k.c: Ditto
2931 * coff-mcore.c: Ditto
2932 * coff-sh.c: Ditto
2933 * coff-sparc.c: Ditto
2934 * coff-tic80.c: Ditto
2935 * coff-we32k.c: Ditto
2936 * coff-z8k.c: Ditto
2937 * coff-w65.c: Ditto
2938
2939 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2940
2941 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2942 initialization bug
2943
2944 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2945
2946 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2947 (bfd_section_from_phdr): Likewise.
2948 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2949 (get_program_header_size): Count with PT_GNU_STACK.
2950 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2951 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2952
2953 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2954
2955 * elflink.h (elf_link_input_bfd): Call linker error_handler
2956 for discarded definitions.
2957
2958 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2959
2960 * syms.c (decode_section_type): Return 'n' if section flags are
2961 SEC_HAS_CONTENTS && SEC_READONLY.
2962
2963 2003-06-03 Nick Clifton <nickc@redhat.com>
2964
2965 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2966 R_V850_ABS32. Add entry for R_V850_REL32.
2967 (v850_elf_reloc_map): Likewise.
2968 (v850_elf_check_relocs): Likewise.
2969 (v850_elf_perform_relocation): Likewise.
2970 (v850_elf_final_link_relocate): Likewise. Include computation
2971 to make R_V850_REl32 pc-relative.
2972
2973 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2974
2975 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2976 and DT_DEBUG dynamic tag even for position independent executables.
2977 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2978
2979 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2980
2981 * config.bfd: Move obsolete entries out of the range of the
2982 targmatch sed script.
2983
2984 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2985
2986 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2987
2988 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2989
2990 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2991 plt entries, not just 8191.
2992
2993 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2994
2995 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2996 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2997
2998 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2999 Jakub Jelinek <jakub@redhat.com>
3000
3001 * elflink.h (elf_link_add_object_symbols): Use !info->executable
3002 instead of info->shared where appropriate.
3003 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
3004 * elflink.c (_bfd_elf_create_got_section): Likewise.
3005 (_bfd_elf_link_create_dynamic_sections): Likewise.
3006 (_bfd_elf_link_assign_sym_version): Likewise.
3007 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
3008 and DT_DEBUG dynamic tag even for position independent executables.
3009 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
3010 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
3011 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
3012 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
3013 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
3014 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
3015 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
3016 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
3017 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
3018
3019 2003-05-30 Kris Warkentin <kewarken@qnx.com>
3020
3021 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
3022 signalled thread.
3023 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
3024
3025 2003-05-29 Nick Clifton <nickc@redhat.com>
3026
3027 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
3028 Tidy up formatting.
3029 * Makefile.am: Add dependency on safe-ctype.h.
3030 * Makefile.in: Regenerate.
3031
3032 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3033
3034 * elfxx-mips.c: Don't force symbols local unconditionally.
3035
3036 2003-05-28 Alan Modra <amodra@bigpond.net.au>
3037
3038 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
3039 undefined_symbol call.
3040
3041 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
3042
3043 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
3044 (mips_elf_link_hash_table): Likewise.
3045
3046 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3047
3048 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
3049 R_MIPS_GNU_REL16_S2 support.
3050 (bfd_elf64_bfd_reloc_type_lookup): Use it.
3051 (mips_elf64_rtype_to_howto): Use it.
3052 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
3053 R_MIPS_GNU_REL16_S2 support.
3054 (bfd_elf32_bfd_reloc_type_lookup): Use it.
3055 (mips_elf_n32_rtype_to_howto): Use it.
3056
3057 2003-05-21 Stuart F. Downing <sdowning@fame.com>
3058
3059 * som.h: Define PA_2_0 before including a.out.h
3060
3061 2003-05-07 Eric Christopher <echristo@redhat.com>
3062 Alexandre Oliva <aoliva@redhat.com>
3063
3064 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
3065 pic tests, change to warning.
3066 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
3067
3068 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
3069
3070 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
3071 well as shle-...-netbsdelf. Remove duplicate entry.
3072
3073 2003-05-21 Nick Clifton <nickc@redhat.com>
3074
3075 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
3076 for X_STORMY16_REL_12 reloc.
3077
3078 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
3079 the type of the hash table in the bfd_link_info structure.
3080 (bfd_elf_get_runpath_list): Likewise.
3081
3082 2003-05-19 Roland McGrath <roland@redhat.com>
3083
3084 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
3085 * bfd-in.h: Declare it.
3086 * bfd-in2.h: Regenerated.
3087 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
3088 * elf-bfd.h (struct elf_backend_data): New function pointer member
3089 elf_backend_bfd_from_remote_memory.
3090 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
3091 Declare them.
3092 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
3093 (elfNN_bed): Add that to the initializer.
3094
3095 2003-05-15 Roland McGrath <roland@redhat.com>
3096
3097 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
3098
3099 2003-05-20 Jakub Jelinek <jakub@redhat.com>
3100
3101 * elflink.h (elf_link_output_extsym): Only issue error about !=
3102 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
3103
3104 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
3105
3106 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
3107 when removing the old definition for symbols with non-default
3108 visibility.
3109
3110 2003-05-18 Jason Eckhardt <jle@rice.edu>
3111
3112 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
3113
3114 2003-05-17 Andreas Schwab <schwab@suse.de>
3115
3116 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
3117 elf_section_data during processing of pc-relative and absolute
3118 relocations.
3119 (elf_m68k_relocate_section): Use the cached reloc section instead
3120 of computing it again. Fix handling of visibility. Don't modify
3121 addend when copying over a relocation into the output.
3122
3123 2003-05-17 Alan Modra <amodra@bigpond.net.au>
3124
3125 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3126 to trim plt entries. Move undefweak non-default visibility test..
3127 (allocate_dynrelocs): ..from here.
3128 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
3129 dynamic_sections_created here. Update comment. Move undefweak
3130 non-default visibility test..
3131 (allocate_dynrelocs): ..from here. Fix comment.
3132 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3133 to trim plt entries. Move undefweak non-default visibility test..
3134 (allocate_dynrelocs): ..from here. Fix comment.
3135 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
3136 STV_DEFAULT rather than comparing with zero.
3137 * elflink.c (_bfd_elf_merge_symbol): Likewise.
3138 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
3139
3140 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3141
3142 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
3143 pointers.
3144 (_bfd_set_gp_value): Likewise.
3145
3146 2003-05-16 Michael Snyder <msnyder@redhat.com>
3147 From Bernd Schmidt <bernds@redhat.com>
3148 * archures.c (bfd_mach_h8300sx): New.
3149 * bfd-in2.h: Regenerate.
3150 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
3151 (h8300sx_info_struct): New.
3152 (h8300s_info_struct): Link to it.
3153 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
3154 (elf32_h8_final_write_processing): Likewise.
3155 (elf32_h8_relax_section): Likewise.
3156
3157 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
3158
3159 * config.bfd: Accept i[3-7]86 variants.
3160 * configure.host: Likewise.
3161 * configure.in: Likewise.
3162 * configure: Regenerate.
3163
3164 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3165
3166 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
3167 symbol.
3168
3169 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3170
3171 * elflink.h (elf_link_check_versioned_symbol): Also allow
3172 the base version.
3173
3174 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3175 H.J. Lu <hongjiu.lu@intel.com>
3176
3177 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3178 (elf_i386_relocate_section): Likewise.
3179 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3180 (ppc_elf_relocate_section): Likewise.
3181 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3182 (ppc64_elf_relocate_section): Likewise.
3183
3184 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3185
3186 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3187
3188 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3189
3190 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3191 processor capability, allow merge of HC12 and HCS12 in some cases.
3192 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3193 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3194 (bfd_m68hc12_arch): Link it.
3195 (scan_mach): New function.
3196
3197 2003-05-13 Andrew Haley <aph@redhat.com>
3198
3199 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3200
3201 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3202 H.J. Lu <hongjiu.lu@intel.com>
3203
3204 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3205 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3206 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3207 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3208 (ppc_elf_relocate_section): Likewise.
3209 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3210 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3211 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3212 relocs need no other types.
3213 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3214 dynreloc check.
3215 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3216 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3217 .got relocs.
3218
3219 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3220
3221 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3222 copy ELF_LINK_NON_GOT_REF from weakdef.
3223 (allocate_dynrelocs): For undef weak syms with non-default
3224 visibility, a) don't allocate plt entries, b) don't allocate
3225 .got relocs, c) discard dyn rel space
3226 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3227 don't generate dynamic relocs.
3228 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3229 for weakdefs when symbol already adjusted.
3230
3231 2003-05-12 Nick Clifton <nickc@redhat.com>
3232
3233 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3234 overflow detection for R_XSTORMY16_16 reloc.
3235
3236 2003-05-12 Paul Clarke <paulc@senet.com.au>
3237
3238 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3239
3240 2003-05-11 Jason Eckhardt <jle@rice.edu>
3241
3242 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3243 adjust upper bits.
3244 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3245 proper place.
3246 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3247 proper place.
3248
3249 2003-05-11 Andreas Schwab <schwab@suse.de>
3250
3251 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3252 complicated tests for unresolvable relocs with a simple direct
3253 scheme using "unresolved_reloc" var. Report some detail on
3254 bfd_reloc_outofrange and similar errors.
3255
3256 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3257
3258 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3259 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3260 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3261 * elf64-s390.c: Likewise.
3262
3263 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3264
3265 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3266 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3267 ELF_LINK_NON_GOT_REF from weakdef.
3268 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3269 already been adjusted before treating it specially.
3270 * el64-s390.c: Likwise.
3271
3272 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3273
3274 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3275 non-default visibility, a) don't make them dynamic, b) discard
3276 space for dynamic relocs.
3277 (elf_s390_relocate_section): Initialize the GOT entries and skip
3278 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3279 symbols with non-default visibility.
3280 * elf64-s390.c: Likewise.
3281
3282 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3283
3284 * cpu-arm.c (arm_check_note): Warning fix.
3285 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3286 to keep relocs if edited.
3287 (iq2000_elf_print_private_bfd_data): Return TRUE.
3288 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3289 ELF64_R_SYM.
3290 (elfNN_ia64_relax_ldxmov): Warning fix.
3291 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3292 * xtensa-modules.c (get_num_opcodes): Warning fix.
3293
3294 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3295
3296 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3297
3298 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3299
3300 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3301 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3302 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3303 (bfd_elf_record_link_assignment): Move from elflink.h.
3304 (_bfd_elf_merge_symbol): Likewise.
3305 (_bfd_elf_add_default_symbol): Likewise.
3306 (_bfd_elf_export_symbol): Likewise.
3307 (_bfd_elf_link_find_version_dependencies): Likewise.
3308 (_bfd_elf_link_assign_sym_version): Likewise.
3309 (_bfd_elf_link_read_relocs): Likewise.
3310 (_bfd_elf_link_size_reloc_section): Likewise.
3311 (_bfd_elf_fix_symbol_flags): Likewise.
3312 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3313 (_bfd_elf_link_sec_merge_syms): Likewise.
3314 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3315 and bed->s->sizeof_rela.
3316 (_bfd_elf_link_output_relocs): Likewise.
3317 * elf-bfd.h (struct elf_size_info): Rename file_align to
3318 log_file_align.
3319 (struct elf_info_failed): Move from elflink.h.
3320 (struct elf_assign_sym_version_info): Likewise.
3321 (struct elf_find_verdep_info): Likewise.
3322 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3323 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3324 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3325 _bfd_elf_link_assign_sym_version,
3326 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3327 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3328 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3329 _bfd_elf_link_sec_merge_syms): Declare.
3330 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3331 (_bfd_elf32_link_read_relocs): Likewise.
3332 (bfd_elf64_link_create_dynamic_sections): Likewise.
3333 (_bfd_elf64_link_read_relocs): Likewise.
3334 * elflink.h: Move lots o' stuff elsewhere.
3335 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3336 (bfd_elf64_record_link_assignment): Likewise.
3337 (bfd_elf_record_link_assignment): Declare.
3338 * bfd-in2.h: Regenerate.
3339 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3340 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3341 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3342 (assign_file_positions_for_segments): Likewise.
3343 (assign_file_positions_except_relocs): Likewise.
3344 (swap_out_syms, elfcore_write_note): Likewise.
3345 * elf-m10200.c: Adjust for changed function names.
3346 * elf-m10300.c: Likewise.
3347 * elf32-arm.h: Likewise.
3348 * elf32-h8300.c: Likewise.
3349 * elf32-hppa.c: Likewise.
3350 * elf32-ip2k.c: Likewise.
3351 * elf32-m32r.c: Likewise.
3352 * elf32-m68hc11.c: Likewise.
3353 * elf32-m68hc1x.c: Likewise.
3354 * elf32-m68k.c: Likewise.
3355 * elf32-mips.c: Likewise.
3356 * elf32-ppc.c: Likewise.
3357 * elf32-sh.c: Likewise.
3358 * elf32-v850.c: Likewise.
3359 * elf32-xtensa.c: Likewise.
3360 * elf64-alpha.c: Likewise.
3361 * elf64-hppa.c: Likewise.
3362 * elf64-mmix.c: Likewise.
3363 * elf64-ppc.c: Likewise.
3364 * elf64-sh64.c: Likewise.
3365 * elfxx-ia64.c: Likewise.
3366 * elfxx-mips.c: Likewise.
3367 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3368 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3369 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3370 * elf64-mips.c (mips_elf64_size_info): Likewise.
3371 * elf64-s390.c (s390_elf64_size_info): Likewise.
3372 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3373
3374 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3375
3376 * elflink.h (elf_add_default_symbol): After skipping the
3377 unversioned symbol, go to non-default one.
3378
3379 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3380
3381 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3382 want_plt field.
3383 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3384 for symbols with non-default visibility.
3385
3386 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3387
3388 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3389 case that a DSO references a hidden symbol which may be
3390 satisfied by a versioned symbol in another DSO.
3391 (elf_link_output_extsym): Check versioned definition for hidden
3392 symbol referenced by a DSO.
3393
3394 2003-05-07 Nick Clifton <nickc@redhat.com>
3395
3396 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3397 R_XSTORMY16_16 reloc to ignore overflows.
3398
3399 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3400
3401 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3402 error message for mixing different-endian files. Check for ABI
3403 compatibility of input files with the selected emulation.
3404
3405 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3406
3407 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3408 non-default visibility, a) don't make them dynamic, b) discard
3409 space for dynamic relocs.
3410 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3411
3412 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3413 non-default visibility, a) don't allocate plt entries, b) don't
3414 allocate .got relocs, c) discard dyn rel space,
3415 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3416 don't generate dynamic relocs.
3417 * elf64-ppc.c (allocate_dynrelocs): As above.
3418 (ppc64_elf_relocate_section): As above.
3419
3420 2003-05-05 Andreas Jaeger <aj@suse.de>
3421
3422 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3423 relocation entries for weak undefined symbols with non-default
3424 visibility.
3425 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3426 skip R_386_32/R_386_PC32 for weak undefined symbols with
3427 non-default visibility.
3428
3429 2003-05-04 H.J. Lu <hjl@gnu.org>
3430
3431 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3432 relocation entries for weak undefined symbols with non-default
3433 visibility.
3434 (elf_i386_relocate_section): Initialize the GOT entries and
3435 skip R_386_32/R_386_PC32 for weak undefined symbols with
3436 non-default visibility.
3437
3438 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3439 descriptors for weak undefined symbols with non-default
3440 visibility.
3441 (allocate_dynrel_entries): Don't allocate relocation entries
3442 for symbols resolved to 0.
3443 (set_got_entry): Don't install dynamic relocation for weak
3444 undefined symbols with non-default visibility.
3445 (set_pltoff_entry): Likewise.
3446
3447 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3448 with non-default visibility.
3449 (elf_link_output_extsym): Don't make weak undefined symbols
3450 with non-default visibility dynamic.
3451
3452 2003-05-04 H.J. Lu <hjl@gnu.org>
3453
3454 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3455
3456 2003-05-04 H.J. Lu <hjl@gnu.org>
3457
3458 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3459 symbol dynamic. Check indirection when removing the old
3460 definition for symbols with non-default visibility.
3461 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3462
3463 2003-05-02 Nick Clifton <nickc@redhat.com>
3464
3465 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3466 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3467 unsigned overflow.
3468
3469 2003-05-02 Andreas Jaeger <aj@suse.de>
3470
3471 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3472 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3473 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3474 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3475 ELF_LINK_NON_GOT_REF from weakdef.
3476
3477 2003-05-02 Charles Lepple <clepple@ghz.cc>
3478 Nick Clifton <nickc@redhat.com>
3479
3480 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3481 * aclocal.m4: Regenerate.
3482 * configure: Regenerate.
3483 * Makefile.in: Regenerate.
3484
3485 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3486
3487 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3488 weakdef sym has already been adjusted before treating it specially.
3489 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3490 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3491 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3492 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3493
3494 2003-04-28 H.J. Lu <hjl@gnu.org>
3495
3496 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3497 the relax finalize pass.
3498
3499 * section.c (struct sec): Add need_finalize_relax and remove
3500 flag11.
3501 (STD_SECTION): Update struct sec initializer.
3502 * bfd-in2.h: Regenerated.
3503
3504 2003-04-28 H.J. Lu <hjl@gnu.org>
3505
3506 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3507 to copy any information related to dynamic linking when we flip
3508 the indirection.
3509
3510 2003-04-27 H.J. Lu <hjl@gnu.org>
3511
3512 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3513 (ELF_LINK_DYNAMIC_WEAK): New.
3514
3515 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3516 a symbol should be skipped. Ignore definitions in dynamic
3517 objects for symbols with non-default visibility.
3518 (elf_add_default_symbol): Adjusted.
3519 (elf_link_add_object_symbols): Check if a symbol should be
3520 skipped. Don't merge the visibility field with the one from
3521 a dynamic object.
3522 (elf_link_check_versioned_symbol): Use undef_bfd.
3523 (elf_link_output_extsym): Warn if a forced local symbol is
3524 referenced from dynamic objects. Make non-weak undefined symbol
3525 with non-default visibility a fatal error.
3526
3527 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3528
3529 * configure.in: Bump version on HEAD to 2.14.90.
3530 * configure: Regenerated.
3531
3532 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3533
3534 PR savannah/3331:
3535 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3536 when we couldn't relax something.
3537
3538 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3539
3540 * elflink.h (elf_merge_symbol): When we find a regular definition
3541 for an indirect symbol, flip the indirection so that the old
3542 direct symbol now points to the new definition.
3543
3544 2003-04-24 Roland McGrath <roland@redhat.com>
3545
3546 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3547
3548 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3549
3550 * elf32-ppc.c: Formatting and comment fixes.
3551 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3552 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3553
3554 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3555
3556 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3557 * bfd-in2.h: Rebuilt.
3558 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3559 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3560 & H8300SNMAGIC.
3561 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3562 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3563 (h8300sn_info_struct, h8300hn_info_struct): New.
3564 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3565 (elf32_h8_final_write_processing): Likewise.
3566
3567 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3568
3569 * elf32-sh.c (tpoff): New.
3570 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3571 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3572 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3573 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3574 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3575 (dtpoff_base): Fix wrong indentation.
3576 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3577 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3578 R_SH_TLS_TPOFF32 relocations.
3579
3580 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3581
3582 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3583 * cpu-sh.c: Likewise.
3584 * elf32-sh.c: Likewise.
3585 * reloc.c (bfd_reloc_code_real): Likewise.
3586 * elf32-sh64-com.c: Change comment to refer to SuperH.
3587 * elf32-sh64.c: Likewise.
3588 * elf64-sh64.c: Likewise.
3589 * bfd-in2.h (enum bfd_architecture): Regenerate.
3590
3591 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3592
3593 From Julien LEMOINE <speedblue@debian.org>
3594 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3595 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3596
3597 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3598
3599 * archures.c: Replace references to Mitsubishi M32R with references
3600 to Renesas M32R.
3601 * relocs.c: Likewise.
3602 * bfd-in2.h: Regenerate.
3603
3604 2003-04-21 Richard Henderson <rth@redhat.com>
3605
3606 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3607 executable when a symbol is defined both regular and dynamic.
3608
3609 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3610
3611 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3612 (elf32-m68hc1x.lo): Update dependencies
3613 * configure.in: Add elf32-m68hc1x.lo.
3614 * configure: Rebuild.
3615 * Makefile.in: Rebuild.
3616
3617 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3618
3619 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3620 (m68hc11_elf_hash_table_create): New function.
3621 (elf32_m68hc11_link_hash_table_free): New function.
3622 (stub_hash_newfunc): New function.
3623 (m68hc11_add_stub): New function.
3624 (elf32_m68hc11_add_symbol_hook): New function.
3625 (elf32_m68hc11_setup_section_lists): New function.
3626 (elf32_m68hc11_next_input_section): New function.
3627 (elf32_m68hc11_size_stubs): New function.
3628 (elf32_m68hc11_build_stubs): New function.
3629 (m68hc11_get_relocation_value): New function.
3630 (elf32_m68hc11_relocate_section): Call the above to redirect
3631 some relocations to the trampoline code.
3632 (m68hc11_elf_export_one_stub): New function.
3633 (m68hc11_elf_set_symbol): New function.
3634 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3635 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3636 is not yet initialized.
3637
3638 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3639 (elf32_m68hc11_stub_hash_entry): New struct.
3640 (m68hc11_page_info): Add trampoline handler address.
3641 (m68hc11_elf_link_hash_table): Add stubs generation members.
3642 (elf32_m68hc11_add_symbol_hook): Declare.
3643 (elf32_m68hc11_setup_section_lists): Declare.
3644 (elf32_m68hc11_size_stubs): Declare.
3645 (elf32_m68hc11_build_stubs): Declare.
3646
3647 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3648 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3649 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3650 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3651 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3652 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3653 (bfd_elf32_bfd_link_hash_table_create): Define.
3654 (elf_backend_add_symbol_hook): Define.
3655 (m68hc11_elf_bfd_link_hash_table_create): New function.
3656 (m68hc11_elf_build_one_stub): New function.
3657 (m68hc11_elf_size_one_stub): New function.
3658 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3659 (bfd_elf32_bfd_link_hash_table_create): Define.
3660
3661 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3662 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3663 (m68hc12_phys_addr): Ditto.
3664 (m68hc12_phys_page): Ditto.
3665 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3666 (elf32_m68hc11_gc_mark_hook): Likewise.
3667 (elf32_m68hc11_gc_sweep_hook): Likewise.
3668 (elf32_m68hc11_check_relocs): Likewise.
3669 (elf32_m68hc11_relocate_section): Likewise.
3670 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3671 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3672 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3673 (m68hc12_elf_build_one_stub): New function.
3674 (m68hc12_elf_size_one_stub): New function.
3675 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3676 (elf_backend_add_symbol_hook): Define.
3677 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3678
3679 2003-04-18 Nick Clifton <nickc@redhat.com>
3680
3681 * format.c (bfd_check_format_matches): Only check associated
3682 vector if the matching_vector has been created.
3683
3684 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3685
3686 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3687 2003-04-09's change.
3688
3689 2003-04-15 Brian Ford <ford@vss.fsi.com>
3690
3691 * peicode.h (coff_swap_scnhdr_in): If a section holds
3692 uninitialized data and is from an object file or from an
3693 executable image that has not initialized the s_size field, or if
3694 the physical size is padded, use the virtual size (stored in
3695 s_paddr) instead.
3696
3697 2003-04-15 H.J. Lu <hjl@gnu.org>
3698
3699 * elflink.h (elf_link_add_object_symbols): Properly report
3700 filename for alignment reduction.
3701
3702 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3703
3704 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3705 * reloc.c: Likewise.
3706 * coff-h8300.c: Likewise.
3707 * coff-h8500.c: Likewise.
3708 * coff-sh.c: Likewise.
3709 * cpu-h8300.c: Likewise.
3710 * cpu-sh.c: Likewise.
3711 * elf32-h8300.c: Likewise.
3712 * elf32-sh.c: Likewise.
3713 * elf32-sh64-com.c: Likewise.
3714 * elf32-sh64.c: Likewise.
3715 * elf64-sh64.c: Likewise.
3716 * bfd-in2.h: Regenerate.
3717
3718 2003-04-14 H.J. Lu <hjl@gnu.org>
3719
3720 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3721 alignment for common symbols. Warn reducing alignment for
3722 common symbols. Report old filename when symbol size changes.
3723
3724 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3725
3726 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3727 occurrences of the same test changed in the previous patch.
3728 Optimize.
3729
3730 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3731
3732 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3733 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3734 GOT_DISP/addend only if the symbol got a global GOT entry.
3735
3736 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3737
3738 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3739 GOT_PAGE/GOT_OFST referencing overridable symbol to
3740 GOT_DISP/addend.
3741 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3742 global symbol as GOT_DISP.
3743
3744 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3745
3746 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3747 next relocation on an undefined symbol.
3748
3749 2003-04-09 Richard Henderson <rth@redhat.com>
3750
3751 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3752 Ignore relocations against r_symndx == 0.
3753
3754 2003-04-09 H.J. Lu <hjl@gnu.org>
3755
3756 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3757 FALSE for undefined symbols.
3758 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3759
3760 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3761
3762 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3763 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3764 addr_size.
3765
3766 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3767
3768 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3769 pointer size from ABI, not arch_bits_per_address.
3770
3771 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3772
3773 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3774 constants for n32 ABI.
3775
3776 2003-04-06 Andrew Cagney <cagney@redhat.com>
3777
3778 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3779 free that leads to GDB vs BFD memory corruption.
3780
3781 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3782
3783 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3784 symbols that mark the end of the section.
3785 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3786 converting to a relative branch so that the offset is computed after
3787 the relaxation; also relocate a jsr into a bsr if possible but don't
3788 relax them if they are to a far symbol as we need to call the
3789 trampoline code.
3790 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3791
3792 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3793
3794 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3795 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3796 * bfd-in2.h: Regenerate
3797 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3798 * cpu-tic4x.c: Ditto
3799
3800 2003-04-03 Nick Clifton <nickc@redhat.com>
3801
3802 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3803 differently for object files and executables.
3804 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3805 for object files or for executables who have not already
3806 initialised the field.
3807 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3808 the PE format bfd is an executable.
3809
3810 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3811
3812 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3813 here as it's too early to reliably determine locality.
3814 (ppc_elf_gc_sweep_hook): Likewise.
3815 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3816
3817 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3818
3819 * xtensa-modules.c: Remove comment indicating that this is a
3820 generated file.
3821
3822 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3823
3824 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3825
3826 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3827
3828 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3829 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3830 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3831 xtensa-modules.lo.
3832 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3833 xtensa-modules.c.
3834 (cpu-xtensa.lo): New target.
3835 (elf32-xtensa.lo): Likewise.
3836 (xtensa-isa.lo): Likewise.
3837 (xtensa-modules.lo): Likewise.
3838 * Makefile.in: Regenerate.
3839 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3840 (bfd_archures_list): Add bfd_xtensa_arch.
3841 * config.bfd: Handle xtensa-*-*.
3842 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3843 * configure: Regenerate.
3844 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3845 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3846 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3847 (bfd_elf32_xtensa_le_vec): Likewise.
3848 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3849 * cpu-xtensa.c: New file.
3850 * elf32-xtensa.c: Likewise.
3851 * xtensa-isa.c: Likewise.
3852 * xtensa-modules.c: Likewise.
3853 * libbfd.h: Regenerate.
3854 * bfd-in2.h: Likewise.
3855
3856 2003-04-01 Nick Clifton <nickc@redhat.com>
3857
3858 * archures.c (bfd_mach_arm_unknown): Define.
3859 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3860 bfd_arm_get_mach_from_notes): Prototype.
3861 * bfd-in2.h: Regenerate.
3862 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3863 bfd_arm_merge_machines.
3864 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3865 * coffcode.h (coff_set_arch_mach_hook): Call
3866 bfd_arm_get_mach_from_notes.
3867 * coffgen.c (coff_real_object_p): Revert previous delta.
3868 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3869 .note section.
3870 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3871 binaries compiled for different architectures..
3872 (bfd_arm_update_notes): New function: Update an ARM note section.
3873 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3874 number from an ARM note section.
3875 * elf32-arm.h (elf32_arm_object_p): Use
3876 bfd_arm_get_mach_from_notes.
3877 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3878 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3879
3880 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3881
3882 * dwarf2.c (read_attribute_value): Correct typo in comment.
3883
3884 2003-04-01 Nick Clifton <nickc@redhat.com>
3885
3886 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3887 instead of concat().
3888 (decode_line_info): Only free filename if it is not NULL.
3889 (add_line_info): Make a copy of the filename when storing it into
3890 the info structure.
3891
3892 2003-03-31 Andreas Schwab <schwab@suse.de>
3893 Daniel Jacobowitz <drow@mvista.com>
3894
3895 * simple.c (bfd_simple_get_relocated_section_contents): Add
3896 parameter symbol_table. Optionally use it instead of the symbol
3897 table from the bfd. Save and restore output offsets and output
3898 sections around bfd_get_relocated_section_contents. Fix a memory
3899 leak.
3900 (simple_save_output_info, simple_restore_output_info): New
3901 functions.
3902 * bfd-in2.h: Regenerate.
3903 * dwarf2.c (read_abbrevs): Use
3904 bfd_simple_get_relocated_section_contents instead of
3905 bfd_get_section_contents.
3906 (decode_line_info): Likewise.
3907 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3908 find_rela_addend.
3909 (find_rela_addend): Remove.
3910 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3911 debugging sections.
3912 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3913 not bfd_zalloc.
3914
3915 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3916
3917 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3918 bfd_alloc.
3919 * dwarf2.c (concat_filename): Always allocate space for the
3920 returned filename.
3921 (decode_line_info): Free the allocated filename returned by
3922 concat_filename.
3923 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3924 * elf.c (copy_private_bfd_data): Likewise.
3925 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3926 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3927 * format.c (bfd_check_format_matches): Likewise.
3928 * linker.c (bfd_generic_final_link): Likewise.
3929 * opncls.c (find_separate_debug_info): Likewise.
3930 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3931
3932 2003-03-28 H.J. Lu <hjl@gnu.org>
3933
3934 * elflink.h (elf_link_add_object_symbols): Correctly combine
3935 visibilities.
3936
3937 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3938
3939 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3940 to -1 before recomputing got offsets.
3941
3942 2003-03-26 Andreas Schwab <schwab@suse.de>
3943
3944 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3945 (elf_m68k_relocate_section): Use it to correctly handle symbols
3946 forced to be local.
3947 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3948 entries for symbols that are forced to be local.
3949
3950 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3951
3952 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3953 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3954 * elfn32-mips.c, elf64-mips.c: Use it.
3955
3956 2003-03-25 Stan Cox <scox@redhat.com>
3957 Nick Clifton <nickc@redhat.com>
3958
3959 Contribute support for Intel's iWMMXt chip - an ARM variant:
3960
3961 * archures.c: Add bfd_mach_arm_iWMMXt.
3962 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3963 * bfd-in2.h: Regenerate.
3964 * libbfd.h: Regenerate.
3965 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3966 object files to be linked with XScale ones.
3967 (coff_arm_final_link_postscript): Update note section.
3968 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3969 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3970 after identifying a coff binary.
3971 * cpu-arm.c (processors): Add iWMMXt.
3972 (arch_inf): Likewise.
3973 * elf32-arm.h (arm_object_p): Handle note section.
3974 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3975 be linked with XScale ones.
3976 (elf32_arm_section_flags): New function: Set flags on note section.
3977 (elf32_arm_final_write_processing): Handle note section.
3978
3979 2003-03-21 DJ Delorie <dj@redhat.com>
3980
3981 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3982 _bfd_elf_rela_local_sym.
3983
3984 2003-03-20 H.J. Lu <hjl@gnu.org>
3985
3986 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3987 non-ELF outputs.
3988
3989 2003-03-20 Nick Clifton <nickc@redhat.com>
3990
3991 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3992 $idata5 in case bfd_coff_final_link is not called.
3993
3994 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3995
3996 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3997 field.
3998 (canon_reloc_count): Define.
3999 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
4000 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
4001 reloc_count.
4002 (sparc64_elf_canonicalize_reloc): New routine.
4003 (bfd_elf64_canonicalize_reloc): Define.
4004
4005 2003-03-18 Jakub Jelinek <jakub@redhat.com>
4006
4007 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
4008 againt mergeable sections. Take r_addend into account when caching
4009 trampolines.
4010
4011 2003-03-18 Richard Henderson <rth@redhat.com>
4012
4013 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
4014 local symbols that have no dyninfo.
4015
4016 2003-03-14 Gene Smith <gene.smith@siemens.com>
4017
4018 * ieee.c (ieee_write_expression): Handle the case where symbol is
4019 NULL.
4020 General formatting improvements.
4021
4022 2003-03-13 Nick Clifton <nickc@redhat.com>
4023
4024 * configure.in (LINGUAS): Add zh_CN.
4025 * configure: Regenerate.
4026 * po/zh_CN.po: New file.
4027
4028 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
4029
4030 * aout-cris.c (BYTES_IN_WORD): Don't define.
4031 aout-encap.c: Likewise.
4032 aout-ns32k.c: Likewise.
4033 aout-tic30.c: Likewise.
4034 hp300bsd.c: Likewise.
4035 i386aout.c: Likewise.
4036 i386dynix.c: Likewise.
4037 i386linux.c: Likewise.
4038 i386lynx.c: Likewise.
4039 i386mach3.c: Likewise.
4040 m68k4knetbsd.c: Likewise.
4041 m68klinux.c: Likewise.
4042 m68klynx.c: Likewise.
4043 m68knetbsd.c: Likewise.
4044 m88kmach3.c: Likewise.
4045 mipsbsd.c: Likewise.
4046 newsos3.c: Likewise.
4047 sparclinux.c: Likewise.
4048 sparclynx.c: Likewise.
4049 sparcnetbsd.c: Likewise.
4050 vaxbsd.c: Likewise. Fix comment formatting.
4051
4052 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
4053
4054 * Reverted 2003-03-02's patch.
4055
4056 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
4057 overridable.
4058 * elf64-mips.c (mips_elf64_canonicalize_reloc,
4059 mips_elf64_get_dynamic_reloc_upper_bound,
4060 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
4061 (bfd_elf64_get_canonicalize_reloc,
4062 bfd_elf64_get_dynamic_reloc_upper_bound,
4063 bfd_elf64_canonicalize_dynamic_reloc): Define.
4064 (mips_elf64_slurp_reloc_table): Support dynamic.
4065 (mips_elf64_slurp_one_reloc_table): Adjust.
4066
4067 2003-03-12 Nick Clifton <nickc@redhat.com>
4068
4069 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
4070 'index' to 'offset' in test for zero value.
4071
4072 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
4073
4074 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
4075 dynamic relocations pointing to local or section symbols, use the
4076 NULL symbol instead. Document the choice to not emit an
4077 additional R_MIPS_64 relocation.
4078
4079 2003-03-11 Alan Modra <amodra@bigpond.net.au>
4080
4081 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
4082 zero index dynamic tls relocs generated for the GOT. Tidy code.
4083 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
4084 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4085
4086 2003-03-07 Alan Modra <amodra@bigpond.net.au>
4087
4088 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
4089 a tls_get_addr call.
4090
4091 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
4092 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
4093 ELF_LINK_NON_GOT_REF from weakdef.
4094 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
4095 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
4096 ELF_LINK_NON_GOT_REF from weakdef.
4097 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
4098 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
4099 ELF_LINK_NON_GOT_REF from weakdef.
4100
4101 2003-03-06 Jakub Jelinek <jakub@redhat.com>
4102 Andrew Haley <aph@redhat.com>
4103
4104 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
4105 output is relocateable.
4106
4107 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
4108
4109 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
4110 R_COMMENT.
4111
4112 2003-03-06 Alan Modra <amodra@bigpond.net.au>
4113
4114 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
4115 error messages.
4116 (ELIMINATE_COPY_RELOCS): Define to zero.
4117 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
4118 TLSLD relocs. Report reloc types on a number of errors. Optimize
4119 LOCAL24PC check for non-local syms. Don't capitalize error messages.
4120 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
4121 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
4122 calculating TLSLD relocs. Report reloc types on a number of errors.
4123 Don't capitalize error messages.
4124
4125 2003-03-03 H.J. Lu <hjl@gnu.org>
4126
4127 * elfxx-ia64.c (USE_BRL): Removed.
4128 (oor_ip): Removed.
4129
4130 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
4131
4132 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
4133 relocation (no special function), and make it non-partial_inplace.
4134 (sh_elf_relax_section): When creating a bsr, use a consistent value
4135 no matter if the symbol is extern or not; set addend to -4.
4136 Don't swap load / non-load instructions for SH4.
4137 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
4138 rather than if the symbol is external to determine if adjusting the
4139 offset makes sense. Adjust the addend too if appropriate.
4140 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
4141 relocation.
4142
4143 2003-03-03 Nick Clifton <nickc@redhat.com>
4144
4145 * po/da.po: Installed latest translation.
4146
4147 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4148
4149 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
4150 R_MIPS_PC16 to rightshift 2.
4151 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
4152 (bfd_elf32_bfd_reloc_type_lookup): Support
4153 BFD_RELOC_MIPSEMB_16_PCREL_S2.
4154 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
4155 R_MIPS_PC16 to rightshift 2.
4156 (mips_elf64_howto_table_rela): Likewise.
4157 (mips_reloc_map): Map to rightshifted BFD reloc.
4158 * elfn32-mips.c: The same as in elf64-mips.c.
4159 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
4160 (mips_elf_calculate_relocation): Handle rightshifted addends for
4161 R_MIPS_PC16.
4162 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
4163 MIPS Embedded PIC. Remove superfluous empty COMMENT.
4164 * libbfd.h: Regenerate.
4165 * bfd-in2.h: Regenerate.
4166
4167 2003-02-28 Richard Henderson <rth@redhat.com>
4168
4169 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4170 for ltoff22x relaxation.
4171
4172 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4173
4174 * bfd-in.h (_bfd): Don't define.
4175 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4176 * syms.c: Likewise.
4177 * bfd-in2.h: Regenerate.
4178
4179 2003-02-27 Richard Henderson <rth@redhat.com>
4180
4181 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4182 (elfNN_ia64_check_relocs): Set it.
4183 (allocate_global_data_got): Check it.
4184 (allocate_local_got): Likewise.
4185 (allocate_dynrel_entries): Likewise.
4186 (elfNN_ia64_relax_ldxmov): New.
4187 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4188 (elfNN_ia64_choose_gp): Split out from ...
4189 (elfNN_ia64_final_link): ... here.
4190
4191 2003-02-27 Andrew Cagney <cagney@redhat.com>
4192
4193 * bfd.c (struct bfd): Rename "struct _bfd".
4194 * bfd-in.h: Update copyright.
4195 (struct bfd): Rename "struct _bfd".
4196 (_bfd): Define for backward compatibility.
4197 * bfd-in2.h: Regenerate.
4198
4199 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4200
4201 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4202 and rel_hdr2 when initially counting input relocs rather than after
4203 creating output reloc sections.
4204 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4205 sizes.
4206
4207 * Makefile.am: Run "make dep-am".
4208 * Makefile.in: Regenerate.
4209
4210 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4211
4212 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4213 (elfcore_grog_nto_note): New function.
4214 (elfcore_grog_nto_gregs): New function.
4215 (elfcore_grog_nto_status): New function.
4216
4217 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4218
4219 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4220 section flags before concluding that we've already been called.
4221 Don't use register keyword.
4222 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4223 (_bfd_elf_create_linker_section): Formatting.
4224
4225 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4226
4227 * coff-h8300.c: Fix typo: intial -> initial.
4228 * coff-ppc.c: Likewise.
4229
4230 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4231
4232 * elf32-ppc.c: Formatting.
4233 (allocate_dynrelocs): LD and GD relocs against the same sym need
4234 separate GOT entries.
4235 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4236 entries per symbol.
4237
4238 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4239
4240 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4241 removal. Localize vars. Remove unnecessary dynobj test.
4242 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4243 of INFO.
4244 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4245 and optimize.
4246 (elf_i386_relocate_section): Likewise.
4247 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4248 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4249 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4250 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4251 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4252 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4253 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4254 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4255 Formatting.
4256
4257 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4258 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4259 test.
4260 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4261 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4262 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4263 and optimize. Use ELIMINATE_COPY_RELOCS.
4264 (ppc64_elf_relocate_section): Likewise.
4265
4266 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4267 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4268 (ELIMINATE_COPY_RELOCS): Define.
4269 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4270 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4271 (MUST_BE_DYN_RELOC): Define.
4272 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4273 and optimize. Trim dyn_relocs.
4274 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4275 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4276 track of pc_rel dyn relocs.
4277 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4278 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4279 allocate_dynrelocs. Don't recalculate "sec".
4280
4281 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4282
4283 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4284 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4285 on invalid LD relocs.
4286 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4287 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4288 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4289
4290 * elf32-ppc.h: New file.
4291 * elf32-ppc.c: Include elf32-ppc.h.
4292 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4293 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4294 Add "tls_mask" field.
4295 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4296 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4297 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4298 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4299 Make use of htab shortcuts throughout file.
4300 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4301 (ppc_elf_link_hash_table_create): Init new fields.
4302 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4303 (ppc_elf_howto_raw): Add tls relocs.
4304 (ppc_elf_reloc_type_lookup): Handle them.
4305 (ppc_elf_unhandled_reloc): New function.
4306 (ppc_elf_create_got): Stash got section pointer in hash table,
4307 return status. Make .rela.got too.
4308 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4309 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4310 NON_GOT_REF set. Don't allocate space in .plt here..
4311 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4312 not allocating plt entries unnecessarily. Allocate got entries here.
4313 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4314 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4315 "info" during allocate_dynrelocs hash traversal. Use htab section
4316 shortcuts rather than searching for named sections. Get rid of
4317 "plt" and "strip" booleans.
4318 (update_local_sym_info, bad_shared_reloc): New functions.
4319 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4320 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4321 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4322 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4323 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4324 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4325 relocs that might use a plt entry. Set NON_GOT_REF too.
4326 Enumerate all do-nothing relocs.
4327 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4328 tls relocs and all plt relocs.
4329 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4330 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4331 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4332 shortcuts.
4333 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4334 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4335 entries and got relocs here. Warn on non-zero got reloc addend.
4336 Split out branch taken/not taken reloc code into a separate switch
4337 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4338 Split out HA reloc adjustments to separate switch statement. Don't
4339 warn on reloc overflow if we've already warned about undefined.
4340 Don't rebuild sym name when reporting errors. Report all possible
4341 errors from _bfd_final_link_relocate.
4342 (bfd_elf32_bfd_final_link): Don't define.
4343
4344 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4345
4346 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4347 rebuild sym name when reporting errors.
4348
4349 2003-02-17 Nick Clifton <nickc@redhat.com>
4350
4351 * elflink.h (elf_link_output_extsym): Only check
4352 allow_shlib_undefined for shared libraries.
4353 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4354 of allow_shlib_undefined.
4355 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4356 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4357 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4358 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4359 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4360 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4361 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4362 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4363 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4364 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4365 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4366 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4367 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4368 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4369 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4370 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4371
4372 2003-02-17 Nick Clifton <nickc@redhat.com>
4373
4374 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4375 address field to use in the comparison.
4376 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4377
4378 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4379
4380 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4381 backends when checking if the generic ELF target should be used.
4382
4383 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4384 outside of functions, treat values as absolute addresses.
4385
4386 * bfd.c: Change embedded documentation to use consistent indentation
4387 and to split up long lines. Change informal style of description
4388 for functions lacking real documentation.
4389 * coffcode.h: Break up long lines in embedded documentation.
4390 * format.c: Likewise.
4391 * targets.c: Likewise.
4392 * libcoff.h: Regenerate.
4393 * bfd-in2.h: Regenerate.
4394
4395 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4396
4397 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4398 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4399 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4400 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4401 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4402 (group_sections): Don't share a stub section if stubs are for a large
4403 section. Adjust comment.
4404 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4405 !stubs_always_before_branch.
4406 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4407 treat undefined and undefweak specially when processing dyn relocs.
4408
4409 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4410
4411 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4412
4413 2003-02-13 Nick Clifton <nickc@redhat.com>
4414
4415 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4416 in computation of offset to insert into BL instruction.
4417
4418 2003-02-11 Uwe Stieber <uwe@wwws.de>
4419
4420 * config.bfd: Add support for kaOS as cross build target system.
4421
4422 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4423
4424 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4425 .__tls_get_addr too.
4426 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4427
4428 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4429
4430 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4431 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4432 (sh_elf_link_hash_newfunc): Remove the initialization of
4433 tls_tpoff32 field.
4434 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4435 for which tls_tpoff32 flag is set.
4436 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4437 of the symbol includes the entry matched with the input_section
4438 and having tls_tpoff32 flag on. When linking statically, set
4439 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4440 is defined in this executable.
4441 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4442
4443 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4444
4445 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4446 even if there is just non-empty .rela.plt.
4447
4448 2003-02-10 Nick Clifton <nickc@redhat.com>
4449
4450 * archures.c (bfd_mach_arm_ep9312): Define.
4451 * bfd-in2.h: Regenerate.
4452 * cpu-arm.c (processors[]): Add ep9312.
4453 (bfd_arm_arch): Add ep9312.
4454 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4455 messages and add test for Maverick floating point support.
4456 (elf32_arm_print_private_bfd_data): Handle
4457 EF_ARM_MAVERICK_FLOAT flag.
4458 (elf32_arm_object_p): New function.
4459 (elf_backend_object_p): Define.
4460
4461 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4462
4463 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4464 variables, structure fields or function params to tls_mask or
4465 similar to better reflect usage.
4466 (struct got_entry): Comment.
4467 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4468 (get_tls_mask): Rename from get_tls_type.
4469
4470 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4471
4472 * elf64-ppc.c (TLS_GD_LD): Don't define..
4473 (TLS_GD): ..define this instead and update all uses.
4474 (TLS_TPRELGD): Define.
4475 (ppc64_elf_link_hash_table_create): Tweak initialization of
4476 init_refcount and init_offset.
4477 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4478 Mark second slot of GD or LD toc entries.
4479 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4480 from other tls types.
4481 (ppc64_elf_tls_setup): New function, split out from..
4482 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4483 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4484 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4485 return value to properly decide whether toc GD and LD entries can
4486 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4487 to determine GD or LD rather than looking at TLS_LD flag. Don't
4488 attempt to adjust got entry tls_type here..
4489 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4490 look for possible merges.
4491 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4492 optimization.
4493 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4494 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4495 Make use of return value from get_tls_type to properly detect GD and
4496 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4497 handle tls_get_addr removal when looking at REL24 relocs, do it when
4498 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4499 GD or LD.
4500 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4501
4502 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4503
4504 * elf32-hppa.c (group_sections): Don't share a stub section if
4505 stubs are for a large section.
4506
4507 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4508 stubs if !stubs_always_before_branch.
4509
4510 2003-02-07 Nick Clifton <nickc@redhat.com>
4511
4512 * elf.c (swap_out_syms): Generate an error message if an
4513 equivalent output section cannot be found for a symbol.
4514
4515 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4516
4517 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4518 local_got_entries is NULL.
4519
4520 2003-02-06 Andreas Schwab <schwab@suse.de>
4521
4522 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4523 (read_value): Add parameter is_signed, use signed extraction if
4524 the value is signed.
4525 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4526 encoding to read_value.
4527
4528 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4529
4530 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4531 plt info when called to transfer weak sym info.
4532
4533 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4534
4535 * reloc.c: Add PPC and PPC64 TLS relocs.
4536 * libbfd.h: Regenerate.
4537 * bfd-in2.h: Regenerate.
4538 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4539 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4540 against a 32 bit field.
4541 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4542 (_ppc64_elf_section_data): Add t_symndx and comments.
4543 (ppc64_elf_section_data): Use elf_section_data macro.
4544 (ppc64_elf_new_section_hook): American spelling.
4545 (struct got_entry, struct plt_entry): New.
4546 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4547 (struct ppc_stub_hash_entry): Add "addend" field.
4548 (struct ppc_link_hash_entry): Add "tls_type".
4549 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4550 TLS_EXPLICIT): Define.
4551 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4552 (link_hash_newfunc): Init new fields.
4553 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4554 init_offset to NULL.
4555 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4556 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4557 there.
4558 (update_local_sym_info, update_plt_info): New functions.
4559 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4560 handling to use got.glist rather than got.refcount. Likewise for PLT.
4561 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4562 (func_desc_adjust): Adjust for new PLT list.
4563 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4564 (get_sym_h, get_tls_type): New functions.
4565 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4566 (ppc64_elf_tls_optimize): New function.
4567 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4568 TLS relocs.
4569 (ppc64_elf_size_dynamic_sections): Likewise.
4570 (ppc_type_of_stub): Adjust for new PLT list.
4571 (ppc_build_one_stub): Likewise.
4572 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4573 calls specially.
4574 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4575 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4576 init GOT entries that have a reloc. Generate GOT relocs here..
4577 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4578 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4579
4580 2003-02-04 Andreas Schwab <schwab@suse.de>
4581
4582 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4583 (elf_m68k_link_hash_traverse): Remove.
4584 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4585 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4586 reduce casting.
4587 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4588 casting.
4589 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4590 instead of elf_m68k_link_hash_traverse.
4591 (elf_m68k_discard_copies): Change first parameter to pointer to
4592 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4593 elf_m68k_link_hash_entry is needed.
4594
4595 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4596
4597 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4598 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4599 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4600 "plt" field.
4601 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4602 Add "init_offset" field.
4603 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4604 (elf_local_got_ents): Declare.
4605 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4606 and "plt".
4607 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4608 (_bfd_elf_link_hash_table_init): Set "init_offset".
4609 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4610 from init_offset.
4611 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4612
4613 * elf.c (bfd_elf_local_sym_name): Split out from..
4614 (group_signature): ..here.
4615 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4616
4617 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4618
4619 * elf-bfd.h (enum elf_link_info_type): Remove.
4620 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4621 to struct sec. Remove linkonce_p field.
4622 (elf_linkonce_p): Delete.
4623 (elf_discarded_section): Update for sec_info_type change.
4624 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4625 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4626 (ELF_INFO_TYPE_NONE): Define.
4627 (ELF_INFO_TYPE_STABS): Define.
4628 (ELF_INFO_TYPE_MERGE): Define.
4629 (ELF_INFO_TYPE_EH_FRAME): Define.
4630 (ELF_INFO_TYPE_JUST_SYMS): Define.
4631 (STD_SECTION): Update struct sec initializer.
4632 * ecoff.c (bfd_debug_section): Likewise.
4633 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4634 * elflink.h: Likewise.
4635 * elf-eh-frame.c: Likewise.
4636 * elf64-alpha.c: Likewise.
4637 * elfxx-ia64.c: Likewise.
4638 * elfxx-mips.c: Likewise.
4639 * bfd-in2.h: Regenerate.
4640
4641 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4642 referring to used_by_bfd.
4643 * elf64-sparc.c (sec_do_relax): Likewise.
4644 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4645 * elfxx-mips.c (mips_elf_section_data): Likewise.
4646 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4647 (ieee_get_section_contents): Likewise.
4648 (ieee_new_section_hook): Formatting.
4649 (ieee_canonicalize_reloc): Remove commented out code.
4650 * mmo.c (mmo_section_data): Define. Use throughout file.
4651 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4652
4653 2003-01-31 Graydon Hoare <graydon@redhat.com>
4654
4655 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4656 * Makefile.in: Regenerate.
4657 * opncls.c (calc_crc32, get_debug_link_info,
4658 seperate_debug_file_exists, find_seperate_debug_file): New
4659 internal functions.
4660 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4661 contained inside a .gnu_debuglink section.
4662 * bfd-in2.h: Regenerate.
4663
4664 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4665
4666 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4667 entry->abfd when it's NULL.
4668
4669 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4670
4671 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4672 _bfd_elf_section_offset returning -2 the same way as -1.
4673
4674 * elfxx-mips.c (mips_elf_multi_got): New function.
4675 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4676 addend into union along with address and link hash entry.
4677 (struct mips_got_info): Added bfd2got and next.
4678 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4679 (mips_elf_got_section, mips_elf_create_got_section): Use
4680 SEC_EXCLUDE bit to tell whether we really need the got
4681 section. Take boolean arguments to disregard an excluded
4682 section, or to create it as excluded. Adjust all callers.
4683 Use mips_elf_got_section all over.
4684 (mips_elf_local_got_index, mips_elf_got_page,
4685 mips_elf_got16_entry): Take input bfd as argument, and pass it
4686 on to mips_elf_create_local_got_entry.
4687 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4688 Take input bfd as argument, and manage entries in the
4689 appropriate GOT.
4690 (mips_elf_got_offset_from_index): Take input bfd as argument,
4691 and use it to adjust the GP offset of the bfd.
4692 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4693 unreferenced GOT entries of global symbols to the end.
4694 (mips_elf_record_global_got_symbol): Take input bfd as
4695 argument. Add entries to the master GOT hash table.
4696 (struct mips_elf_bfd2got_hash): New.
4697 (struct mips_elf_got_per_bfd_arg): New.
4698 (struct mips_elf_set_global_got_offset_arg): New.
4699 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4700 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4701 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4702 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4703 mips_elf_resolve_final_got_entry,
4704 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4705 mips_elf_got_for_ibfd): New functions.
4706 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4707 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4708 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4709 (mips_elf_got_entry_hash): Take new fields into account. Use
4710 mips_elf_hash_bfd_vma.
4711 (mips_elf_got_entry_eq): Take new fields into account.
4712 (mips_elf_create_got_section): Initialize new fields.
4713 (mips_elf_calculate_relocation): Pass input_bfd to functions
4714 that now take it. Adjust gp for the input_bfd.
4715 (mips_elf_allocate_dynamic_relocation,
4716 mips_elf_create_dynamic_relocation,
4717 _bfd_mips_elf_create_dynamic_sections): Use...
4718 (mips_elf_rel_dyn_section): New function. Borrow code from...
4719 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4720 now take it. Create the got section if needed, even if
4721 excluded, before recording a global got symbol. Move some
4722 code to...
4723 (mips_elf_record_local_got_symbol): New fn.
4724 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4725 Compute multi-got global entries offsets. Move GOT code to...
4726 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4727 if the GOT is too big.
4728 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4729 undefweak symbol to zero. Generate dynamic relocations for
4730 non-primary GOT entries for global symbols.
4731 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4732 case. Generate dynamic relocations for local got entries.
4733 Sort dynamic relocations on N64 too, using...
4734 (sort_dynamic_relocs_64): New fns.
4735 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4736 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4737
4738 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4739
4740 * bfd.c (struct _bfd): Added id field.
4741 * opncls.c (_bfd_id_counter): New static variable.
4742 (_bfd_new_bfd): Use it.
4743 * bfd-in2.h: Rebuilt.
4744
4745 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4746
4747 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4748
4749 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4750
4751 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4752 (elf32_sparc_rev32_howto): New variable.
4753 (sparc_reloc_map): Add TLS relocs.
4754 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4755 Handle REV32.
4756 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4757 New functions.
4758 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4759 struct elf32_sparc_link_hash_table):
4760 New structures.
4761 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4762 elf32_sparc_hash_table): Define.
4763 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4764 create_got_section, elf32_sparc_create_dynamic_sections,
4765 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4766 functions.
4767 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4768 reference counting.
4769 (elf32_sparc_gc_sweep_hook): Likewise.
4770 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4771 (elf32_sparc_size_dynamic_sections): Likewise.
4772 (elf32_sparc_relocate_section): Likewise.
4773 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4774 New functions.
4775 (elf32_sparc_object_p): Allocate backend private object data.
4776 (bfd_elf32_bfd_link_hash_table_create,
4777 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4778 elf_backend_can_refcount): Define.
4779 (elf_backend_create_dynamic_sections): Define to
4780 elf32_sparc_create_dynamic_sections.
4781 * reloc.c: Add SPARC TLS relocs.
4782 * bfd-in2.h, libbfd.h: Rebuilt.
4783 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4784 (sparc_reloc_map): Likewise.
4785
4786 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4787
4788 * bfd-in2.h: Regenerate.
4789 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4790 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4791 (elf_howto_table): Add TLS relocs.
4792 (elf_s390_reloc_type_lookup): Likewise.
4793 (elf_s390_link_hash_entry): Add tls_type.
4794 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4795 New macros.
4796 (elf_s390_link_hash_table): Add tls_ldm_got.
4797 (link_hash_newfunc): Initialize tls_type.
4798 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4799 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4800 (elf_s390_check_relocs): Support TLS relocs.
4801 (elf_s390_gc_sweep_hook): Likewise.
4802 (allocate_dynrelocs): Likewise.
4803 (elf_s390_size_dynamic_sections): Likewise.
4804 (elf_s390_relocate_section): Likewise.
4805 (elf_s390_finish_dynamic_symbol): Likewise.
4806 (bfd_elf32_mkobject): Define for TLS.
4807 * elf64-s390.c: Same changes as for elf32-s390.c.
4808 * libbfd.h: Regenerate.
4809 * reloc.c: Add s390 TLS relocations.
4810
4811 2003-01-24 Charles Lepple <clepple@ghz.cc>
4812
4813 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4814
4815 2003-01-23 Nick Clifton <nickc@redhat.com>
4816
4817 * Add sh2e support:
4818 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4819 * archures.c (bfd_mach_sh2e): Added.
4820 * bfd-in2.h: Rebuilt.
4821 * cpu-sh.c (arch_info_struct): Added SH2e.
4822 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4823
4824 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4825
4826 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4827 dynindx to an int. Rearrange for better packing.
4828 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4829 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4830 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4831 (struct _sh64_elf_section_data): New struct.
4832 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4833 * elf32-sh64-com.c: Include elf32-sh64.h.
4834 * elf32-sh64.c: Likewise.
4835 (sh64_elf_new_section_hook): New function.
4836 (bfd_elf32_new_section_hook): Define.
4837 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4838 (sh64_bfd_elf_copy_private_section_data): Likewise.
4839 (sh64_elf_final_write_processing): Likewise.
4840 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4841 (elf32_sparc_new_section_hook): New function.
4842 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4843 (sec_do_relax): Define.
4844 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4845 (elf32_sparc_relocate_section): Likewise.
4846 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4847 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4848 (mmix_elf_section_data): Define. Use throughout file.
4849 (mmix_elf_new_section_hook): New function.
4850 (bfd_elf64_new_section_hook): Define.
4851 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4852 (ppc64_elf_section_data): Define. Use throughout.
4853 (ppc64_elf_new_section_hook): New function.
4854 (bfd_elf64_new_section_hook): Define.
4855 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4856 (sparc64_elf_new_section_hook): New function.
4857 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4858 (sec_do_relax): Define.
4859 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4860 (sparc64_elf_relocate_section): Likewise.
4861 (bfd_elf64_new_section_hook): Define.
4862 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4863 * elfxx-mips.c (struct _mips_elf_section_data): New.
4864 (mips_elf_section_data): Define. Use throughout.
4865 (_bfd_mips_elf_new_section_hook): New function.
4866 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4867 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4868 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4869 * Makefile.am: Run "make dep-am".
4870 * Makefile.in: Regenerate.
4871
4872 2003-01-21 Richard Henderson <rth@redhat.com>
4873
4874 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4875 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4876 (elf64_alpha_adjust_dynamic_symbol): Set them.
4877 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4878 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4879 symbol index when relaxing LDM to TPREL.
4880 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4881 relocs, even if the target isn't locally defined.
4882 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4883 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4884 relocs vs symndx 0 to the tp base.
4885
4886 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4887
4888 * config.bfd: Handle i[3456]86-*-aros*.
4889
4890 2003-01-21 Andreas Schwab <schwab@suse.de>
4891
4892 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4893 (struct ppc_elf_link_hash_entry): Define.
4894 (ppc_elf_hash_entry): New function.
4895 (struct ppc_elf_link_hash_table): Define.
4896 (ppc_elf_hash_table): New function.
4897 (ppc_elf_link_hash_newfunc): New function.
4898 (ppc_elf_link_hash_table_create): New function.
4899 (ppc_elf_copy_indirect_symbol): New function.
4900 (allocate_dynrelocs): New function.
4901 (readonly_dynrelocs): New function.
4902 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4903 relocs and determine DT_TEXTREL.
4904 (ppc_elf_check_relocs): Don't do that here, just count the
4905 dynamic relocs.
4906 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4907 removed section.
4908 (bfd_elf32_bfd_link_hash_table_create): Define.
4909 (elf_backend_copy_indirect_symbol): Define.
4910
4911 2003-01-21 Richard Henderson <rth@redhat.com>
4912
4913 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4914 TPREL also get a reloc if shared. Remove SREL support.
4915 (elf64_alpha_emit_dynrel): New.
4916 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4917 and GOTTPREL relocs to local symbols against the tp base.
4918 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4919
4920 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4921 use count before clobbering r_type.
4922 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4923 ordering would mean dataflow inspection is necessary.
4924
4925 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4926
4927 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4928
4929 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4930
4931 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4932 elfxx-target.h and #undef it before #define'ing it.
4933 * elf32-i386.c: Likewise.
4934 * elf32-sh64.c: Likewise.
4935 * elf64-alpha.c: Likewise.
4936 * elf64-sh64.c: Likewise.
4937
4938 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4939
4940 * bfd-in2.h: Regenerate.
4941 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4942 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4943 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4944 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4945 R_390_PLTOFF32 and R_390_PLTOFF64.
4946 (elf_s390_reloc_type_lookup): Likewise.
4947 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4948 of GOTPLT references to a function.
4949 (link_hash_newfunc): Initialize gotplt_refcount.
4950 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4951 and creation of the got section out of the main switch. Add support
4952 for the gotoff, gotplt and pltoff relocations.
4953 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4954 and pltoff.
4955 (elf_s390_adjust_gotplt): New function.
4956 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4957 plt entries.
4958 (allocate_dynrelocs): Add comment.
4959 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4960 for gotoff, gotplt and pltoff relocations.
4961 * elf64-s390.c: Same changes as for elf32-s390.c.
4962 * libbfd.h: Regenerate.
4963 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4964 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4965 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4966 and BFD_RELOC_390_PLTOFF64.
4967
4968 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4969
4970 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4971 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4972
4973 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4974
4975 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4976 self_dtpmod_done and self_dtpmod_offset.
4977 (allocate_global_data_got): Only use one got entry for all
4978 dtpmod relocs against local symbols.
4979 (allocate_dynrel_entries): Only need .rela.got entry for
4980 dtpmod against global symbol.
4981 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4982 Reserve space in .rela.got for the local dtpmod entry.
4983 (set_got_entry): Initialize the common local dtpmod .got entry.
4984 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4985 and R_IA_64_DTPREL64MSB.
4986
4987 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4988
4989 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4990 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4991 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4992 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4993 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4994 relative relocs, not with absolute ones.
4995 * Makefile.am: Run "make dep-am".
4996 * Makefile.in: Regenerate.
4997 * po/SRC-POTFILES.in: Regenerate.
4998
4999 2003-01-15 Andreas Schwab <schwab@suse.de>
5000
5001 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
5002 relocation against a non-allocated readonly section.
5003
5004 2003-01-10 Alan Modra <amodra@bigpond.net.au>
5005
5006 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
5007 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
5008
5009 2002-01-08 Klee Dienes <kdienes@apple.com>
5010
5011 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
5012 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
5013 * Makefile.in: Regenerate.
5014
5015 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
5016
5017 * elfn32-mips.c (prev_reloc_section): New.
5018 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
5019 (SET_RELOC_ADDEND): Parenthesize macro argument.
5020
5021 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
5022
5023 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
5024 adjust addil instructions if the symbol has no section.
5025
5026 2003-01-07 DJ Delorie <dj@redhat.com>
5027
5028 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
5029 partial_inplace.
5030
5031 2003-01-07 Andreas Schwab <schwab@suse.de>
5032
5033 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
5034 PC relative relocations.
5035 (elf_m68k_discard_copies): Set it here instead.
5036
5037 2002-01-02 Ben Elliston <bje@redhat.com>
5038 Jeff Johnston <jjohnstn@redhat.com>
5039
5040 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
5041 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
5042 (BFD32_BACKENDS): Add elf32-iq2000.lo.
5043 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
5044 (cpu-iq2000.lo): New target.
5045 * Makefile.in: Regenerate.
5046 * config.bfd: Handle iq2000-*-elf.
5047 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
5048 (bfd_archures_list): Add bfd_iq2000_arch.
5049 * configure.in: Handle bfd_elf32_iq2000_vec.
5050 * configure: Regenerate.
5051 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
5052 and BFD_RELOC_IQ2000_UHI16.
5053 * targets.c (bfd_elf32_iq2000_vec): Declare.
5054 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
5055 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
5056 * cpu-iq2000.c: New file.
5057 * elf32-iq2000.c: Likewise.
5058 * libbfd.h: Regenerate.
5059 * bfd-in2.h: Likewise.
5060
5061 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
5062
5063 * elfxx-mips.c: Include libiberty.h.
5064 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
5065 (mips_set_isa_flags): New function, split out from...
5066 (_bfd_mips_elf_final_write_processing): ...here. Only call
5067 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
5068 (mips_mach_extensions): New array.
5069 (mips_32bit_flags_p): New function.
5070 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
5071 Use mips_32bit_flags_p to check if one binary is 32-bit and the
5072 other is 64-bit. When adopting IBFD's architecture, adopt the
5073 bfd_mach as well as the flags.
5074
5075 2003-01-02 Nick Kelsey <nickk@ubicom.com>
5076
5077 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
5078 fix internal errors, fix bad code generation, fix incorrect stabs
5079 information, and improve ability to eliminate redundant page
5080 instructions. Added code to ip2k_final_link_relocate to self-verify
5081 the linker relaxation. Fix formatting problems.
5082
5083 2002-12-30 Chris Demetriou <cgd@broadcom.com>
5084
5085 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
5086 * archures.c (bfd_mach_mipsisa32r2): New define.
5087 * bfd-in2.h: Regenerate.
5088 * cpu-mips.c (I_mipsisa32r2): New enum value.
5089 (arch_info_struct): Add entry for I_mipsisa32r2.
5090 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
5091 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
5092 (_bfd_mips_elf_final_write_processing): Add
5093 bfd_mach_mipsisa32r2 case.
5094 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
5095 binaries marked as using MIPS32 Release 2.
5096
5097 2002-12-30 Dmitry Diky <diwil@mail.ru>
5098
5099 * Makefile.am: Add msp430 target.
5100 * configure.in: Likewise.
5101 * Makefile.in: Regenerate.
5102 * configure: Regenerate.
5103 * archures.c: Add msp430 architecture vector.
5104 * config.bfd: Likewise.
5105 * reloc.c: Add msp430 relocs.
5106 * targets.c: Add msp320 target.
5107 * cpu-msp430.c: New file: msp430 cpu detection.
5108 * elf32-msp430.c: New file: msp430 reloc processing.
5109 * bfd-in2.h: Regenerate.
5110 * libbfd.h: Regenerate.
5111
5112 2002-12-28 Jakub Jelinek <jakub@redhat.com>
5113
5114 * elf.c (elf_sort_sections): Don't reorder .tbss.
5115 (assign_file_positions_for_segments): Only adjust off/voff
5116 for increased alignment in PT_LOAD or PT_NOTE segment,
5117 but adjust p_filesz for .tbss too. in PT_LOAD consider
5118 .tbss to have zero memory size.
5119 (copy_private_bfd_data) [SECTION_SIZE]: Define.
5120 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
5121 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
5122 into PT_TLS segment. Never put SHF_TLS sections in
5123 segments other than PT_TLS or PT_LOAD.
5124
5125 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
5126 sh_entsize.
5127
5128 2002-12-23 DJ Delorie <dj@redhat.com>
5129
5130 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
5131
5132 2002-12-23 Alan Modra <amodra@bigpond.net.au>
5133
5134 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
5135
5136 2002-12-23 Nick Clifton <nickc@redhat.com>
5137
5138 * archures.c (bfd_arch_get_compatible): Add third parameter
5139 'accept_unknowns'. Only accept unknown format BFDs if
5140 accept_unknowns is true, or if the format is "binary".
5141 * bfd-in2.h: Regenerate.
5142
5143 2002-12-21 Nick Clifton <nickc@redhat.com>
5144
5145 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
5146 that subtracted 8 from pc relative relocations.
5147
5148 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5149
5150 * coff-h8300.c: Fix comment typos.
5151 * coffcode.h: Likewise.
5152 * cpu-cris.c: Likewise.
5153 * elf32-vax.c: Likewise.
5154 * genlink.h: Likewise.
5155 * linker.c: Likewise.
5156 * som.c: Likewise.
5157 * tekhex.c: Likewise.
5158 * vms-misc.c: Likewise.
5159
5160 2002-12-20 DJ Delorie <dj@redhat.com>
5161
5162 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
5163 * libbfd.h: Regenerate.
5164 * bfd-in2.h: Regenerate.
5165 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
5166 (xstormy16_reloc_map): Add R_XSTORMY16_12.
5167
5168 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5169
5170 * doc/bfdint.texi: Fix typos.
5171
5172 2002-12-20 Paul Eggert <eggert@twinsun.com>
5173
5174 Port to POSIX 1003.1-2001.
5175 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5176 * configure.in (build-warnings): Likewise.
5177 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5178 * aclocal.m4: Regenerate.
5179 * config.in: Regenerate.
5180 * configure: Regenerate.
5181
5182 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5183
5184 * coff-h8300.c: Include libiberty.h.
5185 (h8300_reloc16_extra_cases): Check the hash table creator before
5186 referencing h8300 specific fields. Stash the hash table pointer
5187 in a local var. Comment typo fixes.
5188 (h8300_bfd_link_add_symbols): Likewise.
5189
5190 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5191 dst_mask comments.
5192 * bfd-in2.h: Regenerate.
5193
5194 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5195
5196 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5197 code a little. Comment on dynamic relocs against section symbols.
5198
5199 2002-12-17 Roger Sayle <roger@eyesopen.com>
5200
5201 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5202 the HP compiler's "long long".
5203
5204 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5205
5206 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5207 and R_XSTORMY16_HI16) howto entries.
5208 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5209 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5210 determine the start of the second reloc table.
5211
5212 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5213
5214 * ecofflink.c: Fix the reading of the debugging information
5215 of Tru64/Alpha binaries that are produced by recent Compaq
5216 compilers.
5217 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5218 table.
5219 (lookup_line): Because of the strange information sometimes
5220 generated by Compaq's recent compilers, change how the FDR
5221 table is searched so that PDRs (procedure descriptors) are
5222 correctly found. Note that this change is really more of a hack;
5223 however, I have included extensive documentation as to why
5224 this is the best solution short of an extensive rewrite or
5225 another hack.
5226 (fdrtab_lookup): Add comments to explain the algorithm.
5227
5228 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5229
5230 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5231 initializers to match struct declaration.
5232
5233 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5234
5235 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5236 * elf.c (get_program_header_size): Likewise.
5237 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5238 (m32r_elf_generic_reloc): Likewise.
5239 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5240 * elflink.h (elf_bfd_discard_info): Likewise.
5241
5242 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5243
5244 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5245 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5246 DT_RELSZ adjustment, not output section. Avoid writing tags when
5247 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5248 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5249 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5250 DT_RELASZ adjustment, not output section. Avoid writing tags when
5251 unchanged. Adjust DT_RELA.
5252 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5253 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5254
5255 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5256
5257 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5258 addend by 4.
5259
5260 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5261
5262 * elfxx-mips.c (struct mips_got_entry): New.
5263 (struct mips_got_info): Added got_entries field.
5264 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5265 (mips_elf_local_got_index, mips_elf_got_page,
5266 mips_elf_got16_entry): Re-implement in terms of new...
5267 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5268 Change return type.
5269 (mips_elf_highest): Warning clean-up.
5270 (mips_elf_create_got_section): Initialize got_entries.
5271 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5272 local got size.
5273 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5274 GOT_PAGE entries, since we now reuse GOT16 entries.
5275
5276 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5277
5278 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5279 read-only section that lies after .text and before .data to be
5280 written into the output file and included in a_text.
5281 (translate_to_native_sym_flags): If an otherwise unrepresentable
5282 section was merged with .text, convert its symbols to N_TEXT
5283 symbols.
5284 * libaout.h (aout_section_merge_with_text_p): New macro.
5285
5286 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5287
5288 * bfd-in.h: Comment typo fix. Formatting.
5289 * bfd-in2.h: Regenerate.
5290 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5291 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5292 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5293
5294 2002-12-05 Richard Henderson <rth@redhat.com>
5295
5296 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5297 Only send PCREL21B though the plt. Fix installed reloc type.
5298 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5299 against PCREL22 or PCREL64I; clean up error messages for
5300 branch relocs.
5301
5302 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5303
5304 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5305 New functions.
5306 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5307
5308 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5309
5310 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5311
5312 2002-12-04 H.J. Lu <hjl@gnu.org>
5313
5314 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5315 BFD address when constructing local name.
5316
5317 2002-12-04 Andreas Schwab <schwab@suse.de>
5318
5319 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5320 member.
5321 (elf_m68k_link_hash_table_create): Initialize it.
5322 (elf_m68k_check_relocs): Handle symbols that are forced to be
5323 local due to visibility changes.
5324 (elf_m68k_adjust_dynamic_symbol): Likewise.
5325 (elf_m68k_size_dynamic_sections): Likewise.
5326 (elf_m68k_discard_copies): Likewise.
5327 (elf_m68k_relocate_section): Likewise.
5328
5329 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5330
5331 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5332
5333 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5334
5335 * srec.c (srec_write_symbols): Restore '$' prefix to address
5336 accidentally removed in 2002-04-04 change.
5337 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5338
5339 2002-12-03 Nick Clifton <nickc@redhat.com>
5340
5341 * elf32-ppc.c (apuinfo_list_init): New function.
5342 (apuinfo_list_add): New function: Add a value to the list.
5343 (apuinfo_list_length): New function: Return the number of
5344 values on the list.
5345 (apuinfo_list_element): New function: Return a value on the
5346 list.
5347 (apuinfo_list_finish): New function: Free the resources used
5348 by the list.
5349 (ppc_elf_begin_write_processing): New function. Scan the
5350 input bfds for apuinfo sections.
5351 (ppc_elf_write_section): New function: Delay the creation of
5352 the contents of an apuinfo section in an output bfd.
5353 (ppc_elf_final_write_processing): New function. Create the
5354 contents of an apuinfo section in an output bfd.
5355 (elf_backend_begin_write_processing): Define.
5356 (elf_backend_final_write_processing): Define.
5357 (elf_backend_write_section): Define.
5358
5359 2002-12-03 Richard Henderson <rth@redhat.com>
5360
5361 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5362
5363 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5364
5365 Fix PR savannah/1417:
5366 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5367 branch if it goes to the start of the deleted region.
5368
5369 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5370
5371 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5372 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5373 bfd_mach_m6812s): Declare.
5374
5375 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5376 (_bfd_m68hc12_elf_set_private_flags): Call it.
5377 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5378 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5379 report microcontroller incompatibilities (HC12 vs HCS12).
5380 (elf_backend_object_p): Update.
5381
5382 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5383
5384 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5385 (enum bfd_boolean, boolean): Delete.
5386 (bfd_boolean): Typedef to an int.
5387 (FALSE, TRUE): Define.
5388 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5389 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5390 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5391 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5392 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5393 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5394 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5395 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5396 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5397 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5398 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5399 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5400 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5401 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5402 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5403 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5404 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5405 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5406 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5407 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5408 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5409 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5410 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5411 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5412 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5413 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5414 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5415 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5416 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5417 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5418 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5419 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5420 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5421 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5422 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5423 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5424 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5425 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5426 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5427 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5428 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5429 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5430 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5431 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5432 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5433 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5434 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5435 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5436 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5437 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5438 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5439 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5440 of bfd_boolean vars with TRUE/FALSE. Formatting.
5441 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5442
5443 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5444
5445 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5446 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5447 with Elf_Internal_Rela.
5448 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5449 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5450 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5451 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5452 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5453 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5454 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5455 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5456 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5457 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5458 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5459 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5460 throughout instead.
5461 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5462 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5463 Remove INLINE keyword.
5464 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5465 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5466 as a bfd_byte *.
5467 (elf_write_relocs): Consolidate REL and RELA code.
5468 (elf_slurp_reloc_table_from_section): Simplify REL code.
5469 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5470 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5471 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5472 RELA code.
5473 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5474 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5475 (elf_link_output_relocs): Likewise.
5476 (elf_reloc_link_order): Likewise.
5477 (elf_finish_pointer_linker_section): Likewise.
5478 (struct elf_link_sort_rela): Remove union.
5479 (elf_link_sort_cmp1): Update to suit.
5480 (elf_link_sort_cmp2): Here too.
5481 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5482 over-allocation for int_rels_per_ext_rel != 1 case.
5483 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5484 * elf32-i386.c: Likewise.
5485 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5486 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5487 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5488 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5489 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5490 elf64-sparc.c, elf64-x86-64.c: Likewise.
5491 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5492 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5493 bfd_elf32_swap_reloc_in.
5494
5495 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5496 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5497 (mips_elf64_swap_reloc_in): Zero r_addend.
5498 (mips_elf64_be_swap_reloc_in): Likewise.
5499 (mips_elf64_slurp_one_reloc_table): Simplify.
5500
5501 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5502 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5503 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5504
5505 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5506
5507 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5508 unresolved debugging relocs in dynamic applications.
5509 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5510
5511 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5512
5513 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5514 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5515 on a relocatable link. Comment typos.
5516 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5517 in the order they are declared. Clear elf_hash_value too.
5518 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5519 eh_info and tls_segment.
5520 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5521 sorted when discarding relocs by turning them into R_*_NONE.
5522
5523 * libbfd.c (warn_deprecated): Comment spelling.
5524 * po/SRC-POTFILES.in: Regenerate.
5525
5526 2002-11-21 Richard Henderson <rth@redhat.com>
5527
5528 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5529 arch's st_other bits when merging visibilities.
5530 (elf_link_output_extsym): Tidy clearing of visibility field.
5531
5532 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5533
5534 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5535 (SWAP_OUT_RELOC_OFFSET): Define.
5536
5537 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5538
5539 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5540 can_refcount is properly extended to the type of
5541 init_refcount.
5542
5543 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5544
5545 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5546 (_bfd_mips_elf_relocate_section): Use it.
5547
5548 * elfxx-mips.c (MNAME): New macro.
5549 (_bfd_mips_elf_check_relocs): Use it.
5550 (_bfd_mips_elf_discard_info): Likewise.
5551 (_bfd_mips_elf_final_link): Likewise.
5552
5553 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5554
5555 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5556 rel_hdr.sh_size too.
5557
5558 2002-11-18 Klee Dienes <kdienes@apple.com>
5559
5560 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5561 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5562 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5563 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5564 Add dependencies for bfdwin.c, bfdio.c.
5565 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5566 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5567 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5568 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5569 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5570 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5571 bfd_get_size (moved from libbfd.c and bfd.c).
5572 * bfdwin.c New file. Contains _bfd_window_internal,
5573 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5574 libbfd.c and bfd.c).
5575 * po/SRC-POTFILES.in: Regenerate.
5576 * po/bfd.pot: Regenerate.
5577 * libbfd.h: Regenerate.
5578 * bfd-in2.h: Regenerate.
5579 * aclocal.m4: Regenerate.
5580 * Makefile.in: Regenerate.
5581 * configure: Regenerate.
5582
5583 2002-11-18 Klee Dienes <kdienes@apple.com>
5584
5585 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5586
5587 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5588
5589 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5590 jsr after a short jump.
5591 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5592
5593 2002-11-15 Klee Dienes <kdienes@apple.com>
5594
5595 * pef.c (bfd_pef_convert_architecture): Move declaration of
5596 ARCH_POWERPC and ARCH_M68K to the start of the function.
5597
5598 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5599
5600 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5601
5602 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5603
5604 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5605 For bpo_gregs_section->contents, allocate _raw_size, not
5606 _cooked_size.
5607
5608 2002-11-13 Klee Dienes <kdienes@apple.com>
5609
5610 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5611
5612 2002-11-13 H.J. Lu <hjl@gnu.org>
5613
5614 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5615
5616 2002-11-13 Klee Dienes <kdienes@apple.com>
5617 Alan Modra <amodra@bigpond.net.au>
5618
5619 * bfd.c (struct bfd_preserve): New.
5620 (bfd_preserve_save): New function.
5621 (bfd_preserve_restore): Ditto.
5622 (bfd_preserve_finish): Ditto.
5623 * bfd-in2.h: Regenerate.
5624 * mach-o.c: Formatting.
5625 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5626 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5627 (bfd_mach_o_core_p): Ditto.
5628 (bfd_mach_o_scan): Pass in mdata.
5629 * mach-o.h (bfd_mach_o_scan): Update prototype.
5630 * pef.c: Formatting.
5631 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5632 (bfd_pef_xlib_object_p): Ditto.
5633 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5634 * pef.h (bfd_pef_scan): Update prototype.
5635 * xsym.c: Formatting, K&R fixes.
5636 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5637 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5638 * xsym.h (bfd_sym_scan): Declare.
5639 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5640 * elfcore.h (elf_core_file_p): Likewise.
5641 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5642
5643 2002-11-12 Nick Clifton <nickc@redhat.com>
5644
5645 * po/da.po: Updated Danish translation.
5646
5647 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5648
5649 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5650 relocatable link too.
5651 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5652 eh_frame and stab sections. Zap deleted relocs.
5653 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5654 (elf_bfd_discard_info): Run for relocatable link too.
5655 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5656 Handle ld -r case.
5657 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5658 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5659
5660 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5661 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5662 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5663 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5664 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5665 (struct elf_link_hash_table): Add eh_info.
5666 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5667 (_bfd_elf_discard_section_eh_frame): Update prototype.
5668 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5669 (_bfd_elf_write_section_eh_frame): Likewise.
5670 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5671 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5672 param. Get "hdr_info" from link hash table.
5673 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5674 header section from link hash table. Save header section to elf_tdata.
5675 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5676 header section from link hash table. Don't alloc hdr_info. Clear
5677 hdr_sec instead of setting "strip".
5678 (_bfd_elf_eh_frame_section_offset): Formatting.
5679 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5680 Get header section from link hash table.
5681 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5682 Get header section from link hash table.
5683 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5684 (get_program_header_size): Likewise.
5685 (_bfd_elf_section_offset): Formatting.
5686 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5687 section pointer in link hash table.
5688 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5689 and _bfd_elf_write_section_eh_frame calls. Update comment about
5690 eh_frame entries.
5691 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5692 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5693
5694 * po/SRC-POTFILES.in: Regenerate.
5695
5696 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5697 relocs for discarded FDEs. Remove dead code.
5698 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5699 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5700 Tidy conditions under which stabs are edited. Formatting.
5701 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5702 from discarded relocs.
5703 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5704 section adjustments after testing magic values.
5705
5706 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5707
5708 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5709 references to large plt symbols.
5710
5711 2002-11-12 Klee Dienes <kdienes@apple.com>
5712
5713 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5714 looking for an unused section name.
5715
5716 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5717
5718 * coff-h8300.c: Fix formatting.
5719 * elf32-h8300.c: Likewise.
5720 * reloc16.c: Likewise.
5721
5722 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5723
5724 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5725 section when dynamic section unused; _bfd_strip_section_from_output
5726 instead.
5727
5728 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5729
5730 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5731 and sym_vec.
5732
5733 * dwarf2.c: Revert last change.
5734
5735 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5736
5737 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5738 _bfd_dwarf2_find_nearest_line): Use
5739 bfd_simple_get_relocated_section_contents() instead of
5740 bfd_get_section_contents().
5741 * reloc.c (bfd_perform_relocation): Add sanity check.
5742 * simple.c (simple_get_relocated_section_contents): If the section
5743 does not have any relocs associated with it, just return the
5744 unadjusted contents.
5745
5746 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5747
5748 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5749 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5750 contents, enabling for a non-DSO, for symbols defined in the
5751 program with --export-dynamic.
5752
5753 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5754
5755 * elf64-ppc.c: Comment typo fixes.
5756 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5757
5758 2002-11-07 Nick Clifton <nickc@redhat.com>
5759
5760 * po/da.po: Updated Danish translation.
5761
5762 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5763
5764 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5765 exactly three internal relocs per external reloc. Set reloc_count
5766 to the external reloc count.
5767
5768 2002-11-06 Klee Dienes <kdienes@apple.com>
5769
5770 * coff-stgo32.c (stub_bytes): Mark as const.
5771 Fix comment formatting.
5772
5773 2002-11-06 Klee Dienes <kdienes@apple.com>
5774
5775 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5776 xsym.lo.
5777 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5778 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5779 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5780 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5781 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5782 sym.
5783 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5784 * Makefile.in: Regenerate.
5785 * doc/Makefile.in: Regenerate.
5786 * bfd-in2.h: Regenerate.
5787 * xsym.c: New file. Contains support for the Apple/Metrowerks
5788 xSYM debugging format.
5789 * xsym.h: New file.
5790 * pef.c: New file. Contains support for the Apple Code Fragment
5791 Manager Preferred Executable Format
5792 * pef.h: New file.
5793 * pef-traceback.h: New file. Contains support for parsing PowerPC
5794 traceback tables as used by PEF executables (and perhaps other
5795 systems as well).
5796 * mach-o.c: New file. Contains support for the Mach-O object file
5797 format.
5798 * mach-o.h: New file.
5799 * mach-o-target.c: New file. Declares the mach-o targets
5800 themselves. Included three times by mach-o.c; each time with a
5801 different set of macros set.
5802
5803 2002-11-06 Graeme Peterson <gp@qnx.com>
5804
5805 * Makefile.am: Remove entries for elf32-qnx.[ch].
5806 * Makefile.in: Regenerate.
5807 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5808 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5809 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5810 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5811 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5812 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5813 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5814 * configure: Regenerate.
5815 * elf32-qnx.c: Remove.
5816 * elf32-qnx.h: Remove.
5817 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5818 is_contained_by_filepos, and copy_private_bfd_data_p.
5819 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5820 is_contained_by_filepos, and copy_private_bfd_data_p.
5821 * elf32-i386.c: Remove QNX extended bfd support.
5822 * elf32-ppc.c: Remove QNX extended bfd support.
5823 * elf32-sh.c: Remove QNX extended bfd support.
5824 * elfarm-nabi.c: Remove QNX extended bfd support.
5825 * targets.c: Remove qnx vectors.
5826 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5827 (elf_backend_is_contained_by_filepos): Remove.
5828 (elf_backend_copy_private_bfd_data_p): Remove.
5829 * po/SRC-POTFILES.in: Regenerate.
5830
5831 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5832 Alan Modra <amodra@bigpond.net.au>
5833
5834 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5835 dynamic relocs against section symbols for the output section vma.
5836
5837 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5838
5839 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5840 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5841
5842 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5843 Alan Modra <amodra@bigpond.net.au>
5844
5845 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5846 vectors in target_selvecs.
5847 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5848 in target_selvecs.
5849 (sh-*-netbsdelf*): Likewise.
5850 * configure.in (assocvecs): New variable. Handle assocvecs like
5851 selvecs.
5852 * configure: Regenerate.
5853 * format.c (bfd_check_format_matches): Store bfd_target pointers
5854 in matching_vector instead of target names. Select first target
5855 from bfd_associated_vector that matches a list of ambiguous targets.
5856 * targets.c (_bfd_associated_vector): New array.
5857 (bfd_associated_vector): New variable.
5858 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5859 * libbfd-in.h (bfd_associated_vector): Declare.
5860 * libbfd.h: Regenerate.
5861
5862 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5863
5864 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5865 non-NULL before dereferencing.
5866
5867 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5868
5869 * vms.c (vms_object_p): Restore the start address when returning
5870 NULL.
5871
5872 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5873 Hans-Peter Nilsson <hp@axis.com>
5874
5875 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5876 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5877 Set up a larger symshndxbuf, and write it out. Free it on
5878 exit rather than freeing symbuf twice. Correct section index
5879 on output section symbol loop.
5880 (elf_link_output_sym): Accumulate symbol extension section
5881 indices, reallocating symshndxbuf rather than writing it out.
5882 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5883 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5884 Use bfd_zalloc to clear i_shdrp[0] too.
5885
5886 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5887
5888 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5889 _raw_size of cranges section if _cooked_size not yet set.
5890
5891 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5892
5893 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5894 for bfd_elf32_swap_symbol_out.
5895
5896 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5897
5898 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5899 signed and unsigned in comparison.
5900
5901 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5902
5903 * coffcode.h: Remove extraneous '\'.
5904
5905 2002-10-28 H.J. Lu <hjl@gnu.org>
5906
5907 * Makefile.am (targets.lo): Depend on Makefile instead of
5908 config.status.
5909 (archures.lo): Likewise.
5910 * Makefile.in: Regenerated.
5911
5912 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5913
5914 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5915 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5916 targ_selvecs.
5917
5918 2002-10-25 Jim Wilson <wilson@redhat.com>
5919
5920 * elf64-sh64.c (sh_elf64_relocate_section): Call
5921 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5922 of SHF_MERGE section.
5923
5924 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5925
5926 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5927
5928 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5929
5930 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5931 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5932 unsigned int.
5933 (NAME(aout,final_link)): Cast enum used in assignment.
5934 (aout_link_write_symbols): Cast enums in comparisons, int values to
5935 boolean, enums in assignments to int.
5936 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5937 (aout_link_input_section_ext): Likewise. Cast enums used in
5938 comparisons with unsigned ints.
5939 (aout_link_reloc_link_order): Cast enum to int in assignment.
5940 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5941 calls to char *.
5942 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5943 assignment.
5944 * bfd-in2.h (bfd_set_section_vma): Likewise.
5945 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5946 * binary.c (bfd_alloc): Cast enum to long.
5947 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5948 * dwarf2.c (read_abbrevs): Add casts to enum types.
5949 (read_attribute_value): Likewise.
5950 (arange_add): Cast result of bfd_zalloc call.
5951 (comp_unit_contains_address): Return true and false.
5952 (comp_unit_find_nearest_line): Cast return to boolean.
5953 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5954 * gen-aout.c: define macro '_' if not defined.
5955 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5956 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5957 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5958 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5959 (bfd_generic_is_local_label_name): Cast return to boolean.
5960 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5961 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5962 struct bfd_hash_entry *.
5963 (_bfd_generic_link_hash_newfunc): likewise.
5964 (_bfd_generic_final_link): Cast enum to unsigned int.
5965 * merge.c (sec_merge_emit): Cast return to boolean.
5966 (merge_strings): Add casts to const unsigned char *.
5967 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5968 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5969 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5970 to struct bfd_hash_entry *.
5971 (bfd_set_section_content): Add cast to PTR in comparison.
5972 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5973 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5974 simple_dummy_unattached_reloc,
5975 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5976 function definitions.
5977 * srec.c (S3Forced): Initialize to false.
5978 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5979 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5980 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5981 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5982 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5983 comparisons.
5984
5985 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5986
5987 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5988 relocs into shared lib non-allocated reloc sections.
5989
5990 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5991
5992 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5993 sorted even when given an out-of-order line sequence.
5994 (lookup_address_in_line_info_table): When an exact VMA match is
5995 not found, return line information with the closest VMA.
5996
5997 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5998
5999 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
6000 HPUX 11.00 patch PHSS_26559.
6001
6002 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
6003
6004 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
6005 the options section into a separate section unless IRIX 6
6006 compatibility is enabled.
6007
6008 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
6009
6010 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
6011 into arrays.
6012 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
6013 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
6014 into account.
6015 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
6016 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
6017
6018 2002-10-21 Graeme Peterson <gp@qnx.com>
6019
6020 * targets.c (_bfd_target_vector): Add missing qnx vectors.
6021
6022 2002-10-21 Alan Modra <amodra@bigpond.net.au>
6023
6024 * targets.c (bfd_target_list): Don't return the default target twice.
6025
6026 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
6027
6028 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
6029 perror with bfd_perror.
6030
6031 2002-10-19 H.J. Lu <hjl@gnu.org>
6032
6033 * elflink.h (elf_link_add_object_symbols): Correctly handle
6034 DT_RPATH and DT_RUNPATH.
6035
6036 2002-10-19 Mark Kettenis <kettenis@gnu.org>
6037
6038 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
6039
6040 2002-10-17 Denis Chertykov <denisc@overta.ru>
6041
6042 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
6043 for ip2k port.
6044
6045 2002-10-17 Alan Modra <amodra@bigpond.net.au>
6046
6047 * elfxx-target.h (USE_REL): Don't define as 1.
6048 * elf32-arm.h (USE_REL): Provide a default define of 0.
6049 Use #if rather than #ifdef when testing USE_REL.
6050 * elf32-m32r.c: Likewise.
6051
6052 * elf32-arc.c (USE_REL): Define as 1.
6053 * elf32-d10v.c (USE_REL): Likewise.
6054 * elf32-m32r.c (USE_REL): Likewise.
6055 * elf32-m68hc11.c (USE_REL): Likewise.
6056 * elf32-m68hc12.c (USE_REL): Likewise.
6057 * elf32-or32.c (USE_REL): Likewise.
6058 * elfarm-nabi.c (USE_REL): Likewise.
6059
6060 2002-10-16 Jakub Jelinek <jakub@redhat.com>
6061
6062 * config.bfd (s390-*-linux*): Add targ64_selvecs.
6063 (s390x-*-linux*): Add targ_selvecs.
6064
6065 2002-10-16 Alan Modra <amodra@bigpond.net.au>
6066
6067 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
6068 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
6069 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
6070 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
6071 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
6072 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
6073 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
6074 (SOURCE_HFILES): Add elf32-qnx.h.
6075 (BUILD_HFILES): Add bfdver.h.
6076 Run "make dep-am".
6077 * Makefile.in: Regenerate.
6078 * configure.in Update bfd vector dependencies.
6079 * configure: Regenerate.
6080 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
6081 * elf32-i386qnx.c: Likewise.
6082 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
6083 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
6084 * elf32-sh-lin.c: Likewise.
6085 * elf32-shqnx.c: Likewise.
6086 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
6087 * elf32-sh64-nbsd.c: Likewise.
6088 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
6089 * elf64-sh64-nbsd.c: Likewise.
6090 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
6091 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
6092 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
6093 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
6094 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
6095 (elf_backend_is_contained_by_filepos): Likewise.
6096 (elf_backend_copy_private_bfd_data_p): Likewise.
6097 Globalize and move functions to..
6098 * elf32-qnx.c: ..here. New file.
6099 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
6100 emit target vectors when INCLUDE_SHMEDIA.
6101 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
6102 end of file.
6103 * elf64-sh64.c: Remove ELF_ARCH test.
6104 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
6105 * po/BLD-POTFILES.in: Regenerate.
6106 * po/SRC-POTFILES.in: Regenerate.
6107
6108 2002-10-16 Alan Modra <amodra@bigpond.net.au>
6109
6110 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
6111 loaded with --just-symbols.
6112
6113 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
6114 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6115 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6116 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6117
6118 2002-10-15 Richard Henderson <rth@redhat.com>
6119
6120 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
6121 (BFD64_BACKENDS_CFILES): Likewise.
6122 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
6123 * elf64-alpha-fbsd.c: Remove file, move code ...
6124 * elf64-alpha.c: ... here.
6125 * Makefile.in, configure: Rebuild.
6126
6127 2002-10-14 Richard Henderson <rth@redhat.com>
6128
6129 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
6130 VALUE, not ADDEND.
6131
6132 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
6133
6134 * elf32-sh.c (elf_sh_link_hash_entry): Replace
6135 datalabel_got_offset with union of datalabel_got
6136 offset and refcount.
6137 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
6138 (allocate_dynrelocs): Delete unnecessary code for
6139 STT_DATALABEL type. Create entry in got for
6140 datalabel version of symbol if datalabel_got.refcount > 0.
6141 (sh_elf_relocate_section): Use datalabel_got union.
6142 (sh_elf_gc_sweep_hook): Pull common code to initialize
6143 h and eh out of switch statement. Declare seen_stt_datalabel.
6144 Initialize it. Decrement datalabel_got.refcount for
6145 got relocs when seen_stt_datalabel is true.
6146 Decrement local_got_refcounts entry for datalabel got relocs
6147 of local symbols.
6148 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
6149 (sh_elf_check_relocs): Declare seen_stt_datalabel.
6150 Initialize it. When seen_stt_datalabel is true, increment
6151 datalabel_got refcount rather than got.refcount.
6152 (sh_elf_finish_dynamic_symbol): Create relocs to
6153 initialize got entry for datalabel version of symbol.
6154
6155 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6156
6157 * Makefile.am: Run "make dep-am".
6158 (BFD_H_FILES): Remove version.h.
6159 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
6160 * version.h: ..to here.
6161 * configure.in (bfd_version_date): Remove.
6162 (AC_OUTPUT): Make bfdver.h from version.h.
6163 * bfd.c: #include "bfdver.h".
6164 * vms-hdr.c: Likewise.
6165 * Makefile.in: Regenerate.
6166 * bfd-in2.h: Regenerate.
6167 * configure: Regenerate.
6168 * po/SRC-POTFILES.in: Regenerate.
6169
6170 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6171
6172 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6173 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6174 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6175 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6176 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6177 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6178 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6179 bfd_mach_ip2022, bfd_mach_ip2022ext,
6180 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6181 * bfd-in2.h: Regenerate.
6182
6183 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6184
6185 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6186 endian vector to targ_selvecs.
6187
6188 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6189
6190 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6191 save_addend argument. Don't apply the 32-bit mask to a
6192 GPREL32 value if it's to be used in another relocation. Don't
6193 use forced-check computation of local_p to decide whether to
6194 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6195 of the addend of a non-in-place GPREL16 relocation.
6196 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6197 mips_elf_calculate_relocation().
6198
6199 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6200
6201 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6202 with symbols in other sections if we relaxed something; the sections
6203 output offsets must be re-computed before.
6204
6205 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6206
6207 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6208 handling to use Elf_Internal_Sym.
6209 (m68hc11_elf_relax_delete_bytes): Likewise.
6210
6211 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6212
6213 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6214 sh_elf_object_p, dtpoff_base): New functions.
6215 (sh_elf_howto_table): Add TLS relocs.
6216 (sh_reloc_map): Likewise.
6217 (sh_elf_info_to_howto): Support TLS relocs.
6218 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6219 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6220 New macros.
6221 (sh_elf_obj_tdata): New.
6222 (elf_sh_link_hash_table): Add tls_ldm_got.
6223 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6224 (allocate_dynrelocs): Support TLS relocs.
6225 (sh_elf_size_dynamic_sections): Likewise.
6226 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6227 .rela.got section when found already. Return false after printing
6228 error about unresolvable relocation.
6229 (sh_elf_gc_sweep_hook): Support TLS relocs.
6230 (sh_elf_check_relocs): Likewise.
6231 (sh_elf_finish_dynamic_symbol): Likewise.
6232 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6233 * reloc.c: Add SH TLS relocs.
6234 * bfd-in2.h, libbfd.h: Regenerate.
6235
6236 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6237
6238 * Makefile.in: Regenerated.
6239
6240 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6241
6242 * Makefile.am: Run dep-am.
6243 (BFD_H_DEP): Add simple.c and linker.c.
6244 (BFD32_LIBS): Add simple.lo.
6245 (BFD32_LIBS_CFILES): Add simple.c.
6246 * Makefile.in: Regenerated.
6247 * bfd-in2.h: Regenerated.
6248 * simple.c: New file.
6249
6250 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6251
6252 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6253 (record_thumb_to_arm_glue): Likewise.
6254 * ecoff.c (ecoff_link_add_externals): Likewise.
6255 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6256 (record_thumb_to_arm_glue): Likewise.
6257 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6258 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6259 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6260 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6261 * elf64-ppc.c (func_desc_adjust): Likewise.
6262 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6263 (sh64_elf64_create_dynamic_sections): Likewise.
6264 * elflink.c (_bfd_elf_create_got_section): Likewise.
6265 (_bfd_elf_create_dynamic_sections): Likewise.
6266 (_bfd_elf_create_linker_section): Likewise.
6267 * elflink.h (elf_add_default_symbol): Likewise.
6268 (elf_link_create_dynamic_sections): Likewise.
6269 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6270 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6271 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6272 (_bfd_mips_elf_add_symbol_hook): Likewise.
6273 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6274 * linker.c (generic_link_add_symbol_list): Likewise.
6275 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6276
6277 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6278
6279 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6280 completely removed. Correct local sym adjustment.
6281
6282 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6283
6284 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6285 Correct mistake in calculation of address of .got.
6286 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6287 elf_sh64_pic_plt_entry_le): Likewise.
6288
6289 2002-10-09 Richard Shann <richard.shann@superh.com>
6290 Stephen Clarke <stephen.clarke@superh.com>
6291
6292 * Makefile.am: Add entries for elf32-sh64-lin.c and
6293 elf64-sh64-lin.c. Regenerate.
6294 * Makefile.in: Regenerate.
6295 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6296 to use sh64 vectors rather than sh vectors.
6297 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6298 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6299 * configure: Regenerate.
6300 * elf32-sh64-lin.c: New file.
6301 * elf64-sh64-lin.c: New file.
6302 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6303 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6304
6305 2002-10-08 H.J. Lu <hjl@gnu.org>
6306
6307 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6308 IE->LE transition for R_386_TLS_IE.
6309
6310 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6311
6312 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6313
6314 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6315
6316 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6317 sections.
6318
6319 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6320
6321 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6322 code.
6323
6324 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6325
6326 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6327
6328 * opncls.c: Formatting.
6329 (_bfd_new_bfd): Use a smaller section hash table.
6330
6331 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6332
6333 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6334 of the other two relocations packed with a REL32 to NONE.
6335
6336 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6337
6338 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6339 (sh_elf_link_hash_newfunc): Initialize it.
6340 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6341 to got.refcount for symbols that are forced local or when
6342 we have direct got refs.
6343 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6344 to correctly adjust got.refcount and plt.refcount.
6345 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6346 (sh_elf_check_relocs): Increment gotplt_refcount.
6347
6348 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6349
6350 * elf32-i386.c (elf_i386_relocate_section): Fix
6351 movl foo@indntpoff, %eax IE->LE transition.
6352
6353 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6354
6355 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6356 sequence and its transitions.
6357
6358 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6359
6360 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6361 to st_value + addend in non-code sections.
6362 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6363 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6364
6365 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6366 Ken Raeburn <raeburn@cygnus.com>
6367 Aldy Hernandez <aldyh@redhat.com>
6368 Eric Christopher <echristo@redhat.com>
6369 Richard Sandiford <rsandifo@redhat.com>
6370
6371 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6372 (bfd_mach_mips5500): New.
6373 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6374 (arch_info_struct): Add corresponding entries here.
6375 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6376 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6377 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6378 bfd_mach_mips5400 and bfd_mach_mips5500.
6379 (_bfd_mips_elf_mach_extends_p): New function.
6380 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6381 the EF_MIPS_MACH flags.
6382 * bfd-in2.h: Regenerate.
6383
6384 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6385
6386 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6387 .got sections.
6388
6389 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6390
6391 * elf.c (map_sections_to_segments): Correct test for start of
6392 writable section in the same page as end of read-only section.
6393
6394 2002-09-27 Matt Thomas <matt@3am-software.com>
6395
6396 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6397 local_got_refcounts usage. Remove allocation of got slot.
6398 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6399 Remove de-allocation of got slot.
6400 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6401 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6402 sections to be GC'ed.
6403 (elf_vax_instantiate_got_entries): New function.
6404 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6405 tests that are now handled by elf_vax_instantiate_got_entries.
6406 Assert GOT entry falls within .got section size. Remove redundant
6407 comparisions. Fix comments.
6408
6409 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6410
6411 * reloc.c: Add x86-64 TLS relocs.
6412 * bfd-in2.h, libbfd.h: Rebuilt.
6413 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6414 relocs. Add TLS relocs.
6415 (x86_64_reloc_map): Add TLS relocs.
6416 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6417 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6418 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6419 (elf64_x86_64_hash_entry): Define.
6420 (struct elf64_x86_64_obj_tdata): New.
6421 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6422 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6423 (link_hash_newfunc): Initialize tls_type.
6424 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6425 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6426 (elf64_x86_64_mkobject): New.
6427 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6428 (elf64_x86_64_tls_transition): New.
6429 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6430 Handle TLS relocs.
6431 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6432 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6433 (elf64_x86_64_size_dynamic_sections): Likewise.
6434 (dtpoff_base, tpoff): New.
6435 (elf64_x86_64_relocate_section): Handle TLS relocs.
6436 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6437 entries.
6438 (bfd_elf64_mkobject): Define.
6439
6440 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6441 DF_STATIC_TLS if shared.
6442
6443 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6444
6445 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6446 empty relocation sections.
6447
6448 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6449
6450 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6451 (ppc64_elf_build_stubs): Build them here instead.
6452
6453 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6454
6455 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6456 addend into r_addend, not *r_offset.
6457 (elf32_sparc_finish_dynamic_symbol): Likewise.
6458 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6459 R_SPARC_RELATIVE's r_offset.
6460
6461 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6462
6463 * dwarf2.c (decode_line_info): Update to correctly decode
6464 the (non-standard DWARF2) out-of-order address sequences
6465 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6466
6467 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6468
6469 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6470
6471 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6472
6473 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6474 for discarded FDEs. Remove redundant assignment.
6475 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6476
6477 2002-09-22 H.J. Lu <hjl@gnu.org>
6478
6479 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6480 the relocation count between different .reloc sections.
6481
6482 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6483
6484 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6485 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6486 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6487 R_PPC_EMB_RELSDA.
6488
6489 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6490 unsigned. Move "symcount" assignment out of loop.
6491 * Makefile.am: Run "make dep-am".
6492 * Makefile.in: Regenerate.
6493 * configure: Regenerate.
6494 * po/SRC-POTFILES.in: Regnerate.
6495
6496 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6497
6498 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6499 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6500 (e.g. IRIX64).
6501
6502 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6503
6504 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6505 even if generating R_PPC_RELATIVE reloc.
6506 (ppc_elf_relocate_section): Make sure relocation is performed
6507 if skip == -2. Clear memory at r_offset when creating dynamic
6508 relocation.
6509
6510 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6511
6512 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6513 BFD_RELOC_386_TLS_GOTIE): Add.
6514 * bfd-in2.h, libbfd.h: Rebuilt.
6515 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6516 and R_386_TLS_GOTIE.
6517 (elf_i386_reloc_type_lookup): Handle it.
6518 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6519 char instead of enum, change GOT_* into defines.
6520 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6521 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6522 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6523 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6524 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6525 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6526 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6527 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6528 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6529 tls_type is GOT_TLS_IE_BOTH.
6530 (elf_i386_size_dynamic_sections): Likewise.
6531 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6532 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6533 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6534 all 4 GOT_TLS_* TLS types.
6535
6536 2002-09-19 Nick Clifton <nickc@redhat.com>
6537
6538 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6539 follow indirect links.
6540
6541 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6542
6543 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6544 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6545 on 64 bit machines.
6546 (ecoff_swap_sym_in) <iss>: Likewise.
6547 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6548 ECOFF information: 'ioptMax' refers to the actual *size*
6549 of the optimization symtab, not the number of entries.
6550
6551 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6552
6553 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6554 ELF_LINK_HASH_NEEDS_PLT logic.
6555
6556 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6557
6558 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6559 correct relocation count.
6560
6561 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6562
6563 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6564 * bfd.c (struct _bfd): Add dynsymcount.
6565 * bfd-in2.h: Regenerated.
6566 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6567 abfd->dynsymcount.
6568 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6569 for overflow.
6570
6571 2002-09-17 Stan Cox <scox@redhat.com>
6572
6573 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6574 (mips_elf64_final_gp): Don't make up gp value.
6575 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6576 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6577 .MIPS.options/.options section.
6578
6579 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6580
6581 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6582 It is benign for FreeBSD < 4.1. Minor reformatting.
6583 * elf64-alpha-fbsd.c: Likewise.
6584
6585 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6586
6587 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6588 addend.
6589
6590 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6591
6592 * elf64-alpha.c (alpha_elf_size_info): Make static.
6593
6594 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6595
6596 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6597 * cpu-tic4x.c: Ditto.
6598
6599 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6600
6601 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6602 duplicate define.
6603
6604 2002-09-16 Bruno Haible <bruno@clisp.org>
6605
6606 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6607 by a target variant implementation.
6608 * elf64-alpha.c: Likewise.
6609 * elf32-i386-fbsd.c: New file.
6610 * elf64-alpha-fbsd.c: New file.
6611 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6612 bfd_elf64_alpha_freebsd_vec.
6613 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6614 bfd_elf64_alpha_freebsd_vec.
6615 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6616 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6617 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6618 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6619 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6620 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6621 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6622
6623 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6624
6625 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6626 NULL.
6627 (elf_i386_relocate_section): Return false after printing error about
6628 unresolvable relocation.
6629
6630 2002-09-12 Nick Clifton <nickc@redhat.com>
6631
6632 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6633 R_ARM_THM_PC11.
6634
6635 2002-09-11 Jeffrey Law <law@redhat.com>
6636
6637 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6638
6639 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6640
6641 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6642 line_ptr before deciding we've found a symbol.
6643
6644 2002-09-11 Nick Clifton <nickc@redhat.com>
6645
6646 * po/da.po: New Danish translation file.
6647 * configure.in (LINGUAS): Add 'da'.
6648 * configure: Regenerate.
6649
6650 2002-09-10 Michael Snyder <msnyder@redhat.com>
6651
6652 * irix-core.c (do_sections, do_sections64): New functions.
6653 (irix_core_core_file_p): Call new functions do_sections,
6654 do_sections64, depending on corefile (32-bit or 64-bit).
6655
6656 2002-09-09 Richard Henderson <rth@redhat.com>
6657
6658 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6659 and PCREL21F like PCREL21B.
6660
6661 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6662
6663 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6664 vector.
6665
6666 2002-09-02 Nick Clifton <nickc@redhat.com>
6667
6668 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6669 names instead of cryptically overloaded bfd_reloc error
6670 codes.
6671 (v850_elf_relocate_section): Likewise.
6672 (v850_elf_relax_section): Replace caching of external symbols
6673 with caching of internal symbols obtained from calling
6674 bfd_elf_get_elf_syms().
6675 Fixup problems with freeing cached allocated memory blocks.
6676
6677 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6678
6679 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6680 (bfd_pj_arch): Use bfd_default_scan.
6681 * cpu-v850.c (scan): Remove.
6682 (N): Use bfd_default_scan.
6683 * cpu-z8k.c (scan_mach): Remove.
6684 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6685 first. Use bfd_default_scan.
6686
6687 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6688 bfd_mach constants.
6689 (ecoff_get_magic): Likewise.
6690 * elf32-v850.c (v850_elf_object_p): Likewise.
6691 (v850_elf_final_write_processing): Likewise.
6692 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6693 (MY(write_object_contents)): Likewise.
6694 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6695 * coffcode.h (coff_write_object_contents): Likewise.
6696 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6697 Remove unnecessary "machine" assignments.
6698 (coff_write_relocs): Test for the absolute section sym by testing
6699 section and flags.
6700
6701 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6702 and bfd_mach_i386_i386_intel_syntax.
6703 * pdp11.c (NAME(aout,machine_type)): Likewise.
6704
6705 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6706
6707 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6708 * bfd-in2.h (align_power): Likewise.
6709
6710 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6711
6712 * Makefile.am: Run "make dep-am".
6713 * Makefile.in: Regenerate.
6714
6715 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6716 * cpu-powerpc.c (powerpc_compatible): Likewise.
6717 * cpu-rs6000.c (rs6000_compatible): Likewise.
6718
6719 2002-08-28 Catherine Moore <clm@redhat.com>
6720
6721 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6722 (v850-elf-reloc): Don't resolve pc relative relocs.
6723 (v850_elf_ignore_reloc): New routine.
6724 (v850_elf_final_link_relocate): Handle new relocs.
6725 (v850_elf_relax_delete_bytes ): New routine.
6726 (v850_elf_relax_section): New routine.
6727 (bfd_elf32_bfd_relax_section): Define.
6728 (HOWTO): New entries for new relocs.
6729 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6730 (BFD_RELOC_V850_LONGJUMP): New reloc.
6731 (BFD_RELOC_V850_ALIGN): New reloc.
6732 * archures.c: Remove redundant v850ea architecture.
6733 * cpu-v850.c: Remove redundant v850ea support.
6734 * libbfd.h: Regenerate.
6735 * bfd-in2.h: Regenerated.
6736
6737 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6738
6739 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6740 * configure.in: Add tic4x_coff vector files.
6741 * configure: Regenerate.
6742 * Makefile.am: Add tic4x target.
6743 * Makefile.in: Regenerate.
6744
6745 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6746
6747 * archures.c: Add the BFD arch type tic4x.
6748 * bfd-in.h: Add BFD_IN_MEMORY flag.
6749 * coff-tic4x.c: New file.
6750 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6751 * cpu-tic4x.c: New file.
6752 * targets.c: Added tic4x- in list of xvecs.
6753 * ticoff.h: New file.
6754 * bfd-in2.h: Regenerate.
6755
6756 2002-08-27 Adam Nemet <anemet@lnxw.com>
6757
6758 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6759 bit of DT_INIT and DT_FINI for Thumb functions.
6760
6761 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6762
6763 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6764
6765 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6766
6767 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6768
6769 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6770
6771 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6772 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6773 Likewise.
6774 (struct elf_sh_pcrel_relocs_copied): Removed.
6775 (struct elf_sh_dyn_relocs): New.
6776 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6777 field with dyn_relocs.
6778 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6779 sections and sym_sec.
6780 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6781 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6782 (sh_elf_create_dynamic_sections): Use create_got_section instead
6783 of _bfd_elf_create_got_section.
6784 (sh_elf_check_relocs): Likewise.
6785 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6786 sections.
6787 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6788 sh_elf_relocate_section, sh_elf_check_relocs,
6789 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6790 Likewise.
6791 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6792 dynamic relocations and avoiding the copy relocation when we
6793 didn't find any dynamic relocations in the section which has
6794 contents or is read-only.
6795 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6796 (sh_elf_size_dynamic_sections): Don't reset the size of
6797 .rela.got section even if dynamic_sections_created flag is off.
6798 Don't use sh_elf_discard_copies. Scan all input bfd and use
6799 allocate_dynrelocs. Call readonly_dynrelocs to determine
6800 whether we need DT_TEXTREL.
6801 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6802 whether the symbol was never referred to.
6803 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6804 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6805 (sh_elf_check_relocs): Call create_got_section if the short-cut
6806 to .got is null. Increment reference counters only instead of
6807 allocating space on dynamic sections here. Don't conditionalize
6808 uninitialized got.offset value when marking the symbol as a
6809 global offset table entry. Keep relocations for symbols satisfied
6810 by a dynamic library to avoid copy relocations for the symbol.
6811 Set dynobj field of an elf hash table if needed.
6812 (sh_elf_finish_dynamic_sections): Handle null section pointer
6813 correctly.
6814 (elf_backend_copy_indirect_symbol): Defined.
6815 (elf_backend_can_refcount): Defined.
6816
6817 2002-08-23 Nick Clifton <nickc@redhat.com>
6818
6819 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6820 previous change. Add comment explaining why.
6821
6822 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6823
6824 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6825 contents of .got.plt[2] to tr0, not address of .got.plt.
6826 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6827 patching absolute plt entry. For shmedia plt entry, set bottom bit
6828 of branch to plt0 as this is a branch to an shmedia instruction.
6829 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6830 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6831 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6832 branch to plt0.
6833 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6834 patching absolute plt entry. For shmedia plt entry, branch to
6835 plt0 is now ptrel, so use relative offset. Set bottom bit of
6836 branch target as it is a branch to an shmedia instruction.
6837
6838 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6839 Richard Shann <richard.shann@superh.com>
6840
6841 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6842 value if .init is an SHmedia function. Similarly for DT_FINI.
6843 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6844
6845 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6846
6847 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6848 dynamic section.
6849 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6850
6851 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6852
6853 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6854 byte read when reading the return address register column.
6855
6856 2002-08-22 Nick Clifton <nickc@redhat.com>
6857
6858 * config.bfd: Add powepc64-*-*bsd* target.
6859
6860 2002-08-22 Graeme Peterson <gp@qnx.com>
6861
6862 * Makefile.am: Add entries for elf32-shqnx.c
6863 * Makefile.in: Regenerate.
6864 * config.bfd: Add support sh-*-nto* target.
6865 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6866 * configure: Regenerate.
6867 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6868 * elf32-sh.c: Do not include elf32-target.h if
6869 ELF32_SH_C_INCLUDED is defined.
6870 * elf32-shqnx.c: New file: Support for QNX.
6871 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6872
6873 2002-08-22 Nick Clifton <nickc@redhat.com>
6874
6875 * po/tr.po: Updated Turkish translation.
6876
6877 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6878 symbols are not read.
6879
6880 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6881
6882 * elf32-m68hc11.c: Formatting fixes.
6883 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6884 * elf32-m68hc12.c: Formatting fixes.
6885 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6886
6887 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6888
6889 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6890 SEC_DATA.
6891 (pmac_xcoff_vec): Likewise.
6892 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6893 (aix5coff64_vec): Likewise.
6894
6895 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6896
6897 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6898 param to elf_backend_copy_indirect_symbol.
6899 (_bfd_elf_link_hash_copy_indirect): Likewise.
6900 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6901 calls to copy_indirect_symbol.
6902 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6903 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6904 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6905 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6906 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6907 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6908 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6909 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6910 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6911 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6912 test refcounts for "used" values.
6913
6914 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6915
6916 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6917 argument declaration.
6918
6919 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6920
6921 * archures.c (bfd_mach_ppc_e500): Added.
6922 * bfd-in2.h: Rebuilt.
6923 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6924
6925 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6926
6927 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6928
6929 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6930
6931 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6932 `bfd_byte'.
6933
6934 2002-08-17 Stan Cox <scox@redhat.com>
6935
6936 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6937 IRIX 6 segment layout for NEWABI.
6938
6939 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6940
6941 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6942 symbols when looking for section referred to by a relocation.
6943 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6944
6945 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6946
6947 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6948
6949 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6950
6951 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6952 missing check for whether the symbol is referenced by DSO before
6953 unexporting it as an unneeded dynamic symbol.
6954
6955 2002-08-14 H.J. Lu <hjl@gnu.org>
6956
6957 * libbfd.h: Regenerate.
6958
6959 2002-08-14 H.J. Lu <hjl@gnu.org>
6960
6961 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6962
6963 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6964
6965 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6966 instructions.
6967 (m68hc11_direct_relax): New to define table of relaxable instructions.
6968 (find_relaxable_insn): New, find a relaxable insn.
6969 (compare_reloc): New to compare two relocs.
6970 (m68hc11_elf_relax_section): New, relax text sections.
6971 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6972 (elf32_m68hc11_check_relocs): New function for GC support.
6973 (elf32_m68hc11_relocate_section): New function for GC support.
6974 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6975 (elf_backend_check_relocs): Likewise.
6976 (elf_backend_relocate_section): Likewise.
6977
6978 2002-08-13 H.J. Lu <hjl@gnu.org>
6979
6980 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6981 definitions in shared objects when checking symbol with
6982 undefined version.
6983
6984 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6985
6986 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6987 (elf32_m68hc11_gc_sweep_hook): Likewise.
6988 (elf_backend_gc_mark_hook): Define for GC section support.
6989 (elf_backend_gc_sweep_hook): Likewise.
6990 (elf_backend_can_gc_sections): Likewise.
6991
6992 * elf32-m68hc12.c: Likewise.
6993
6994 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6995
6996 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6997 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6998 (_bfd_m68hc11_elf_set_private_flags): New function.
6999 Use them to set/check/print ELF flags specific to 68HC11.
7000
7001 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
7002 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
7003 (_bfd_m68hc12_elf_set_private_flags): New function.
7004 Use them to set/check/print ELF flags specific to 68HC12.
7005
7006 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
7007
7008 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
7009 fix masks for PC-rel relocs.
7010 (m68hc11_elf_ignore_reloc): New function.
7011
7012 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
7013 68HC12 banked addressing relocs.
7014 (m68hc12_phys_addr): New to compute physical address of banked memory.
7015 (m68hc12_phys_page): Likewise for page.
7016 (m68hc12_addr_is_banked): New to see if address is in banked area.
7017 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
7018
7019 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
7020
7021 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
7022 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
7023 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
7024 * bfd-in2.h: Regenerate.
7025
7026 2002-08-12 H.J. Lu <hjl@gnu.org>
7027
7028 * elflink.h (elf_add_default_symbol): Preserve section across
7029 elf_merge_symbol.
7030
7031 2002-08-09 Graeme Peterson <gp@qnx.com>
7032
7033 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
7034 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
7035 * Makefile.in: Regenerate.
7036 * config.bfd: Add support for powerpc{le}-*-nto targets.
7037 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
7038 * configure: Regenerate.
7039 * elf32-i386qnx.c: Moved backend functions into a QNX specific
7040 common file "elf32-qnx.h", and now include that file.
7041 * elf32-qnx.h: New file: QNX specific common elf backend.
7042 * elf32-ppc.c: Do not include elf32-target.h if
7043 ELF32_PPC_C_INCLUDED is defined.
7044 * elf32-ppcqnx.c: New file: Support for QNX.
7045 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
7046 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
7047
7048 2002-08-09 Nick Clifton <nickc@redhat.com>
7049
7050 * po/sv.po: Updated Swedish translation.
7051
7052 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7053
7054 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
7055 g->global_gotsym is NULL.
7056
7057 2002-08-08 H.J. Lu <hjl@gnu.org>
7058
7059 * elflink.h (elf_add_default_symbol): Don't warn if a definition
7060 overrides an indirect versioned symbol.
7061
7062 2002-08-08 Jakub Jelinek <jakub@redhat.com>
7063
7064 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
7065 for R_386_TLS_TPOFF32 relocs against symndx 0.
7066
7067 2002-08-07 H.J. Lu <hjl@gnu.org>
7068
7069 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
7070 with undefined version if needed.
7071 (elf_link_assign_sym_version): Match a default symbol with a
7072 version without definition. No need to hide the default
7073 definition separately.
7074
7075 2002-08-08 Alan Modra <amodra@bigpond.net.au>
7076
7077 * elflink.h (elf_link_output_extsym): Don't output symbols from
7078 SEC_EXCLUDE sections.
7079
7080 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
7081
7082 2002-08-07 Alan Modra <amodra@bigpond.net.au>
7083
7084 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
7085 entries.
7086
7087 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7088
7089 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
7090 mismatch.
7091
7092 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7093
7094 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
7095
7096 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7097
7098 * elf32-mips.c (mips_reloc_map): Fix typo.
7099
7100 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7101
7102 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
7103
7104 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7105
7106 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
7107
7108 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7109
7110 * libxcoff.h: Use PARAMS on function declarations.
7111 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
7112 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7113
7114 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
7115 addend.
7116 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
7117
7118 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7119
7120 * coff-rs6000.c: Formatting fixes.
7121 (xcoff_calculate_relocation): Use PARAMS in declaration.
7122 (xcoff_complain_overflow): Likewise.
7123 (xcoff_ppc_relocate_section): Use old-style function pointer call.
7124 (bfd_xcoff_backend_data): Remove useless comments.
7125 (rs6000coff_vec): Likewise.
7126 (bfd_pmac_xcoff_backend_data): Likewise.
7127 (pmac_xcoff_vec): Likewise.
7128
7129 * coff64-rs6000.c: Formatting fixes.
7130 (xcoff64_calculate_relocation): Use PARAMS in declaration.
7131 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
7132 (bfd_xcoff_backend_data): Remove useless comments.
7133 (rs6000coff64_vec): Likewise.
7134 (bfd_xcoff_aix5_backend_data): Likewise.
7135 (aix5coff64_vec): Likewise.
7136
7137 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7138
7139 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
7140 mask entries. Use complain_overflow_dont for R_REF.
7141 (xcoff_reloc_type_ba): Revert last change.
7142 (xcoff_reloc_type_br): Likewise.
7143 (xcoff_reloc_type_crel): Likewise.
7144 (xcoff_ppc_relocate_section): Likewise.
7145 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
7146 (xcoff64_ppc_relocate_section): Likewise.
7147 (xcoff64_howto_table): Revert some of last change to mask entries.
7148 Use complain_overflow_dont for R_REF.
7149
7150 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
7151 relocs with bitsize == 16 have size = 1.
7152 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
7153 (xcoff_reloc_type_br): Likewise.
7154 (xcoff_reloc_type_crel): Likewise.
7155 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7156 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
7157 dst_mask adjustment.
7158 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7159 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
7160 bitsize == 16 have size = 1.
7161
7162 2002-08-01 Denis Chertykov <denisc@overta.ru>
7163
7164 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
7165 (struct misc): New field isymbuf. All free_* fields removed.
7166 (symbol_value): Pass in internal syms. No need to swap syms in.
7167 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
7168 possibly cached info.
7169 (tidyup_after_error): Removed.
7170 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7171 misc. Use new field.
7172 (adjust_all_relocations): Use internal syms. No need to swap syms
7173 in and out.
7174 (add_page_insn): Don't use removed fields of struct misc.
7175
7176 2002-08-01 Nick Clifton <nickc@redhat.com>
7177
7178 * elf32-arm.h: Revert previous delta.
7179
7180 2002-08-01 Nick Clifton <nickc@redhat.com>
7181
7182 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7183 * configure: Regenerate.
7184
7185 2002-07-31 H.J. Lu <hjl@gnu.org>
7186
7187 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7188 selected.
7189
7190 2002-07-31 H.J. Lu <hjl@gnu.org>
7191
7192 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7193 is selected.
7194
7195 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7196
7197 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7198 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7199
7200 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7201
7202 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7203 There is no 8 byte relocation type for this architecture.
7204 (do_ns32k_reloc): Use bfd_vma instead of native types.
7205 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7206 returns void.
7207 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7208 rely on generic code to do that.
7209 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7210 to all table entries.
7211 (_bfd_ns32k_relocate_contents): put_data returns void.
7212 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7213 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7214 return void.
7215
7216 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7217
7218 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7219 archive object is target dependant.
7220
7221 2002-07-31 Adam Nemet <anemet@lnxw.com>
7222
7223 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7224 (THUMB_PLT_ENTRY_SIZE): New macro.
7225 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7226 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7227 ARM_PLT_ENTRY_SIZE.
7228 (elf32_arm_plt_entry): Likewise.
7229 (elf_backend_plt_header_size): Likewise.
7230 (elf32_thumb_plt0_entry): New global.
7231 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7232 into .plt.thumb.
7233 (elf32_thumb_plt_entry): New global.
7234 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7235 Thumb entries. Set the bottom bit of the corresponding GOT entry
7236 for a Thumb PLT entry.
7237 (struct elf32_arm_plt_entry_info): New structure.
7238 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7239 type.
7240 (elf32_arm_link_hash_newfunc): Initialize new member.
7241 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7242 relocations against the PLT.
7243 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7244 first_rel_type if this is the first time we encounter the symbol.
7245 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7246 Determine if relocation needs a PLT entry. Set first_rel_type if
7247 this is the first time we encounter the symbol
7248 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7249 functions as well.
7250 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7251 (elf32_arm_create_dynamic_sections): New function. Create the
7252 .plt.thumb section.
7253 (elf_backend_create_dynamic_sections): Call it.
7254
7255 2002-07-31 Nick Clifton <nickc@redhat.com>
7256
7257 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7258 'alternative' in order to avoid shadowing global symbol of the
7259 same name.
7260 * bfd-in2.h: Regenerate.
7261 * libbfd.h: Regenerate.
7262 * libcoff.h: Regenerate.
7263
7264 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7265
7266 * Makefile.am: Add n32 ABI support.
7267 * Makefile.in: Regenerate.
7268 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7269 bit vectors for mips*-*-linux targets as optional.
7270 * configure.in: Add n32 ABI vectors.
7271 * configure: Regenerate.
7272 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7273 * elfn32-mips.c: New file, n32 ABI support.
7274 * targets.c: Add n32 ABI vectors.
7275
7276 2002-07-30 Graeme Peterson <gp@qnx.com>
7277
7278 * elfarmqnx-nabi.c: New file: Support for QNX.
7279 * config.bfd: Add support for arm-*-nto target.
7280 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7281 * configure: Regenerate.
7282 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7283 * Makefile.in: Regenerate.
7284 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7285 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7286 * elfarm-nabi.c: Do not include elf32-arm.h if
7287 ELFARM_NABI_C_INCLUDED is defined.
7288 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7289
7290 2002-07-30 Nick Clifton <nickc@redhat.com>
7291
7292 * po/sv.po: Updated Swedish translation.
7293
7294 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7295
7296 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7297
7298 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7299
7300 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7301 * archive.c (bfd_generic_archive_p): Likewise.
7302 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7303 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7304 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7305 (xcoff64_archive_p): Likewise.
7306 (xcoff64_openr_next_archived_file): Likewise.
7307 (xcoff64_archive_p): Clean up tdata properly on error.
7308 * coffgen.c (coff_real_object_p): Likewise.
7309 (coff_object_p): Release filehdr and opthdr.
7310 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7311 * ieee.c (ieee_archive_p): Likewise.
7312 * ihex.c (ihex_object_p): Likewise.
7313 (ihex_mkobject): Always allocate tdata.
7314 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7315 * srec.c (srec_mkobject): Always allocate tdata.
7316 (srec_object_p): Clean up tdata properly on error.
7317 (symbolsrec_object_p): Likewise.
7318 * versados.c (versados_object_p): Likewise.
7319 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7320 and bfd_realloc instead of realloc.
7321 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7322 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7323 place of bfd_malloc, simplifying error freeing. Free hash table too.
7324 (vms_object_p): Clean up tdata on error.
7325 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7326 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7327
7328 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7329
7330 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7331
7332 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7333
7334 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7335 flags into resulting BFD.
7336
7337 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7338
7339 From John Reiser <jreiser@BitWagon.com>
7340 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7341 tls_ldm_got.refcount.
7342
7343 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7344
7345 * elf64-mips.c: Update TODO comment.
7346 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7347 mips_elf64_gprel16_reloca): Remove prototypes.
7348 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7349 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7350 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7351 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7352 R_MIPS_HIGHEST.
7353 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7354 R_MIPS_GOT16. Remove wrong comments.
7355 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7356 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7357 from elf32-mips.c.
7358 (mips_elf64_hi16_reloc): Fix formatting.
7359 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7360 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7361 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7362 (mips_elf64_gprel16_reloc): Make static. Add check for
7363 partial_inplace.
7364 (mips_elf64_gprel16_reloca): Remove.
7365 (mips_elf64_literal_reloc): New function.
7366 (mips_elf64_gprel32_reloc): Fix formatting.
7367 (mips_elf64_shift6_reloc): Fix comment. Make static.
7368 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7369 elf32-mips.c.
7370 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7371 elf32-mips.c
7372 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7373 specific relocations.
7374 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7375 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7376 (ELF_MAXPAGESIZE): Add comment.
7377
7378 2002-07-25 Nick Clifton <nickc@redhat.com>
7379
7380 * po/sv.po: Updated Swedish translation.
7381 * po/es.po: Updated Spanish translation.
7382 * po/fr.po: Updated French translation.
7383
7384 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7385
7386 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7387 as elf_link_record_local_dynamic_symbol.
7388 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7389 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7390 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7391 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7392 attempt is made to record a symbol in a discarded section, and
7393 return `2' in that case.
7394
7395 2002-07-24 Nick Clifton <nickc@redhat.com>
7396
7397 * po/sv.po: Updated Swedish translation.
7398 * po/es.po: Updated Spanish translation.
7399
7400 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7401
7402 * po/SRC-POTFILES.in: Regenerate.
7403
7404 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7405 immediately. Remove code handling relocatable linking.
7406 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7407 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7408 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7409 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7410 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7411 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7412 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7413 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7414 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7415 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7416 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7417 * elf32-avr.c (elf_backend_rela_normal): Define.
7418 * elf32-cris.c: Likewise.
7419 * elf32-fr30.c: Likewise.
7420 * elf32-frv.c: Likewise.
7421 * elf32-h8300.c: Likewise.
7422 * elf32-hppa.c: Likewise.
7423 * elf32-ip2k.c: Likewise.
7424 * elf32-sparc.c: Likewise.
7425 * elf32-v850.c: Likewise.
7426 * elf32-vax.c: Likewise.
7427 * elf64-hppa.c: Likewise.
7428 * elf64-sparc.c: Likewise.
7429 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7430 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7431 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7432 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7433 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7434 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7435 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7436 * elf-m10200.c (USE_RELA): Don't define.
7437 * elf-m10300.c: Likewise.
7438 * elfarm-oabi.c: Likewise.
7439 * elf32-i370.c: Likewise.
7440 * elf32-ip2k.c: Likewise.
7441 * elf32-m68k.c: Likewise.
7442 * elf32-mcore.c: Likewise.
7443 * elf32-ppc.c: Likewise.
7444 * elf32-s390.c: Likewise.
7445 * elf32-vax.c: Likewise.
7446 * elf64-ppc.c: Likewise.
7447 * elf64-s390.c: Likewise.
7448 * elf64-x86-64.c: Likewise.
7449 * elfxx-ia64.c: Likewise.
7450 * elf32-avr.c (USE_REL): Don't undef.
7451 * elf32-ip2k.c: Likewise.
7452
7453 2002-07-23 Nick Clifton <nickc@redhat.com>
7454
7455 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7456 'want_p_paddr_set_to_zero'.
7457 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7458 to false;
7459 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7460 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7461
7462 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7463
7464 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7465 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7466 show the Copyright string.
7467 Minor formatting tidy ups.
7468
7469 2002-07-23 Nick Clifton <nickc@redhat.com>
7470
7471 * po/fr.po: Updated French translation.
7472 * po/sv.po: Updated Swedish translation.
7473
7474 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7475
7476 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7477 when outputting relocs.
7478
7479 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7480
7481 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7482 DT_PLTGOT into the dynamic section if there is a PLT.
7483
7484 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7485
7486 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7487 elf32-mips.c.
7488 (_bfd_mips_elf_write_section): Likewise.
7489 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7490 (_bfd_mips_elf_write_section): Likewise.
7491 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7492 (elf32_mips_write_section): Likewise.
7493 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7494 (_bfd_mips_elf_write_section): Likewise.
7495
7496 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7497
7498 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7499 PT_IA_64_UNWIND segments for a given section.
7500
7501 2002-07-17 H.J. Lu <hjl@gnu.org>
7502
7503 * Makefile.am: Fix a typo.
7504 * Makefile.in: Regenerate.
7505
7506 2002-07-15 Denis Chertykov <denisc@overta.ru>
7507 Frank Ch. Eigler <fche@redhat.com>
7508 Ben Elliston <bje@redhat.com>
7509 Alan Lehotsky <alehotsky@cygnus.com>
7510 John Healy <jhealy@redhat.com>
7511 Graham Stott <grahams@redhat.com>
7512 Jeff Johnston <jjohnstn@redhat.com>
7513
7514 * Makefile.am: Add support for ip2k.
7515 * Makefile.in: Regenerate.
7516 * doc/Makefile.in: Regenerate.
7517 * archures.c: Add support for ip2k.
7518 * config.bfd: Add support for ip2k.
7519 * configure.in: Add support for ip2k.
7520 * configure: Regenerate.
7521 * reloc.c: Add support for ip2k.
7522 * targets.c: Add support for ip2k.
7523 * bfd-in2.h: Regenerate.
7524 * libbfd.h: Regenerate.
7525 * cpu-ip2k.c: New file.
7526 * elf32-ip2k.c: New file.
7527
7528 2002-07-17 Ian Rickards <irickard@arm.com>
7529
7530 * dwarf2.c (concat_filename): If we can't establish the directory
7531 just return the filename.
7532
7533 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7534
7535 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7536
7537 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7538
7539 * elflink.h: Formatting fixes, tidy prototypes.
7540 (elf_link_assign_sym_version): Move common code out of loop.
7541
7542 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7543
7544 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7545 reloc section size is zero. Correct reloc output location.
7546
7547 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7548
7549 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7550 the final type for the e_fsel selector when generating PA2.0W code.
7551 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7552 relocations.
7553
7554 2002-07-14 H.J. Lu <hjl@gnu.org>
7555
7556 * elflink.h (elf_link_assign_sym_version): Hide the default
7557 definition if there is a hidden versioned definition.
7558
7559 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7560
7561 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7562 dynamic reference test in assertion when initializing GOT with
7563 static contents. Just assert that there are either no dynamic
7564 sections, the symbol is defined in the regular objects or that the
7565 symbol is undef weak. Tweak comment.
7566 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7567 only if the symbol isn't defined in the program and isn't undef
7568 weak.
7569 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7570 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7571 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7572 (elf_cris_discard_excess_program_dynamics): Don't consider
7573 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7574
7575 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7576
7577 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7578 unresolved debugging relocs in dynamic applications.
7579 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7580 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7581 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7582 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7583 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7584 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7585
7586 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7587
7588 * elf64-ppc.c (ONES): Define.
7589 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7590 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7591 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7592
7593 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7594 (ppc64_elf_set_private_flags): Delete.
7595 (ppc64_elf_section_from_shdr): Delete.
7596 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7597 (ppc64_elf_fake_sections): Delete.
7598 (bfd_elf64_bfd_set_private_flags): Don't define.
7599 (bfd_elf64_get_symbol_info): Likewise.
7600 (elf_backend_section_from_shdr): Likewise.
7601 (elf_backend_fake_sections): Likewise.
7602
7603 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7604
7605 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7606 when not already set.
7607 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7608 (elf_backend_fake_sections): Define.
7609
7610 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7611
7612 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7613 Formatting.
7614 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7615
7616 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7617
7618 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7619 NULL sym_hashes to just before use.
7620 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7621 symbol with non-default visibility.
7622 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7623 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7624 Ditto.
7625 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7626 symbol with non-default visibility.
7627 (cris_elf_check_relocs): At tests for local symbol before
7628 increasing h->plt.refcount, also check for non-default
7629 visibility. Ditto when checking for local symbol to eliminate
7630 pc-relative runtime relocs.
7631
7632 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7633
7634 * elf.c: Formatting.
7635 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7636 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7637 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7638 segments.
7639
7640 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7641 Alan Modra <amodra@bigpond.net.au>
7642
7643 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7644 account the impact of relocation count overflow when computing
7645 section offsets.
7646 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7647 or not to apply the PE COFF reloc overflow handling. Fix a
7648 fencepost error in deciding whether or not to use that technique.
7649
7650 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7651
7652 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7653 change type of locsyms.
7654 (bfd_elf_get_elf_syms): Declare.
7655 * elf.c (bfd_elf_get_elf_syms): New function.
7656 (group_signature): Use bfd_elf_get_elf_syms.
7657 (bfd_section_from_r_symndx): Likewise.
7658 * elfcode.h (elf_slurp_symbol_table): Likewise.
7659 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7660 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7661 locality of various data structures. Properly free internal relocs.
7662 (elf_bfd_final_link): Properly free internal relocs.
7663 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7664 (elf_link_input_bfd): Likewise.
7665 (elf_gc_mark): Likewise. Properly free internal relocs.
7666 (elf_gc_sweep): Properly free internal relocs.
7667 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7668 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7669 internal relocs.
7670 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7671 Properly free possibly cached info.
7672 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7673 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7674 symbol swapping code.
7675 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7676 Properly free possibly cached info.
7677 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7678 (mn10300_elf_relax_delete_bytes): Likewise.
7679 (mn10300_elf_symbol_address_p): Likewise.
7680 (mn10300_elf_get_relocated_section_contents): Likewise.
7681 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7682 (elf32_h8_relax_delete_bytes): Likewise.
7683 (elf32_h8_symbol_address_p): Likewise.
7684 (elf32_h8_get_relocated_section_contents): Likewise.
7685 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7686 (m32r_elf_relax_delete_bytes): Likewise.
7687 (m32r_elf_get_relocated_section_contents): Likewise.
7688 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7689 elf_section_data to determine whether cached.
7690 (sh_elf_relax_section): As above for elf-m10200.c.
7691 (sh_elf_relax_delete_bytes): Likewise.
7692 (sh_elf_get_relocated_section_contents): Likewise.
7693 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7694 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7695 reading of local syms.
7696 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7697 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7698 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7699 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7700 relocs.
7701 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7702 free internal relocs and section contents. Don't read symbols.
7703 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7704 (elf32_hppa_size_stubs): Don't free local syms.
7705 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7706 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7707 possibly cached info.
7708 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7709 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7710 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7711 all_local_syms.
7712 (get_local_syms): Delete function.
7713 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7714 on exit.
7715 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7716
7717 2002-07-05 Jim Wilson <wilson@redhat.com>
7718
7719 * syms.c (decode_section_type): New.
7720 (bfd_decode_symclass): Call decode_section_type.
7721
7722 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7723
7724 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7725 section content start.
7726 Reported by Michael Schumacher <mike@hightec-rt.com>.
7727
7728 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7729
7730 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7731 link order code. Don't actually remove the output section here;
7732 Just set a flag for the linker to do so.
7733 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7734 sections when setting up output section dynsyms.
7735
7736 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7737
7738 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7739 fudge.
7740 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7741 libs here instead.
7742
7743 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7744
7745 * elf64-s390.c (create_got_section): Set .got section alignment to
7746 8 bytes.
7747 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7748
7749 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7750
7751 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7752
7753 2002-07-01 Matt Thomas <matt@3am-software.com>
7754
7755 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7756 to EF_VAX_*.
7757
7758 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7759
7760 * elfxx-mips.c (ABI_64_P): Fix comment.
7761 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7762 new section names for N64 ABI.
7763 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7764 (mips_elf_calculate_relocation): Code formatting.
7765 (mips_elf_create_dynamic_relocation): Likewise.
7766 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7767 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7768 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7769 in any NewABI.
7770 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7771 for NewABI.
7772 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7773 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7774 here, too.
7775
7776 2002-07-01 Andreas Schwab <schwab@suse.de>
7777
7778 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7779 R_X86_64_64 to R_X86_64_RELATIVE.
7780
7781 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7782
7783 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7784 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7785 Run "make dep-am".
7786 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7787 host_aout_vec.
7788 * configure.in (vaxbsd_vec): Add.
7789 * targets.c (vaxbsd_vec): Add.
7790 * Makefile.in: Rebuild.
7791 * configure: Rebuild.
7792 * po/SRC-POTFILES.in: Rebuild.
7793
7794 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7795
7796 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7797 examining to gc_mark_hook, rather than the bfd.
7798 (elf_gc_sections): Adjust.
7799 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7800 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7801 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7802 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7803 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7804 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7805 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7806 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7807 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7808 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7809 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7810 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7811 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7812 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7813 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7814 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7815 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7816 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7817 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7818 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7819 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7820 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7821 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7822 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7823 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7824 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7825 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7826 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7827 redundant local sym tests.
7828 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7829 (link_hash_newfunc): Init is_entry.
7830 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7831 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7832 (create_linkage_sections): Use bfd_make_section_anyway rather than
7833 bfd_make_section.
7834 (ppc64_elf_mark_entry_syms): New function.
7835 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7836 up opd entry to function section map.
7837 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7838 relocs that reference the opd section.
7839 (edit_opd): New function.
7840 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7841 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7842 (get_local_syms): Do so here. Exit if we already have local syms.
7843 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7844 read local syms on non-ELF input.
7845 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7846 than duplicating it's function here. Adjust free of internal
7847 relocs to suit.
7848 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7849 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7850 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7851 _bfd_elf32_link_read_relocs rather than duplicating it's function
7852 here. Adjust free of internal relocs to suit.
7853
7854 2002-07-01 Andreas Jaeger <aj@suse.de>
7855
7856 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7857 are not allowed in shared libs code, enforce -fPIC.
7858
7859 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7860
7861 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7862 trailing zero-sequences when there's previous left-over data.
7863
7864 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7865
7866 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7867 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7868 and opd_rel_sec in order for starting rela section. Check _raw_size.
7869 (elf_backend_reloc_type_class): Define.
7870
7871 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7872
7873 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7874 DWARF2 formats.
7875
7876 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7877
7878 * cpu-powerpc.c: Comment on ordering of arch_info.
7879 * elf32-ppc.c (ppc_elf_object_p): New function.
7880 (elf_backend_object_p): Define.
7881 * elf64-ppc.c (ppc64_elf_object_p): New function.
7882 (elf_backend_object_p): Define.
7883
7884 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7885
7886 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7887 * configure: Regenerate.
7888
7889 2002-06-25 Jason Eckhardt <jle@rice.edu>
7890
7891 * dwarf2.c (decode_line_info): Check unit->addr_size
7892 to read in the proper number of prologue bytes.
7893
7894 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7895
7896 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7897 aix5coff64_vec if 64-bit bfd support has been enabled.
7898 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7899 been enabled.
7900
7901 * targets.c (_bfd_target_vector[]): Only include
7902 aix5coff64_vec if 64-bit bfd support has been enabled.
7903
7904 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7905
7906 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7907 * elf32-hppa.c (hppa_add_stub): Likewise.
7908 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7909 * elflink.h (elf_add_default_symbol): Fix comment typo.
7910 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7911 (elf_link_add_object_symbols): Likewise.
7912 (elf_link_assign_sym_version): Likewise.
7913 * hash.c (bfd_hash_lookup): Likewise.
7914 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7915 * section.c (bfd_get_unique_section_name): Likewise.
7916 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7917 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7918 (assign_section_numbers): Likewise.
7919 (_bfd_elfcore_make_pseudosection): Likewise.
7920 (elfcore_grok_lwpstatus): Likewise.
7921 (elfcore_grok_win32pstatus): Likewise.
7922 (elfcore_write_note): Constify input params. Use PTR instead of
7923 void *. Include terminating NUL in namesz. Correct padding.
7924 Support NULL "name" param. Use memcpy instead of strcpy.
7925 (elfcore_write_prpsinfo): Constify input params.
7926 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7927 (elfcore_write_lwpstatus): Likewise.
7928 (elfcore_write_pstatus): Likewise.
7929 (elfcore_write_prfpreg): Likewise.
7930 (elfcore_write_prxfpreg): Likewise.
7931 * elf-bfd.h (elfcore_write_note): Update declaration.
7932 (elfcore_write_prpsinfo): Likewise.
7933 (elfcore_write_prstatus): Likewise.
7934 (elfcore_write_pstatus): Likewise.
7935 (elfcore_write_prfpreg): Likewise.
7936 (elfcore_write_prxfpreg): Likewise.
7937 (elfcore_write_lwpstatus): Likewise.
7938
7939 2002-06-25 Jason Eckhardt <jle@rice.edu>
7940
7941 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7942 symbols of type stProc and stStaticProc.
7943
7944 2002-06-25 Nick Clifton <nickc@redhat.com>
7945
7946 * ecoff.c: VArious formatting fixes.
7947
7948 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7949
7950 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7951
7952 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7953
7954 * aout-adobe.c: Don't compare against "true" or "false.
7955 * aout-target.h: Likewise.
7956 * aoutx.h: Likewise.
7957 * archive.c: Likewise.
7958 * bout.c: Likewise.
7959 * cache.c: Likewise.
7960 * coff-a29k.c: Likewise.
7961 * coff-alpha.c: Likewise.
7962 * coff-i386.c: Likewise.
7963 * coff-mips.c: Likewise.
7964 * coff-or32.c: Likewise.
7965 * coff64-rs6000.c: Likewise.
7966 * coffcode.h: Likewise.
7967 * coffgen.c: Likewise.
7968 * cpu-ns32k.c: Likewise.
7969 * ecoff.c: Likewise.
7970 * ecofflink.c: Likewise.
7971 * elf.c: Likewise.
7972 * elf32-arm.h: Likewise.
7973 * elf32-cris.c: Likewise.
7974 * elf32-d30v.c: Likewise.
7975 * elf32-i386.c: Likewise.
7976 * elf32-mcore.c: Likewise.
7977 * elf32-ppc.c: Likewise.
7978 * elf32-sh.c: Likewise.
7979 * elf32-sh64.c: Likewise.
7980 * elf32-v850.c: Likewise.
7981 * elf64-alpha.c: Likewise.
7982 * elf64-sh64.c: Likewise.
7983 * elfcode.h: Likewise.
7984 * elfcore.h: Likewise.
7985 * elflink.h: Likewise.
7986 * elfxx-mips.c: Likewise.
7987 * i386os9k.c: Likewise.
7988 * ieee.c: Likewise.
7989 * libbfd.c: Likewise.
7990 * linker.c: Likewise.
7991 * mmo.c: Likewise.
7992 * nlm32-alpha.c: Likewise.
7993 * nlm32-i386.c: Likewise.
7994 * nlm32-ppc.c: Likewise.
7995 * nlm32-sparc.c: Likewise.
7996 * nlmcode.h: Likewise.
7997 * oasys.c: Likewise.
7998 * pdp11.c: Likewise.
7999 * peicode.h: Likewise.
8000 * reloc.c: Likewise.
8001 * som.c: Likewise.
8002 * srec.c: Likewise.
8003 * tekhex.c: Likewise.
8004 * vms.c: Likewise.
8005 * xcofflink.c: Likewise.
8006 * elf64-sparc.c: Edit comment to not use "== false".
8007
8008 * aoutf1.h: Don't use "? true : false".
8009 * ecoff.c: Likewise.
8010 * format.c: Likewise.
8011 * ieee.c: Likewise.
8012 * linker.c: Likewise.
8013 * mmo.c: Likewise.
8014 * oasys.c: Likewise.
8015
8016 2002-06-23 H.J. Lu <hjl@gnu.org>
8017
8018 * elflink.h (elf_link_add_archive_symbols): For the default
8019 version, check references with only one `@' first.
8020
8021 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
8022
8023 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
8024 function.
8025 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
8026 symbol table.
8027 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
8028 (elf64_hppa_size_dynamic_sections): Revise to use
8029 elf64_hppa_mark_milli_and_exported_functions.
8030 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
8031 symbols out of dynamic symbol table.
8032
8033 2002-06-23 Alan Modra <amodra@bigpond.net.au>
8034
8035 * Makefile.in: Regenerate.
8036 * libbfd.h: Regenerate.
8037 * bfd-in2.h: Regenerate.
8038 * configure: Regenerate.
8039 * po/SRC-POTFILES.in: Regenerate.
8040
8041 * elflink.h: Comment typo fixes.
8042
8043 2002-06-23 H.J. Lu <hjl@gnu.org>
8044
8045 * elf-bfd.h (elf_link_loaded_list): New structure.
8046 (elf_link_hash_table): Add "loaded".
8047 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
8048 * elflink.h (elf_link_check_versioned_symbol): New function.
8049 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
8050
8051 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
8052
8053 * elflink.h (size_dynamic_sections): If the target does not
8054 support an ELF style hash table, return true, indicating that
8055 nothing needed to be done, rather than false, indicating that the
8056 section's size could not be computed.
8057
8058 2002-06-18 Dave Brolley <brolley@redhat.com>
8059
8060 From Catherine Moore, Michael Meissner, Dave Brolley:
8061 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
8062 * targets.c: Support bfd_elf32_frv_vec.
8063 * reloc.c: Add FRV relocs.
8064 * configure.in: Add support for bfd-elf32-frv-vec.
8065 * config.bfd (targ_cpu): Add support for frv-*-elf.
8066 * archures.c: Add frv arch and machines.
8067 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
8068 (ALL_MACHINES_CFILES): Add cpu-frv.c.
8069 (BFD32_BACKENDS): Add elf32-frv.lo.
8070 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
8071 (cpu-frv.lo): New target.
8072 (elf32-frv.lo): New target.
8073 * cpu-frv.c: New file.
8074 * elf32-frv.c: New file.
8075
8076 2002-06-18 Jakub Jelinek <jakub@redhat.com>
8077
8078 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
8079 e_shnum == 0.
8080 Only read the first section header if e_shoff is non-zero.
8081 Don't consider e_shstrndx if there are no sections.
8082
8083 2002-06-17 Tom Rix <trix@redhat.com>
8084
8085 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
8086 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
8087 complain_overflow_bitfield.
8088
8089 2002-06-17 Alan Modra <amodra@bigpond.net.au>
8090
8091 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
8092 (bfd_fdopenr): Likewise.
8093 (bfd_openstreamr): Likewise.
8094 (bfd_openw): Likewise.
8095
8096 * targets.c: Sort target vecs.
8097 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
8098 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
8099 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
8100 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
8101 * configure.in: Sort target vecs. Add m88kmach3_vec.
8102 * configure: Regenerate.
8103
8104 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
8105
8106 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
8107 bpo_reloc_no to break sort order ties, not address of items.
8108
8109 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
8110
8111 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
8112 Skip excluded sections in determing __gp value.
8113 (elf_hppa_final_link_relocate): Use the symbol's address in
8114 R_PARISC_FPTR64 relocations that don't need an opd entry.
8115 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
8116 (elf64_hppa_finalize_dynreloc): Likewise.
8117 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
8118 (elf64_hppa_finish_dynamic_symbol): Break up assert.
8119
8120 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
8121
8122 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
8123 alignment for .bss, .data and .text sections so that sse and sse2
8124 code will work.
8125 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8126
8127 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
8128
8129 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
8130 sh[1234]*-elf*.
8131
8132 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8133
8134 * elflink.h (elf_bfd_final_link): Improve error handling for missing
8135 dynamic sections.
8136
8137 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
8138 for a symbol that has no output section.
8139 (allocate_dynrel_entries): Correct comment.
8140 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
8141 unless we want one.
8142 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
8143 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
8144 with no section. Remove unnecessary parentheses.
8145
8146 2002-06-11 Tom Rix <trix@redhat.com>
8147
8148 * coffcode.h (coff_compute_section_file_positions): Add data
8149 section to AIX loader alignment check.
8150
8151 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
8152 alignment to 4 bytes.
8153 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
8154 power accessor macro.
8155 (do_shared_object_padding): Remove invalid assertion.
8156
8157 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
8158
8159 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
8160 for removed output sections.
8161
8162 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
8163
8164 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
8165 htab_alloc.
8166 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
8167
8168 2002-06-08 H.J. Lu <hjl@gnu.org>
8169
8170 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8171 work around a long long bug in gcc 2.96 on mips.
8172
8173 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8174
8175 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8176 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8177 Regenerate dependency lists.
8178 * Makefile.in: Regenerate.
8179 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8180 vax1knetbsd_vec to targ_selvecs.
8181 * configure.in: Add vax1knetbsd_vec.
8182 * configure: Regenerate.
8183 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8184 * vax1knetbsd.c: New file.
8185 * vaxnetbsd.c: Update copyright years.
8186 (TARGET_PAGE_SIZE): Set to 0x1000.
8187 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8188
8189 2002-06-08 Matt Thomas <matt@3am-software.com>
8190
8191 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8192
8193 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8194
8195 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8196
8197 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8198
8199 * Makefile.am: Run "make dep-am".
8200 * Makefile.in: Regenerate.
8201
8202 * armnetbsd.c: Replace CONST with const.
8203 * corefile.c: Likewise.
8204 * elf32-dlx.c: Likewise.
8205 * elf64-mips.c: Likewise.
8206 * mmo.c: Likewise.
8207 * ns32knetbsd.c: Likewise.
8208
8209 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8210 table is elf64-sparc.
8211
8212 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8213
8214 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8215 Fix RELA addends to get not shifted in the result. Don't do special
8216 handling of R_MIPS_64 for NewABI.
8217
8218 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8219
8220 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8221 (NAME(aout,slurp_reloc_table)): Likewise.
8222 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8223 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8224 (xcoff_write_archive_contents_big): Likewise.
8225 (xcoff_generate_rtinit): Likewise.
8226 (xcoff_generate_rtinit): Likewise, and check error return.
8227 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8228 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8229 (coff_get_normalized_symtab): Likewise.
8230 (coff_make_empty_symbol): Likewise.
8231 (bfd_coff_set_symbol_class): Likewise.
8232 * cofflink.c (coff_link_add_symbols): Likewise.
8233 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8234 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8235 (bfd_ecoff_write_accumulated_debug): Likewise.
8236 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8237 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8238 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8239 * ieee.c (do_with_relocs): Use bfd_zalloc.
8240 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8241 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8242 (NAME(aout,slurp_reloc_table)): Likewise.
8243 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8244 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8245 * som.c (som_build_and_write_symbol_table): Likewise.
8246 (som_slurp_string_table): Likewise.
8247 (som_slurp_symbol_table): Likewise.
8248 (som_bfd_ar_write_symbol_stuff): Likewise.
8249 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8250 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8251 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8252 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8253 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8254
8255 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8256
8257 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8258 "group" union.
8259 (elf_group_name): Update.
8260 (elf_group_id): Define.
8261 (bfd_elf_set_group_contents): Declare.
8262 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8263 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8264 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8265 that sym for the signature.
8266 (_bfd_elf_compute_section_file_positions): Don't call
8267 set_group_contents for "ld -r" case.
8268 (swap_out_syms): Use bfd_zalloc.
8269 * elflink.h (elf_link_add_archive_symbols): Likewise.
8270 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8271 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8272
8273 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8274
8275 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8276 relocs in opd for non-shared too.
8277
8278 2002-06-06 Jeffrey Law <law@redhat.com>
8279
8280 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8281 relocations.
8282
8283 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8284
8285 * merge.c: Include libiberty.h.
8286 * elf-strtab.c: Include libiberty.h.
8287
8288 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8289
8290 * peXXigen.c (pe_print_idata): Remove unused variable.
8291
8292 2002-06-06 David Heine <dlheine@tensilica.com>
8293
8294 * elf.c (assign_file_positions_for_segments): Remove unallocated
8295 sections from the section to segment mapping for PT_LOAD segments.
8296 Update comment about empty loadable segments.
8297
8298 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8299
8300 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8301 is within the .stabstr section.
8302
8303 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8304
8305 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8306 are "const PTR", not "const PTR *".
8307 (bfd_elf32_swap_symbol_in): Likewise.
8308 (bfd_elf64_swap_symbol_in): Likewise.
8309 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8310 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8311 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8312 (elf_link_add_object_symbols): Likewise.
8313 (elf_link_record_local_dynamic_symbol): Likewise.
8314 (elf_link_input_bfd): Likewise.
8315 (elf_gc_mark): Likewise.
8316 (elf_reloc_symbol_deleted_p): Likewise.
8317 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8318 (mn10200_elf_relax_delete_bytes): Likewise.
8319 (mn10200_elf_symbol_address_p): Likewise.
8320 (mn10200_elf_get_relocated_section_contents): Likewise.
8321 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8322 (mn10300_elf_relax_section): Likewise.
8323 (mn10300_elf_relax_delete_bytes): Likewise.
8324 (mn10300_elf_symbol_address_p): Likewise.
8325 (mn10300_elf_get_relocated_section_contents): Likewise.
8326 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8327 (elf32_h8_relax_delete_bytes): Likewise.
8328 (elf32_h8_symbol_address_p): Likewise.
8329 (elf32_h8_get_relocated_section_contents): Likewise.
8330 * elf32-hppa.c (get_local_syms): Likewise.
8331 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8332 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8333 * elf32-sh.c (sh_elf_relax_section): Likewise.
8334 (sh_elf_relax_delete_bytes): Likewise.
8335 (sh_elf_get_relocated_section_contents): Likewise.
8336 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8337 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8338 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8339 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8340 * elf64-ppc.c (get_local_syms): Likewise.
8341 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8342 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8343
8344 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8345
8346 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8347
8348 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8349
8350 * elf.c (group_signature): Swap in the whole symbol, and handle
8351 extracting section symbol names.
8352 (setup_group): Add comment.
8353 (set_group_contents): When called from objcopy or ld, arrange for
8354 section contents to be written. Write group member output section
8355 indices to allow objcopy to reorganize sections.
8356 (_bfd_elf_copy_private_section_data): Copy group info.
8357
8358 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8359 (bfd_elf32_swap_symbol_in): Update prototype.
8360 (bfd_elf64_swap_symbol_in): Likewise.
8361 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8362 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8363 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8364 (elf_link_add_object_symbols): Likewise.
8365 (elf_link_record_local_dynamic_symbol): Likewise.
8366 (elf_link_input_bfd): Likewise.
8367 (elf_gc_mark): Likewise.
8368 (elf_reloc_symbol_deleted_p): Likewise.
8369 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8370 (mn10200_elf_relax_delete_bytes): Likewise.
8371 (mn10200_elf_symbol_address_p): Likewise.
8372 (mn10200_elf_get_relocated_section_contents): Likewise.
8373 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8374 (mn10300_elf_relax_section): Likewise.
8375 (mn10300_elf_relax_delete_bytes): Likewise.
8376 (mn10300_elf_symbol_address_p): Likewise.
8377 (mn10300_elf_get_relocated_section_contents): Likewise.
8378 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8379 (elf32_h8_relax_delete_bytes): Likewise.
8380 (elf32_h8_symbol_address_p): Likewise.
8381 (elf32_h8_get_relocated_section_contents): Likewise.
8382 * elf32-hppa.c (get_local_syms): Likewise.
8383 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8384 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8385 * elf32-sh.c (sh_elf_relax_section): Likewise.
8386 (sh_elf_relax_delete_bytes): Likewise.
8387 (sh_elf_get_relocated_section_contents): Likewise.
8388 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8389 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8390 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8391 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8392 * elf64-ppc.c (get_local_syms): Likewise.
8393 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8394 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8395 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8396 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8397 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8398 * elf64-mips.c (mips_elf64_size_info): Likewise.
8399 * elf64-s390.c (s390_elf64_size_info): Likewise.
8400 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8401
8402 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8403
8404 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8405 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8406 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8407 _bfd_mips_elf_ignore_discarded_relocs.
8408 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8409
8410 2002-06-05 H.J. Lu <hjl@gnu.org>
8411
8412 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8413 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8414 the SEC_MERGE section.
8415
8416 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8417
8418 * coff-alpha.c: Update copyright date.
8419 * coff-mips.c: Likewise.
8420 * xcoff-target.h: Likewise.
8421
8422 * bfd-in.h: Remove "taken from the source" comment.
8423 * libbfd-in.h: Likewise.
8424 * libcoff-in.h: Likewise.
8425 * bfd-in2.h: Regenerate.
8426 * libbfd.h: Regenerate.
8427 * libcoff.h: Regenerate.
8428
8429 * elf.c (bfd_elf_discard_group): Return true.
8430 * elf-bfd.h (bfd_elf_discard_group): Declare.
8431 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8432 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8433 * bfd.c (bfd_discard_group): Define.
8434 * targets.c (struct bfd_target): Add _bfd_discard_group.
8435 (BFD_JUMP_TABLE_LINK): Here too.
8436 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8437 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8438 * aout-target.h (MY_bfd_discard_group): Define.
8439 * aout-tic30.c (MY_bfd_discard_group): Define.
8440 * binary.c (binary_bfd_discard_group): Define.
8441 * bout.c (b_out_bfd_discard_group): Define.
8442 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8443 * coffcode.h (coff_bfd_discard_group): Define.
8444 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8445 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8446 * i386msdos.c (msdos_bfd_discard_group): Define.
8447 * i386os9k.c (os9k_bfd_discard_group): Define.
8448 * ieee.c (ieee_bfd_discard_group): Define.
8449 * ihex.c (ihex_bfd_discard_group): Define.
8450 * mmo.c (mmo_bfd_discard_group): Define.
8451 * nlm-target.h (nlm_bfd_discard_group): Define.
8452 * oasys.c (oasys_bfd_discard_group): Define.
8453 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8454 * som.c (som_bfd_discard_group): Define.
8455 * srec.c (srec_bfd_discard_group): Define.
8456 * tekhex.c (tekhex_bfd_discard_group): Define.
8457 * versados.c (versados_bfd_discard_group): Define.
8458 * vms.c (vms_bfd_discard_group): Define.
8459 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8460 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8461 (aix5coff64_vec): Likewise.
8462 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8463
8464 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8465
8466 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8467 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8468 (elf32-sh64-com.lo): New dependency list.
8469 * Makefile.in: Regenerate.
8470 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8471 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8472 elf32-sh64-com.lo.
8473 * configure: Regenerate.
8474 * elf32-sh64.c (sh64_address_in_cranges)
8475 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8476 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8477 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8478 * elf32-sh64-com.c: ...here. New file.
8479
8480 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8481
8482 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8483 ATTRIBUTE_UNUSED on used params.
8484 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8485 before calling bfd_section_from_elf_index on local syms.
8486 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8487
8488 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8489
8490 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8491 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8492 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8493 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8494 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8495 * Makefile.in: Regenerate.
8496 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8497 (sh64-*-netbsd*): New targets.
8498 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8499 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8500 * configure: Regenerate.
8501 * elf32-sh64-nbsd.c: New file.
8502 * elf64-sh64-nbsd.c: New file.
8503 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8504 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8505 bfd_elf64_sh64lnbsd_vec.
8506
8507 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8508
8509 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8510 (bfd_section_from_shdr): Likewise. Set section name of group
8511 sections from signature.
8512 (group_signature): Split out from setup_group. Ensure symbol table
8513 is available.
8514 (bfd_elf_discard_group): New function.
8515 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8516 .gnu.linkonce* sections if they are members of a group.
8517 (set_group_contents): Set GRP_COMDAT flag.
8518 * section.c (bfd_discard_group): New function.
8519 * bfd-in.h (bfd_elf_discard_group): Declare.
8520 * bfd-in2.h: Regenerate.
8521 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8522 (elf_linkonce_p): Define.
8523
8524 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8525
8526 * elf.c (bfd_section_from_shdr): Make "name" const.
8527 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8528 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8529 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8530 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8531 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8532 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8533 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8534 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8535 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8536 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8537 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8538
8539 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8540
8541 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8542 ABI.
8543
8544 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8545
8546 * elf32-arc.c: Fix formatting.
8547 * elf32-arm.h: Likewise.
8548 * elf32-cris.c: Likewise.
8549 * elf32-dlx.c: Likewise.
8550 * elf32-hppa.c: Likewise.
8551 * elf32-i386.c: Likewise.
8552 * elf32-i386qnx.c: Likewise.
8553 * elf32-or32.c: Likewise.
8554 * elf32-s390.c: Likewise.
8555 * elf32-sh64.c: Likewise.
8556 * elf32-vax.c: Likewise.
8557 * elf32-xstormy16.c: Likewise.
8558 * elf64-alpha.c: Likewise.
8559 * elf64-mmix.c: Likewise.
8560 * elf64-ppc.c: Likewise.
8561 * elf64-s390.c: Likewise.
8562 * elf64-sh64.c: Likewise.
8563 * elf64-x86-64.c: Likewise.
8564
8565 2002-06-02 Richard Henderson <rth@redhat.com>
8566
8567 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8568 null when there are no got entries for a symbol.
8569 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8570 uninitialized variable warning.
8571
8572 2002-06-01 Richard Henderson <rth@redhat.com>
8573
8574 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8575 undefined symbols here.
8576 (elf64_alpha_relax_section): Do it here. Also test for not
8577 defined in the current module.
8578 (elf64_alpha_relocate_section_r): Split out of ...
8579 (elf64_alpha_relocate_section): ... here. Don't dereference
8580 NULL when looking up local got entries.
8581
8582 2002-06-01 Richard Henderson <rth@redhat.com>
8583
8584 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8585 symbols from JSR relaxation.
8586 (elf64_alpha_size_plt_section_1): New.
8587 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8588 (elf64_alpha_size_rela_got_1): ... here.
8589 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8590 (elf64_alpha_size_rela_got_section): ... here.
8591 (elf64_alpha_size_plt_section): New.
8592 (elf64_alpha_relax_section): Call them.
8593 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8594 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8595
8596 2002-06-01 Richard Henderson <rth@redhat.com>
8597
8598 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8599 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8600 in shared libraries. Fix DTPRELHI and TPRELHI value.
8601 (INSN_ADDQ, INSN_RDUNIQ): New.
8602 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8603 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8604 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8605 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8606 Handle GOTDTPREL and GOTTPREL relocations.
8607 (elf64_alpha_relax_gprelhilo): New.
8608 (elf64_alpha_relax_tls_get_addr): New.
8609 (elf64_alpha_relax_find_tls_segment): New.
8610 (elf64_alpha_relax_section): Handle TLS relocations.
8611 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8612 (elf64_alpha_check_relocs): Set it.
8613
8614 2002-06-01 Richard Henderson <rth@redhat.com>
8615
8616 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8617
8618 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8619 check; don't suppress dynamic relocs for non-allocated sections.
8620
8621 * elf64-alpha.c: Remove dead code.
8622
8623 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8624
8625 * bfd-in2.h: Regenerate.
8626 * libbfd.h: Regenerate.
8627 * po/SRC-POTFILES.in: Regenerate.
8628
8629 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8630 space for bss .plt.
8631
8632 2002-05-31 Graeme Peterson <gp@qnx.com>
8633
8634 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8635 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8636 Run "make dep-am".
8637 * Makefile.in: Regenerate.
8638 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8639 * configure.in: Add bfd_elf32_i386qnx_vec support.
8640 * configure: Regenerate.
8641 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8642 is_contained_by_filepos, and copy_private_bfd_data_p.
8643 * elf.c (assign_file_positions_for_segments): Call backend
8644 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8645 (IS_CONTAINED_BY_FILEPOS): Define.
8646 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8647 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8648 Fix non-K&R call to _bfd_error_handler.
8649 (_bfd_elf_copy_private_section_data): Use backend
8650 copy_private_bfd_data_p.
8651 * elf32-i386.c: Don't include elfxx-target.h when
8652 ELF32_I386_C_INCLUDED is defined.
8653 * elf32-i386qnx.c: New QNX elf backend file.
8654 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8655 elf_backend_is_contained_by_filepos, and
8656 elf_backend_do_copy_private_bfd_data.
8657 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8658
8659 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8660
8661 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8662 Move other similar defines to start of file.
8663
8664 2002-05-30 Tom Rix <trix@redhat.com>
8665
8666 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8667 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8668
8669 2002-05-30 Richard Henderson <rth@redhat.com>
8670
8671 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8672 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8673 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8674 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8675 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8676 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8677 n_local_got_entries to total_got_size and local_got_size.
8678 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8679 (alpha_got_entry_size): New.
8680 (elf64_alpha_relax_with_lituse): Use it.
8681 (elf64_alpha_relax_without_lituse): Likewise.
8682 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8683 (get_got_entry): New.
8684 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8685 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8686 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8687 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8688 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8689 (elf64_alpha_calc_got_offsets): Likewise.
8690 (alpha_dynamic_entries_for_reloc): New.
8691 (elf64_alpha_calc_dynrel_sizes): Use it.
8692 (elf64_alpha_size_dynamic_sections): Likewise.
8693 (elf64_alpha_relocate_section): Handle TLS relocations.
8694 * reloc.c: Add Alpha TLS relocations.
8695 * bfd-in2.h, libbfd.h: Rebuild.
8696
8697 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8698
8699 * peXXigen.c (pe_print_idata): Remove double printed
8700 import table lines; add Bound-To comment.
8701
8702 2002-05-29 Matt Thomas <matt@3am-software.com>
8703
8704 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8705 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8706 (elf32-vax.lo): New rule.
8707 * Makefile.in: Regenerate.
8708 * configure.in (bfd_elf32_vax_vec)
8709 (vaxnetbsd_vec): New vectors.
8710 * configure: Regenerate.
8711 * config.bfd (vax-*-netbsdelf*)
8712 (vax-*-netbsdaout*)
8713 (vax-*-netbsd*): New targets.
8714 * elf32-vax.c: New file.
8715 * reloc.c: Add VAX relocations.
8716 * bfd-in2.h: Regenerate.
8717 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8718
8719 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8720
8721 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8722 and bfd_elf32_bigarm_vec to targ_selvecs.
8723
8724 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8725
8726 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8727 with auto-imported symbols.
8728
8729 2002-05-29 Adam Nemet <anemet@lnxw.com>
8730
8731 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8732 sections only record bfd.
8733 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8734 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8735 * bfd-in2.h: Regenerate.
8736
8737 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8738
8739 * syms.c (_bfd_stab_section_find_nearest_line): Move
8740 declaration and initialisation of saw_line and saw_func out of
8741 for loop.
8742
8743 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8744
8745 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8746 (bfd_elf64_get_symbol_info): Define.
8747 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8748
8749 2002-05-29 Andrey Volkov <avolkov@transas.com>
8750
8751 * cpu-h8300.c: Make default h8300 machine first in machine list.
8752
8753 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8754
8755 * config.bfd: Added DLX configuraton.
8756 * Makefile.am: Added DLX configuraton.
8757 * configure.in: Added DLX configuraton.
8758 * archures.c: Add DLX architecture.
8759 * reloc.c: Add DLX relocs.
8760 * targets.c: Added DLX target vector.
8761 * configure: Regenerate.
8762 * Makefile.in: Regenreate.
8763 * bfd-in2.h: Regenreate.
8764 * elf32-dlx.c: New file: Support DLX target.
8765 * cpu-dlx.c: New file: Support DLX target.
8766
8767 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8768
8769 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8770
8771 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8772 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8773 strings to point inside function code sym string.
8774 (func_desc_adjust): Likewise.
8775 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8776
8777 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8778
8779 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8780 (elf64_x86_64_grok_psinfo): Added.
8781
8782 2002-05-24 TAMURA Kent <kent@netbsd.org>
8783
8784 * config.bfd: Add a target for i386-netbsdpe.
8785
8786 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8787
8788 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8789 and is_func_descriptor.
8790 (func_desc_adjust): Hide function code sym in shared libs unless
8791 there is a matching exported function descriptor sym.
8792
8793 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8794
8795 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8796 for symbols from SHF_TLS section.
8797 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8798 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8799 (map_sections_to_segments): Build PT_TLS segment if necessary.
8800 (assign_file_positions_for_segments): Likewise.
8801 (get_program_header_size): Account for PT_TLS segment.
8802 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8803 SEC_THREAD_LOCAL sections to STT_TLS.
8804 * reloc.c: Add 386 and IA-64 TLS relocs.
8805 * section.c (SEC_THREAD_LOCAL): Define.
8806 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8807 Remove.
8808 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8809 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8810 unconditionally.
8811 (struct elf_final_link_info): Add first_tls_sec.
8812 (elf_bfd_final_link): Set first_tls_sec.
8813 Compute elf_hash_table (info)->tls_segment.
8814 (elf_link_output_extsym): Handle STT_TLS symbols.
8815 (elf_link_input_bfd): Likewise.
8816 * syms.c (BSF_THREAD_LOCAL): Define.
8817 * bfd-in2.h: Rebuilt.
8818 * libbfd.h: Rebuilt.
8819 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8820 elf_i386_mkobject, elf_i386_object_p): New functions.
8821 (elf_howto_table): Add TLS relocs.
8822 (elf_i386_reloc_type_lookup): Support TLS relocs.
8823 (elf_i386_info_to_howto_rel): Likewise.
8824 (struct elf_i386_link_hash_entry): Add tls_type.
8825 (struct elf_i386_obj_tdata): New.
8826 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8827 New macros.
8828 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8829 (link_hash_newfunc): Clear tls_type.
8830 (elf_i386_check_relocs): Support TLS relocs.
8831 (elf_i386_gc_sweep_hook): Likewise.
8832 (allocate_dynrelocs): Likewise.
8833 (elf_i386_size_dynamic_sections): Likewise.
8834 (elf_i386_relocate_section): Likewise.
8835 (elf_i386_finish_dynamic_symbol): Likewise.
8836 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8837 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8838 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8839 want_tprel, want_dtpmod, want_dtprel.
8840 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8841 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8842 R_IA64_LTOFF_TPREL22.
8843 (elf_code_to_howto_index): Add TLS relocs.
8844 (elfNN_ia64_check_relocs): Support TLS relocs.
8845 (allocate_global_data_got): Account for TLS .got data.
8846 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8847 (elfNN_ia64_install_value): Supprt TLS relocs.
8848 (set_got_entry): Support TLS relocs.
8849 (elfNN_ia64_relocate_section): Likewise.
8850
8851 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8852
8853 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8854 BLX reloc round the relocation up rather than down.
8855 * coff-arm.c (coff_arm_relocate_section): Likewise.
8856
8857 2002-05-21 H.J. Lu (hjl@gnu.org)
8858
8859 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8860 definition.
8861
8862 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8863
8864 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8865 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8866
8867 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8868
8869 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8870 unresolved relocs.
8871 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8872
8873 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8874
8875 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8876 non-ELF targets.
8877
8878 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8879
8880 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8881 an error value.
8882 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8883 return with false on error.
8884 (elf_link_input_bfd): Check reloc_emitter return value.
8885
8886 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8887
8888 * config.bfd (armeb-*-netbsdelf*): New target.
8889
8890 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8891
8892 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8893 at the plt call stub.
8894
8895 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8896
8897 * cpu-mips.c (mips_compatible): Don't try to check machine
8898 compatibility.
8899
8900 2002-05-18 Tom Rix <trix@redhat.com>
8901
8902 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8903
8904 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8905
8906 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8907 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8908 we've already warned about an undefined symbol. Report more
8909 detail on reloc errors.
8910
8911 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8912
8913 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8914 * configure.in: Invoke AM_INSTALL_LIBBFD.
8915 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8916 (install_libbfd): .. New target.
8917 (uninstall_libbfd): Likewise.
8918 (install-bfdlibLTLIBRARIES): Likewise.
8919 (uninstall-bfdlibLTLIBRARIES): Likewise.
8920 (bfdlibdir): New.
8921 (bfdincludedir): New.
8922 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8923 * aclocal.m4: Regenerate.
8924 * configure: Regenerate.
8925 * Makefile.in: Regenerate.
8926
8927 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8928
8929 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8930 hash loop.
8931
8932 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8933
8934 * config.bfd: Add targets for sh64-linux (little endian and
8935 big endian).
8936
8937 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8938
8939 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8940 is located in the same section as the import table. Instead
8941 check, and if necessary load the section containing the thunk.
8942
8943 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8944
8945 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8946 bfd_bread.
8947 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8948 with bfd_bread.
8949
8950 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8951
8952 * aix5ppc-core.c: Warning fixes.
8953 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8954 * aout-target.h (MY_bfd_link_just_syms): Define.
8955 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8956 * bfd.c (bfd_link_just_syms): Define.
8957 * binary.c (binary_bfd_link_just_syms): Define.
8958 * bout.c (b_out_bfd_link_just_syms): Define.
8959 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8960 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8961 * coffcode.h (coff_bfd_link_just_syms): Define.
8962 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8963 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8964 (_bfd_elf_link_just_syms): Declare.
8965 * elf.c (_bfd_elf_link_just_syms): New function.
8966 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8967 sections haven't already been discarded by the linker.
8968 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8969 sections and SEC_MERGE sections.
8970 (elf_bfd_discard_info): Similarly here.
8971 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8972 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8973 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8974 * ieee.c (ieee_bfd_link_just_syms): Define.
8975 * ihex.c (ihex_bfd_link_just_syms): Define.
8976 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8977 (_bfd_generic_link_just_syms): Declare.
8978 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8979 * linker.c (_bfd_generic_link_just_syms): New function.
8980 * mmo.c (mmo_bfd_link_just_syms): Define.
8981 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8982 * oasys.c (oasys_bfd_link_just_syms): Define.
8983 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8984 * som.c (som_bfd_link_just_syms): Define.
8985 * srec.c (srec_bfd_link_just_syms): Define.
8986 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8987 (BFD_JUMP_TABLE_LINK): And here.
8988 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8989 * versados.c (versados_bfd_link_just_syms): Define.
8990 * vms.c (vms_bfd_link_just_syms): Define.
8991 * libbfd.h: Regenerate.
8992 * bfd-in2.h: Regenerate.
8993
8994 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8995
8996 * elf32-mips.c: Remove superfluous definitions copied from
8997 elfxx-mips.c.
8998 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8999 SGIish vectors to check the special case.
9000 (mips_elf_hi16_reloc): Fix comment.
9001 (mips_elf_got16_reloc): Likewise.
9002 (_bfd_mips_elf32_gprel16_reloc): Likewise.
9003 (elf_reloc_map): Code cleanup.
9004 (mips_reloc_map): Add comment.
9005 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
9006 (mips_elf32_rtype_to_howto): Likewise.
9007 (mips_elf32_discard_info): Likewise.
9008 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
9009 lead to IRIX compatibility now.
9010
9011 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9012
9013 * elfxx-mips.c: Call it IRIX, not Irix in comments.
9014
9015 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
9016
9017 * config.bfd (shle-*-netbsdelf*): Add target which includes
9018 sh64 support.
9019
9020 2002-05-13 David Edelsohn <edelsohn@gnu.org>
9021
9022 * configure.in: Revert 2002-04-07. Instead, auto-configure
9023 HAVE_ST_C_IMPL.
9024 * configure: Regenerate.
9025 * config.in: Regenerate.
9026 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
9027 or AIX_5_CORE.
9028
9029 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
9030
9031 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
9032 corefiles as well.2
9033 * configure: Regenerate.
9034
9035 2002-05-13 Alan Modra <amodra@bigpond.net.au>
9036
9037 * Makefile.am (install-data-local): Install headers to
9038 $(exec_prefix)/include.
9039 * Makefile.in: Regenerate.
9040
9041 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
9042 Daniel Jacobowitz <drow@mvista.com>
9043
9044 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
9045 map BFD_RELOC_RVA.
9046
9047 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
9048
9049 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
9050 hppa*-*-openbsd*): New targets.
9051 * configure.in (alpha*-*-openbsd*): Set COREFILE.
9052 * configure: Regenerate.
9053
9054 2002-05-10 Tom Rix <trix@redhat.com>
9055
9056 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
9057 xcoff64_ppc_relocate_section.
9058 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
9059 * libxcoff.h: Common xcoff_reloc_type function declaration.
9060
9061 2002-05-10 Alan Modra <amodra@bigpond.net.au>
9062
9063 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
9064 added in 2002-05-09 commit.
9065
9066 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
9067 don't look for stubs on all undefined syms.
9068
9069 2002-05-09 Alan Modra <amodra@bigpond.net.au>
9070
9071 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
9072 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
9073 pcrel_offset.
9074
9075 * elf32-i386.c (elf_howto_table): Comments.
9076 (elf_i386_relocate_section): Handle more relocs for relocatable
9077 linking and against SEC_MERGE sections.
9078
9079 2002-05-08 Alan Modra <amodra@bigpond.net.au>
9080
9081 * elf32-ppc.c (ppc_elf_create_got): New function.
9082 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
9083 _bfd_elf_create_dynamic_sections. Correct .plt flags.
9084 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
9085 _bfd_elf_create_got_section.
9086
9087 2002-05-07 Alan Modra <amodra@bigpond.net.au>
9088
9089 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
9090 * elfxx-target.h (elf_backend_rela_normal): Define.
9091 (elfNN_bed): Init rela_normal.
9092 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
9093 for section symbols here if rela_normal. Simplify abs section test.
9094 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
9095 return immediately. Remove code handling relocatable linking.
9096 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
9097 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
9098 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9099 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
9100 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9101 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
9102 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
9103 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9104 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9105 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
9106 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9107 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9108 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9109 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
9110 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
9111 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
9112 * elf-m10200.c (elf_backend_rela_normal): Define.
9113 * elf-m10300.c (elf_backend_rela_normal): Define.
9114 * elf32-fr30.c (elf_backend_rela_normal): Define.
9115 * elf32-i370.c (elf_backend_rela_normal): Define.
9116 * elf32-i860.c (elf_backend_rela_normal): Define.
9117 * elf32-m68k.c (elf_backend_rela_normal): Define.
9118 * elf32-mcore.c (elf_backend_rela_normal): Define.
9119 * elf32-openrisc.c (elf_backend_rela_normal): Define.
9120 * elf32-ppc.c (elf_backend_rela_normal): Define.
9121 * elf32-s390.c (elf_backend_rela_normal): Define.
9122 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
9123 * elf64-ppc.c (elf_backend_rela_normal): Define.
9124 * elf64-s390.c (elf_backend_rela_normal): Define.
9125 * elf64-x86-64.c (elf_backend_rela_normal): Define.
9126 * elfxx-ia64.c (elf_backend_rela_normal): Define.
9127 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
9128 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
9129
9130 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
9131
9132 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
9133 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
9134
9135 2002-05-06 Alan Modra <amodra@bigpond.net.au>
9136
9137 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
9138 when not relocatable. Fix reloc_emitter call for K&R.
9139
9140 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9141
9142 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
9143 reloading local sym addend mistakenly removed in 2002-05-01 change.
9144
9145 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
9146 (read_abbrevs): Change "offset" param to bfd_vma.
9147 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
9148 Change "abbrev_offset" to bfd_vma.
9149 (read_indirect_string): Use correct conversion chars in error
9150 message format string, cast bfd_vma's to unsigned long.
9151 (read_abbrevs): Likewise.
9152 (read_attribute_value): Likewise.
9153 (decode_line_info): Likewise.
9154 (scan_unit_for_functions): Likewise.
9155 (parse_comp_unit): Likewise.
9156
9157 2002-05-04 Tom Rix <trix@redhat.com>
9158
9159 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
9160 (coff_swap_reloc_out): Same.
9161 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
9162 (xcoff_swap_reloc_out): Same.
9163 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
9164 case some 16 bit relocs. Add reloc value to output.
9165 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
9166 R_RBR. Improve names.
9167 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
9168 (bfd_xcoff_backend_data): Update with new reloc swap names.
9169 (bfd_pmac_xcoff_backend_data) : Same.
9170 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9171 (xcoff64_swap_reloc_out): Same.
9172 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9173 R_POS. Add reloc value to output.
9174 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9175 bit R_RBR. Improve names, masks.
9176 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9177 (bfd_xcoff_backend_data): Update with new reloc swap names.
9178 (bfd_xcoff_aix5_backend_data) : Same.
9179
9180 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9181
9182 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9183 bfd_count top_index, input_list, all_local_syms.
9184 (elf32_hppa_setup_section_lists): New function, split from
9185 elf32_hppa_size_stubs.
9186 (elf32_hppa_next_input_section): Likewise.
9187 (group_sections): Likewise.
9188 (get_local_syms): Likewise.
9189 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9190 stubs on undefined syms too.
9191 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9192 Only access htab elf fields when we have an elf hash table.
9193 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9194 (elf32_hppa_next_input_section): Declare.
9195
9196 2002-05-04 Bob Byrnes <byrnes@curl.com>
9197
9198 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9199 _bfd_new_bfd.
9200
9201 2002-05-03 H.J. Lu (hjl@gnu.org)
9202
9203 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9204 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9205 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9206 to hide a global symbol.
9207 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9208 forced_local to true.
9209
9210 2002-05-02 Richard Henderson <rth@redhat.com>
9211
9212 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9213 vs SHN_UNDEF to zero.
9214
9215 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9216
9217 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9218 16 bit reloc.
9219 <R_PPC64_SECTOFF_DS>: Likewise.
9220 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9221 SECTOFF reloc.
9222 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9223 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9224 SECTOFF reloc.
9225
9226 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9227 (ppc64_elf_ha_reloc): New function.
9228 (ppc64_elf_brtaken_reloc): New function.
9229 (ppc64_elf_sectoff_reloc): New function.
9230 (ppc64_elf_sectoff_ha_reloc): New function.
9231 (ppc64_elf_toc_reloc): New function.
9232 (ppc64_elf_toc_ha_reloc): New function.
9233 (ppc64_elf_toc64_reloc): New function.
9234 (ppc64_elf_unhandled_reloc): New function.
9235 (ppc64_elf_howto_raw): Use the above.
9236 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9237 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9238 <R_PPC64_SECTOFF_DS>: Likewise.
9239 (IS_ABSOLUTE_RELOC): Update.
9240 (struct ppc_link_hash_table): Add have_undefweak.
9241 (ppc64_elf_link_hash_table_create): Init.
9242 (func_desc_adjust): Set have_undefweak.
9243 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9244 add the .sfpr blr when have_undefweak.
9245 (ppc64_elf_setup_section_lists): Check hash table flavour.
9246 (ppc64_elf_next_input_section): Move output_section->owner test to
9247 ppc64elf.em.
9248 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9249 and relocatable test. Return TOCstart and don't set elf_gp.
9250 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9251 offset calculation. Add assert on weak sym branch tweaks.
9252 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9253 (ppc64_elf_toc): Declare.
9254 (ppc64_elf_next_input_section): Update.
9255
9256 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9257
9258 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9259 file_name.
9260
9261 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9262
9263 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9264 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9265 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9266 call branches. Correct undefined weak destination.
9267 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9268 .sfpr, and correct case where either only savef* or restf* is
9269 needed.
9270
9271 Long branch stubs, multiple stub sections.
9272 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9273 (ppc64_elf_next_input_section): Declare.
9274 * elf64-ppc.c: Move linker-only prototypes.
9275 (STUB_SUFFIX): Define.
9276 (enum ppc_stub_type): New.
9277 (struct ppc_stub_hash_entry): New.
9278 (struct ppc_branch_hash_entry): New.
9279 (struct ppc_link_hash_entry): Add stub_cache, oh.
9280 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9281 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9282 Rename plt_overflow to stub_error.
9283 (ppc_stub_hash_lookup): Define.
9284 (ppc_branch_hash_lookup): Define.
9285 (stub_hash_newfunc): New function.
9286 (branch_hash_newfunc): New function.
9287 (link_hash_newfunc): Init new fields.
9288 (ppc64_elf_link_hash_table_create): Likewise.
9289 (ppc64_elf_link_hash_table_free): New function.
9290 (ppc_stub_name): New function.
9291 (ppc_get_stub_entry): New function.
9292 (ppc_add_stub): New function.
9293 (create_linkage_sections): Use bfd_make_section_anyway. Create
9294 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9295 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9296 and set up for plt call stubs. Link func and func desc syms.
9297 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9298 (func_desc_adjust): Avoid hash lookup when func desc sym available
9299 via shortcut, and set links when processing.
9300 (ppc64_elf_hide_symbol): Likewise.
9301 (allocate_dynrelocs): Don't allocate stub section here.
9302 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9303 Remove sstub code.
9304 (ppc_type_of_stub): New function.
9305 (build_one_stub): Delete.
9306 (ppc_build_one_stub): New function.
9307 (ppc_size_one_stub): New function.
9308 (ppc64_elf_setup_section_lists): New function.
9309 (ppc64_elf_next_input_section): New function.
9310 (group_sections): New function.
9311 (get_local_syms): New function.
9312 (ppc64_elf_size_stubs): Rewrite.
9313 (ppc64_elf_build_stubs): Rewrite.
9314 (ppc64_elf_relocate_section): Look up stub entry for REL24
9315 relocs. Don't propagate REL14* to dynamic objects. Look for long
9316 branch stubs if REL14* or REL24 relocs won't reach.
9317 (bfd_elf64_bfd_link_hash_table_free): Define.
9318
9319 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9320
9321 * config.bfd: Add support for powerpc-*-windiss.
9322
9323 2002-04-30 Tom Rix <trix@redhat.com>
9324
9325 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9326 symbol names into the hash table.
9327
9328 2002-04-28 Tom Rix <trix@redhat.com>
9329
9330 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9331 calulating relocations.
9332 (xcoff_complain_overflow) : Function table for relocation errors.
9333 (xcoff_ppc_relocate_section): Use relocation and complain function
9334 tables.
9335 (xcoff_complain_overflow_unsigned_func): New complain function.
9336 (xcoff_complain_overflow_signed_func): Same.
9337 (xcoff_complain_overflow_bitfield_func): Same.
9338 (xcoff_complain_overflow_dont_func): Same.
9339 (xcoff_reloc_type_crel): New recot function.
9340 (xcoff_reloc_type_br): Same.
9341 (xcoff_reloc_type_ba): Same.
9342 (xcoff_reloc_type_toc): Same.
9343 (xcoff_reloc_type_rel): Same.
9344 (xcoff_reloc_type_neg): Same.
9345 (xcoff_reloc_type_pos): Same.
9346 (xcoff_reloc_type_fail): Same.
9347 (xcoff_reloc_type_noop): Same.
9348 * libxcoff.h : Declare common parts for xcoff64.
9349 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9350 and complain function tables.
9351
9352 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9353
9354 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9355 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9356
9357 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9358
9359 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9360 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9361
9362 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9363 same as the output before calling elf_link_input_bfd.
9364
9365 * coffcode.h (coff_compute_section_file_positions): Set
9366 section_tail after shuffling section list.
9367
9368 2002-04-24 Christian Groessler <chris@groessler.org>
9369
9370 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9371 addresses are 23bit with a special layout, not plain 32bit
9372 values. Prevent relocation of immediate values.
9373
9374 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9375
9376 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9377 MIPS-16 ASE flags are set, print something to indicate that.
9378
9379 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9380
9381 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9382 under which a plt call stub is used.
9383 (final_link_relocate): Similarly.
9384 (allocate_plt_static): Clear h-plabel except when plt entry is
9385 exclusively used for a plabel.
9386 (allocate_dynrelocs): Use the above to simplify plt sizing.
9387 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9388 (elf32_hppa_link_hash_table_create): Init.
9389 (BL22_RP): Define.
9390 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9391 (elf32_hppa_check_relocs): Set has_22bit_branch.
9392
9393 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9394 (final_link_relocate): Likewise.
9395
9396 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9397
9398 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9399 search table if some FDE is DW_EH_PE_aligned encoded either.
9400 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9401
9402 2002-04-22 Richard Smith <richard@ex-parrot.com>
9403 Jakub Jelinek <jakub@redhat.com>
9404
9405 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9406 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9407 encoded personality.
9408 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9409 for CIE/FDE removal.
9410
9411 2002-04-20 Tom Rix <trix@redhat.com>
9412
9413 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9414
9415 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9416
9417 * archures.c (bfd_lookup_arch): Move the list order comment..
9418 (struct bfd_arch_info): ..to where it belongs.
9419 * bfd-in2.h: Regenerate.
9420
9421 * archures.c (bfd_lookup_arch): Add comment on list order.
9422 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9423 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9424 is always at head of list.
9425
9426 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9427
9428 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9429 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9430 definition of these functions for ARM_WINCE builds as they are
9431 not used.
9432 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9433 for ARM_WINCE builds.
9434
9435 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9436
9437 * coff-arm.c (bfd_arm_process_before_allocation):
9438
9439 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9440
9441 * cpu-sh.c (scan_mach): Delete.
9442 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9443 (bfd_sh_arch): Likewise.
9444
9445 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9446
9447 * ihex.c (ihex_write_object_contents): Fix check for records
9448 crossing 64K boundaries.
9449
9450 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9451
9452 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9453 type rather than just assuming entries are ELF.
9454 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9455 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9456 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9457 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9458 rather than elf_link_hash_entry.
9459
9460 2002-04-15 Richard Henderson <rth@redhat.com>
9461
9462 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9463 n32 binaries.
9464
9465 2002-04-15 Michael Snyder <msnyder@redhat.com>
9466
9467 * opncls.c (bfd_close): Write contents if writeable.
9468 Minor formatting tidy-ups.
9469
9470 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9471
9472 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9473
9474 2002-04-12 Michael Snyder <msnyder@redhat.com>
9475
9476 * bfd-in.h (bfd_get_section_lma): New access macro.
9477 Minor white-space fix-up.
9478
9479 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9480
9481 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9482 header pad.
9483
9484 2002-04-09 DJ Delorie <dj@redhat.com>
9485
9486 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9487
9488 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9489
9490 * coffcode.h (coff_read_word): New.
9491 (coff_compute_checksum): New.
9492 (coff_apply_checksum): New.
9493 (coff_write_object_contents): Call coff_apply_checksum () to
9494 apply checksum to PE image.
9495
9496 2002-04-08 Randolph Chung <tausq@debian.org>
9497
9498 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9499 (elf32_hppa_final_link): Split out sorting logic to..
9500 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9501 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9502
9503 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9504
9505 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9506 pattern.
9507 * configure: Re-generate.
9508
9509 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9510
9511 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9512 is greater or equal to 4.3.3.
9513 * configure: Regenerate.
9514 Fix PR gdb/344.
9515
9516 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9517
9518 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9519 R_CRIS_32_PCREL>: Fix typo in name.
9520 (cris_elf_check_relocs): Always create .rela.got here when
9521 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9522 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9523 assume it's created.
9524
9525 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9526
9527 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9528 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9529 define.
9530 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9531 * bfd.c (bfd_link_hash_table_free): Define.
9532 * binary.c (binary_bfd_link_hash_table_free): Define.
9533 * bout.c (b_out_bfd_link_hash_table_free): Define.
9534 * coff-rs6000.c (rs6000coff_vec): Include
9535 _bfd_generic_link_hash_table_free.
9536 (pmac_xcoff_vec): Likewise.
9537 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9538 (aix5coff64_vec): Likewise.
9539 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9540 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9541 (bfd_elf32_bfd_link_hash_table_free): Define.
9542 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9543 (bfd_elf32_bfd_link_hash_table_free): Define.
9544 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9545 define.
9546 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9547 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9548 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9549 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9550 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9551 (_bfd_generic_link_hash_table_free): Add prototype.
9552 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9553 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9554 * linker.c (_bfd_generic_link_hash_table_free): New function.
9555 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9556 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9557 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9558 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9559 * som.c (som_bfd_link_hash_table_free): Define.
9560 * srec.c (srec_bfd_link_hash_table_free): Define.
9561 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9562 * versados.c (versados_bfd_link_hash_table_free): Define.
9563 * vms.c (vms_bfd_link_hash_table_free): New function.
9564 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9565
9566 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9567 instead of bfd_alloc.
9568 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9569 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9570 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9571 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9572 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9573 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9574 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9575 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9576 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9577 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9578 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9579 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9580 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9581 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9582 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9583 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9584 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9585 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9586 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9587 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9588 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9589 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9590 * m68klinux.c (linux_link_hash_table_create): Likewise.
9591 * sparclinux.c (linux_link_hash_table_create): Likewise.
9592 * sunos.c (sunos_link_hash_table_create): Likewise.
9593 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9594
9595 * targets.c: Add _bfd_link_hash_table_free to xvec.
9596
9597 * bfd-in2.h: Regenerate.
9598 * libbfd.h: Regenerate.
9599 * libcoff.h: Regenerate.
9600
9601 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9602
9603 * dep-in.sed: Cope with absolute paths.
9604 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9605 Run "make dep-am".
9606 * Makefile.in: Regenerate.
9607 * coff-arm.c: Fix copyright date.
9608 * cpu-h8300.c: Likewise.
9609 * cpu-i370.c: Likewise.
9610 * cpu-s390.c: Likewise.
9611 * cpu-mips.c: Likewise.
9612 * po/SRC-POTFILES.in: Regenerate.
9613
9614 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9615
9616 * Makefile.am: Add elfxx-mips.c to the known backends.
9617 (elf32-mips.lo): remove dependency to coff/external.h.
9618 * Makefile.in: Regenerate.
9619 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9620 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9621 accordingly.
9622 * configure: Regenerate.
9623 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9624 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9625 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9626 MIPS specific backend functions.
9627 * elf32-mips.c: Moved most code to elfxx-mips.c.
9628 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9629 static.
9630 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9631 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9632 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9633 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9634 interface to allow selection of the right REL or RELA howto table.
9635 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9636 static. Let it refuse n32 objects.
9637 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9638 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9639 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9640 (elf32_mips_ignore_discarded_relocs): Rename from
9641 _bfd_elf32_mips_ignore_discarded_relocs.
9642 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9643 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9644 (elf_mips_howto_table_rela): Remove.
9645 * elf64-mips.c: Moved most code to elfxx-mips.c.
9646 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9647 (mips_elf64_rtype_to_howto): New function.
9648 (mips_elf64_object_p): Likewise.
9649 (elf64_mips_irix_compat): Likewise.
9650 * elfxx-mips.c: New file containing common code merged together from
9651 elf32-mips.c and elf64-mips.c.
9652 * elfxx-mips.h: New file containing MIPS specific prototypes from
9653 elf-bfd.h.
9654 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9655 elf_backend_mips_rtype_to_howto.
9656
9657 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9658
9659 * srec.c (MAXCHUNK, Chunk): Revise comments.
9660 (srec_write_record): Correct buffer size.
9661 (srec_write_header): Do without intermediate buffer.
9662 (srec_write_section): Validate Chunk.
9663 (srec_write_terminator): Pass NULL instead of dummy buffer.
9664 (srec_write_symbols): Pass file and symbol names directly to
9665 bfd_bwrite so sprintf won't overflow buffer.
9666
9667 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9668
9669 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9670 PC relative relocs against hidden symbols.
9671 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9672
9673 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9674
9675 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9676 LMAs, loop over segments until p_vaddr and p_memsz specify an
9677 extent enclosing the section.
9678
9679 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9680
9681 * ihex.c (ihex_write_object_contents): Do not allow records to
9682 cross a 64K boundary - wrap if necessary.
9683
9684 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9685
9686 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9687 which caused the returned LWP ID to always be 0.
9688
9689 2002-04-01 Richard Henderson <rth@redhat.com>
9690
9691 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9692 (elf32_sparc_relocate_section): Use it to figure out when to
9693 initialize .got entries.
9694 * elf64-sparc.c: Similarly.
9695
9696 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9697
9698 * linker.c (link_action): Ignore duplicate warning syms.
9699 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9700 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9701 (elf_adjust_dynamic_symbol): Likewise.
9702 (elf_export_symbol): Likewise.
9703 (elf_link_find_version_dependencies): Likewise.
9704 (elf_link_assign_sym_version): Likewise.
9705 (elf_link_sec_merge_syms): Likewise.
9706 (elf_link_output_extsym): Likewise.
9707 (elf_gc_sweep_symbol): Likewise.
9708 (elf_gc_propagate_vtable_entries_used): Likewise.
9709 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9710 (elf_gc_allocate_got_offsets): Likewise.
9711 (elf_collect_hash_codes): Likewise.
9712 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9713 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9714 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9715 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9716 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9717 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9718 (elf_cris_discard_excess_dso_dynamics): Likewise.
9719 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9720 (mark_PIC_calls): Likewise.
9721 (allocate_plt_static): Likewise.
9722 (allocate_dynrelocs): Likewise.
9723 (readonly_dynrelocs): Likewise.
9724 * elf32-i386.c (allocate_dynrelocs): Likewise.
9725 (readonly_dynrelocs): Likewise.
9726 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9727 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9728 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9729 (mips_elf_sort_hash_table_f): Likewise.
9730 (mips_elf_check_mips16_stubs): Likewise.
9731 * elf32-s390.c (allocate_dynrelocs): Likewise.
9732 (readonly_dynrelocs): Likewise.
9733 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9734 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9735 (xstormy16_relax_plt_realloc): Likewise.
9736 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9737 (elf64_alpha_output_extsym): Likewise.
9738 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9739 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9740 (mips_elf64_check_mips16_stubs): Likewise.
9741 (mips_elf64_output_extsym): Likewise.
9742 * elf64-ppc.c (func_desc_adjust): Likewise.
9743 (allocate_dynrelocs): Likewise.
9744 (readonly_dynrelocs): Likewise.
9745 * elf64-s390.c (allocate_dynrelocs): Likewise.
9746 (readonly_dynrelocs): Likewise.
9747 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9748 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9749 (readonly_dynrelocs): Likewise.
9750 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9751 * aoutx.h (aout_link_write_other_symbol): Likewise.
9752 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9753 (_bfd_coff_write_global_sym): Likewise.
9754 * i386linux.c (linux_tally_symbols): Likewise.
9755 * m68klinux.c (linux_tally_symbols): Likewise.
9756 * sparclinux.c (linux_tally_symbols): Likewise.
9757 * pdp11.c (aout_link_write_other_symbol): Likewise.
9758 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9759 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9760 (xcoff_write_global_symbol): Likewise.
9761
9762 * cofflink.c (_bfd_coff_final_link): Formatting.
9763 * cpu-mips.c (mips_compatible): Make static, prototype.
9764 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9765 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9766 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9767 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9768 (mips_elf64_final_link): Likewise.
9769 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9770 prototype.
9771
9772 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9773
9774 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9775 (SWAP_OUT_RELOC_OFFSET): Define.
9776
9777 2002-03-27 Gregory Steuck <greg@nest.cx>
9778
9779 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9780 terminating NULL if empty symbol table.
9781 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9782
9783 2002-03-26 H.J. Lu (hjl@gnu.org)
9784
9785 * elflink.h (elf_link_input_bfd): Revert the last change since
9786 the gcc exception handling isn't fixed yet.
9787
9788 2002-03-26 H.J. Lu (hjl@gnu.org)
9789
9790 * elflink.h (elf_link_input_bfd): Complain about relocations
9791 against local symbols in discarded sections.
9792
9793 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9794
9795 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9796
9797 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9798
9799 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9800 section file offset for !SEC_LOAD sections.
9801
9802 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9803
9804 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9805 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9806
9807 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9808
9809 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9810 Whitespace changes.
9811 * archive.c: Update copyright date.
9812 * bfd-in2.h: Regenerate.
9813 * libbfd.h: Regenerate.
9814 * Makefile.am: Run "make dep-am"
9815 * Makefile.in: Regenerate.
9816 * po/SRC-POTFILES.in: Regenerate.
9817
9818 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9819
9820 * dwarf2.c (struct funcinfo): Move up.
9821 (lookup_address_in_function_table): New argument function_ptr.
9822 Set it.
9823 (lookup_address_in_line_table): New argument function. If function
9824 is non-NULL, use it to handle ``addr'' before the first line note of
9825 the function.
9826 (comp_unit_find_nearest_line): Update and swap calls to
9827 lookup_address_in_function_table and lookup_address_in_line_table.
9828 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9829 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9830
9831 2002-03-20 Tom Rix <trix@redhat.com>
9832
9833 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9834 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9835 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9836
9837 2002-03-19 Tom Rix <trix@redhat.com>
9838
9839 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9840 dynamic objects in archives.
9841
9842 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9843
9844 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9845 STT_NOTYPE symbols to STT_OBJECT.
9846
9847 2002-03-18 Jan Hubicka <jh@suse.cz>
9848
9849 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9850
9851 2002-03-18 Tom Rix <trix@redhat.com>
9852
9853 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9854 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9855 * coff-rs6000 (do_pad) : New function for archive padding.
9856 (do_copy) : New function for object file copying in archives.
9857 (do_shared_object_padding) : New function for padding shared
9858 objects to their text section alignment in archives.
9859 (bfd_xcoff_ar_achive_set_magic) : Stub.
9860 (xcoff_write_armap_big) : Use do_copy and do_pad.
9861 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9862 do_copy and do_pad.
9863 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9864 bfd_xcoff_magic_number.
9865 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9866 fop.
9867 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9868 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9869 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9870 * rs6000-core.c : Update copyright date.
9871 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9872 csectpp.
9873 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9874 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9875 (coff_set_flags) : Use bfd_xcoff_magic_number.
9876 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9877 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9878 * Makefile.am : Same.
9879 * config.bfd : Same.
9880 * targets.c : Same.
9881 * configure : Regnerate.
9882 * Makefile.in : Same.
9883 * bfd-in2.h : Same.
9884
9885 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9886
9887 * po/fr.po: Updated version.
9888
9889 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9890
9891 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9892 * libbfd.h: Regenerate.
9893 * archive.c (coff_write_armap): Pass on failures from
9894 bfd_write_bigendian_4byte_int.
9895
9896 2002-03-14 H.J. Lu <hjl@gnu.org>
9897
9898 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9899 error to bfd_error_nonrepresentable_section for reinit_array
9900 section in DSO.
9901
9902 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9903
9904 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9905 OR it in rather than replacing previously selected flags.
9906
9907 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9908 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9909
9910 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9911
9912 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9913 (N): Use the above.
9914 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9915 ensure reloc size matches before calling elf_link_input_bfd.
9916 Add an assert to check reloc size when counting output relocs.
9917
9918 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9919
9920 * mmo.c (mmo_get_loc): Return NULL rather than false.
9921
9922 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9923
9924 * po/fr.po: Updated version.
9925
9926 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9927
9928 * archures.c (bfd_default_compatible): Test bits_per_word.
9929 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9930 bfd_default_compatible.
9931 * cpu-i370.c (i370_compatible): Likewise.
9932 * cpu-sparc.c (sparc_compatible): Likewise.
9933 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9934
9935 * elflink.h: Formatting fixes.
9936 (elf_link_output_extsym): Merge undefined and undef weak cases.
9937
9938 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9939 when word size of input matches output word size.
9940
9941 2002-03-12 Andreas Jaeger <aj@suse.de>
9942
9943 * cpu-i386.c (i386_compatible): New. Use it instead of
9944 bfd_default_compatible.
9945
9946 2002-03-07 H.J. Lu (hjl@gnu.org)
9947
9948 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9949 as the type for bfd_reloc_val.
9950
9951 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9952
9953 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9954 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9955 (elf_hppa_final_link_relocate): Correct relocations for indirect
9956 references to local data through the DLT. Fix .opd creation for
9957 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9958 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9959 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9960 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9961 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9962 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9963 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9964
9965 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9966
9967 * merge.c (_bfd_merge_sections): Don't segfault if there
9968 is nothing to merge due to GC.
9969
9970 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9971
9972 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9973 symbols that have been forced local.
9974
9975 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9976 to output forced local syms for non-shared link.
9977 (elf_link_output_extsym): Tweak condition for calling backend
9978 adjust_dynamic_symbol so that previous behaviour is kept.
9979 Whitespace changes throughout file.
9980
9981 2002-03-04 H.J. Lu <hjl@gnu.org>
9982
9983 * elf.c (bfd_section_from_shdr): Handle special sections,
9984 .init_array, .fini_array and .preinit_array.
9985 (elf_fake_sections): Likewise.
9986
9987 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9988 DT entry only if the section is in output for .init_array,
9989 .fini_array and .preinit_array. Complain about .preinit_array
9990 section in DSO.
9991 (elf_bfd_final_link): Warn zero size for .init_array,
9992 .fini_array and .preinit_array sections.
9993
9994 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9995 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9996 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9997 .preinit_array.
9998
9999 2002-03-04 Alan Modra <amodra@bigpond.net.au>
10000
10001 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
10002 * configure: Regenerate.
10003
10004 2002-03-02 Tom Rix <trix@redhat.com>
10005
10006 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
10007 symbolic equiv.
10008 * coff-rs6000.c (xcoff_howto_table): Same.
10009
10010 2002-03-01 David Mosberger <davidm@hpl.hp.com>
10011
10012 * elflink.h (size_dynamic_sections): If section named
10013 ".preinit_array" exists, create DT_PREINIT_ARRAY and
10014 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
10015 ".init_array" and ".fini_array".
10016 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
10017 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
10018 DT_FINI_ARRAY.
10019
10020 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
10021
10022 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
10023 dynsyms.
10024
10025 2002-02-25 Alan Modra <amodra@bigpond.net.au>
10026
10027 * elf64-hppa.h: Update copyright date.
10028
10029 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
10030 (ppc64_elf_relocate_section): Don't generate power4 style branch
10031 hints for *_BRTAKEN and *_BRNTAKEN relocs.
10032
10033 2002-02-22 Jakub Jelinek <jakub@redhat.com>
10034
10035 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
10036 last patch.
10037 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10038
10039 2002-02-21 Andreas Jaeger <aj@suse.de>
10040
10041 * elf64-x86-64.c: Major rework that introduces all recent changes
10042 to the x86-64 backend. Get a closer match to elf32-i386.
10043 (struct elf64_x86_64_dyn_relocs): Rename from
10044 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
10045 all users.
10046 (struct elf64_x86_64_link_hash_table): Add short cuts to some
10047 sections.
10048 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
10049 remove casts, initialize new hash members.
10050 (create_got_section): New.
10051 (elf64_x86_64_create_dynamic_sections): New.
10052 (elf64_x86_64_copy_indirect_symbol): New.
10053 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
10054 relocs, .got or .relgot here but do it in allocate_dynrelocs.
10055 Reference count possible .plt and .got entries. Don't test input
10056 section SEC_READONLY here to try to avoid copy relocs, and keep
10057 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
10058 DF_TEXTREL here. Delay setting of variables until needed. Cache
10059 pointer to "sreloc" section in elf_section_data. Tweak condition
10060 under which .got created. Report files with bad relocation
10061 section names.
10062 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
10063 Reference count possible .plt entries. Don't deallocate .got and
10064 .relgot space here.
10065 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
10066 do copy reloc processing for weakdefs. Remove redundant casts and
10067 aborts. Delay setting of vars until needed. Move creation of
10068 dynamic symbols and allocation of .plt and .rela.plt to
10069 allocate_dynrelocs. Replace BFD_ASSERT with abort.
10070 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
10071 (allocate_dynrelocs): New.
10072 (readonly_dynrelocs): New.
10073 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
10074 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
10075 Zero out the dynamic allocated content space.
10076 (elf64_x86_64_discard_copies): Removed.
10077 (elf64_x86_64_relocate_section): Make use of dynamic section
10078 short-cuts. Localise vars, and delay setting. Better error
10079 reporting, replace BFD_ASSERT with abort. Check
10080 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
10081 regular object file and tread the weak definition as the normal
10082 one. Don't discard relocs for undefweak or undefined symbols and
10083 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
10084 relocs.
10085 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
10086 symbols that have been forced local. Use same test to decide if
10087 we can use a relative reloc for got as relocate_section. Expand
10088 SHN_UNDEF comment. Move expressions out of function calls.
10089 Replace BFD_ASSERT with abort.
10090 (bfd_elf64_bfd_final_link): Removed.
10091 (elf_backend_copy_indirect_symbol): Define.
10092
10093 2002-02-20 Tom Rix <trix@redhat.com>
10094
10095 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
10096 (_bfd_xcoff_reloc_type_lookup): Use it.
10097 * coff64-rs6000.c (xcoff64_howto_table): Same.
10098 (xcoff64_reloc_type_lookup): Same.
10099
10100 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
10101
10102 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
10103 little endian.
10104
10105 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
10106
10107 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
10108 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
10109 * bfd-in2.h: Regenerate.
10110 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
10111 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
10112 with "s390:64-bit".
10113 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
10114 (elf_s390_reloc_type_lookup): Likewise.
10115 (elf_s390_check_relocs): Likewise.
10116 (elf_s390_gc_sweep_hook): Likewise.
10117 (elf_s390_relocate_section): Likewise.
10118 (elf_s390_object_p): Use renamed architecture define.
10119 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
10120
10121 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
10122
10123 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
10124
10125 2002-02-19 Jakub Jelinek <jakub@redhat.com>
10126
10127 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
10128 absptr -> pcrel optimization for shared libs.
10129 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
10130 library cannot be converted to pcrel.
10131 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
10132 relative.
10133 * elf32-i386.c (elf_i386_relocate_section): If
10134 _bfd_elf_section_offset returned -2, skip, but make sure the
10135 relocation is installed.
10136 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
10137 * elf32-cris.c (cris_elf_relocate_section): Likewise.
10138 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
10139 * elf32-i370.c (i370_elf_relocate_section): Likewise.
10140 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
10141 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
10142 * elf32-s390.c (elf_s390_relocate_section): Likewise.
10143 * elf32-sh.c (sh_elf_relocate_section): Likewise.
10144 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
10145 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
10146 * elf64-s390.c (elf_s390_relocate_section): Likewise.
10147 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
10148 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
10149 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10150 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
10151 _bfd_elf_section_offset returning -2 the same way as -1.
10152 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
10153 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
10154 and BFD_ASSERT.
10155 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
10156
10157 2002-02-18 Tom Rix <trix@redhat.com>
10158
10159 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
10160 (bfd_xcoff_size_dynamic_sections): Same.
10161 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
10162 (bfd_xcoff_size_dynamic_sections): Same.
10163 * coff-rs6000.c (xcoff_generate_rtinit): Same.
10164 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
10165 * libxcoff.h (struct xcoff_backend_data_rec): Same.
10166 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
10167 * bfd-in2.h: Regenerate.
10168
10169 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10170
10171 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10172 (struct ppc_link_hash_table): Add sfpr.
10173 (ppc64_elf_link_hash_table_create): Init it.
10174 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10175 .glink out to..
10176 (create_linkage_sections): ..here. Make .sfpr too.
10177 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10178 dynobj early.
10179 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10180 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10181 ._restf* functions, and create as needed.
10182 (func_desc_adjust): Only force_local for shared libs.
10183
10184 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10185
10186 * configure.in: Bump version number post 2.12 branching.
10187 * configure: Regenerate.
10188
10189 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10190
10191 * mmo.c: Correct and improve comments.
10192 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10193 zero-pad. Use input to fill up non-empty bfd buffer.
10194 (mmo_flush_chunk): New function.
10195 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10196 changed. Don't emit location specifier if VMA is same as
10197 *LAST_VMAP after omitting leading zero contents. Call
10198 mmo_flush_chunk before emitting location specifier.
10199 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10200 with mmo_write_loc_chunk calls.
10201 (mmo_internal_write_section): Call mmo_flush_chunk after
10202 mmo_write_chunk.
10203 (mmo_write_symbols_and_terminator): Move :Main to first position
10204 in symbol array. Add faked one if it does not exist if there are
10205 other symbols. Don't add it if there are no symbols at all. Move
10206 out test for value of :Main from symbol loop. Rename table
10207 fakemain to maintable and variable mainsym to fakemain.
10208
10209 2002-02-15 Richard Henderson <rth@redhat.com>
10210
10211 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10212 section with no got matches any got. Simplify error generaion.
10213
10214 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10215
10216 Support arbitrary length fill patterns.
10217 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10218 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10219 Call default_data_link_order.
10220 (default_fill_link_order): Delete.
10221 (default_data_link_order): New function.
10222 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10223 of bfd_fill_link_order with bfd_data_link_order.
10224 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10225 * elf64-mips.c (mips_elf64_final_link): Likewise.
10226
10227 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10228 Correct value returned in "end" for "0x<non-hex>".
10229
10230 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10231
10232 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10233 (scan): Test against 'mach' field in info structure.
10234
10235 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10236
10237 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10238
10239 2002-02-14 Matt Fredette <fredette@netbsd.org>
10240
10241 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10242 EF_M68000.
10243
10244 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10245
10246 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10247 non-zero physical addresses when adjusting the LMAs of new
10248 sections.
10249
10250 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10251
10252 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10253 from _bfd_elf_hppa_gen_reloc_type.
10254 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10255 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10256 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10257 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10258
10259 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10260
10261 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10262 loading its contents if there's nothing to do in it.
10263
10264 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10265
10266 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10267 64k boundary.
10268
10269 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10270 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10271 (ppc64_elf_finish_dynamic_sections): Set values for them.
10272
10273 2002-02-11 Michael Snyder <msnyder@redhat.com>
10274
10275 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10276 * elf.c (elfcore_grok_pstatus): Add prototype.
10277 (elfcore_grok_lwpstatus): Add prototype.
10278 (elfcore_write_lwpstatus): New function.
10279 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10280
10281 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10282
10283 * elf32-sh.c: Added missing prototypes.
10284 * elf32-sh64.c: Likewise.
10285 (sh_elf_align_loads): Mark unused args as such.
10286 * elf64-sh64.c: Added missing prototypes.
10287 (struct elf_sh64_link_hash_entry): Fix typo.
10288 (sh_elf64_relocate_section): Fix info argument passed to
10289 _bfd_elf_section_offset.
10290
10291 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10292
10293 * Makefile.am: "make dep-am".
10294 * Makefile.in: Regenerate.
10295 * aclocal.m4: Regenerate.
10296 * config.in: Regenerate.
10297 * configure: Regenerate.
10298
10299 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10300
10301 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10302 variable warnings.
10303 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10304 comparison warning.
10305 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10306 cast warnings for the common case.
10307
10308 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10309
10310 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10311 vectors.
10312 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10313 vectors.
10314
10315 2002-02-09 Richard Henderson <rth@redhat.com>
10316
10317 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10318 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10319 (elf64_alpha_relocate_section): Likewise.
10320 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10321 * bfd-in2.h, libbfd.h: Rebuild.
10322
10323 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10324
10325 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10326 that base-plus-offset reloc accounting is consistent.
10327 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10328 up to date for undefined symbols.
10329
10330 2002-02-08 Eric Christopher <echristo@redhat.com>
10331
10332 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10333
10334 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10335 sections for the O32 ABI.
10336
10337 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10338
10339 * elf32-arm.h: Fix formatting of _("...").
10340 * elf32-d10v.c: Likewise.
10341 * elf32-m68k.c: Likewise.
10342 * elf32-mips.c: Likewise.
10343
10344 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10345
10346 * coff-or32.c: Fix compile time warning messages.
10347
10348 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10349
10350 Contribute sh64-elf.
10351 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10352 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10353 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10354 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10355 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10356 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10357 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10358 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10359 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10360 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10361 New relocs.
10362 * libbfd.h, bfd-in2.h: Rebuilt.
10363 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10364 (sh_reloc_map): Map them.
10365 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10366 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10367 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10368 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10369 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10370 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10371 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10372 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10373 datalabel_got_offset.
10374 (sh_elf_link_hash_newfunc): Initialize it.
10375 (sh_elf_relocate_section): Augment the scope of
10376 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10377 GOT and GOTOFF handling to new SHmedia relocation types. Support
10378 GOT_BIAS.
10379 (sh_elf_check_relocs): Likewise.
10380 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10381 PLT entries using movi_shori_putval. Support GOT_BIAS.
10382 (sh_elf_finish_dynamic_sections): Likewise.
10383 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10384 relocation, it's now done by the caller.
10385 (GOT_BIAS): New.
10386 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10387 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10388 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10389 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10390 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10391 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10392 sh64_elf64_hash_table): New.
10393 (sh_elf64_howto_table): Introduce new relocs.
10394 (sh_elf64_info_to_howto): Accept new PIC relocs.
10395 (sh_elf64_relocate_section): Augment the scope of
10396 seen_stt_datalabel. Support new PIC relocs.
10397 (sh_elf64_check_relocs): Support new PIC relocs.
10398 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10399 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10400 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10401 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10402 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10403 movi_shori_putval, movi_3shori_putval,
10404 sh64_elf64_create_dynamic_sections,
10405 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10406 sh64_elf64_size_dynamic_sections,
10407 sh64_elf64_finish_dynamic_symbol,
10408 sh64_elf64_finish_dynamic_sections): New.
10409 (elf_backend_create_dynamic-sections,
10410 bfd_elf64_bfd_link_hash_table_create,
10411 elf_backend_adjust_dynamic_symbol,
10412 elf_backend_size_dynamic_sections,
10413 elf_backend_finish_dynamic_symbol,
10414 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10415 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10416 elf_backend_got_header_size, elf_backend_plt_header_size):
10417 Define.
10418 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10419 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10420 match official numbers and names; moved unmaching ones to the
10421 range 0xf2-0xff.
10422 * elf32-sh64.c, elf64-sh64.c: Likewise.
10423 2001-03-12 DJ Delorie <dj@redhat.com>
10424 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10425 sections.
10426 2001-03-12 DJ Delorie <dj@redhat.com>
10427 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10428 be aligned.
10429 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10430 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10431 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10432 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10433 .cranges section with SEC_SORT_ENTRIES set.
10434 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10435 incoming sorted .cranges section.
10436 (sh64_bfd_elf_copy_private_section_data): New.
10437 (sh64_elf_final_write_processing): Only sort .cranges and modify
10438 start address if called by linker.
10439 2001-01-08 Ben Elliston <bje@redhat.com>
10440 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10441 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10442 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10443 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10444 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10445 line. Add comments before all entries.
10446 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10447 comment.
10448 (sh_elf64_reloc): Correct head comment.
10449 (sh_elf64_relocate_section): Correct spacing.
10450 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10451 instead call reloc_dangerous callback.
10452 <case R_SH_SHMEDIA_CODE>: New case.
10453 (sh_elf64_gc_mark_hook): Correct spacing.
10454 (sh_elf64_check_relocs): Ditto.
10455 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10456 New case.
10457 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10458 functions.
10459 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10460 clarify describing comment. Add comments before all entries.
10461 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10462 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10463 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10464 Sort .cranges section in final link. Prepare to set bit 0 on
10465 entry address.
10466 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10467 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10468 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10469 .cranges section.
10470 (sh64_backend_section_from_shdr): New, to recognize
10471 SHT_SH5_CR_SORTED on incoming .cranges section.
10472 (elf_backend_section_from_shdr): Define.
10473 (sh64_elf_final_write_processing): Sort outgoing .cranges
10474 section. (New, temporarily disabled:) Set bit 0 on entry address
10475 according to ISA type.
10476 (sh64_find_section_for_address): New.
10477 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10478 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10479 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10480 bfd_malloc, not xmalloc.
10481 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10482 global.
10483 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10484 temporarily disabled) setting bit 0 on entry address.
10485 (elf_backend_final_write_processing): Define.
10486 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10487 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10488 be a proper relocation for PTA and PTB rather than a marker.
10489 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10490 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10491 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10492 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10493 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10494 Zero src_mask.
10495 * elf64-sh64.c: Ditto.
10496 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10497 * elf32-sh64.c: Include opcodes/sh64-opc.h
10498 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10499 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10500 parameters. No unused parameters. Caller changed.
10501 <case R_SH_PT_16>: New case.
10502 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10503 * Makefile.in: Regenerate.
10504 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10505 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10506 all code sections.
10507 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10508 (sh64_elf_merge_private_data): Ditto.
10509 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10510 to access stored section flags.
10511 (sh64_elf_final_write_processing): Return immediately unless
10512 called by linker. Use sh64_elf_section_data (cranges) to get size
10513 of linker-generated cranges entries.
10514 (sh64_elf_copy_private_data): Add missing "return true".
10515 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10516 (sh_elf64_merge_private_data): Ditto.
10517 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10518 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10519 elf64-sh64.c:sh64_elf_fake_sections.
10520 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10521 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10522 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10523 (sh64_elf_final_write_processing): New.
10524 (elf_backend_final_write_processing): Define.
10525 (sh64_elf_fake_sections): Get header flags from tdata field.
10526 (sh64_elf_copy_private_data): Do not call
10527 sh64_elf_copy_private_data_internal, just copy e_flags field.
10528 (sh64_elf_merge_private_data): Do not call
10529 sh64_elf_copy_private_data_internal.
10530 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10531 Remove EF_SH64_ABI64, let ELF size make difference.
10532 Remove SH64-specific BFD section flag.
10533 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10534 containing SHmedia through elf_section_data (asect)->tdata
10535 non-zero, not using a BFD section flag.
10536 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10537 (sh64_elf_merge_private_data): Similar.
10538 (elf_backend_section_flags): Don't define.
10539 (sh64_elf_backend_section_flags): Delete.
10540 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10541 not EF_SH64_ABI64.
10542 (sh_elf64_merge_private_data): Similar.
10543 * section.c (Section flags definitions): Don't define
10544 SEC_SH_ISA_SHMEDIA.
10545 (bfd-in2.h): Regenerate.
10546 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10547 Make DataLabel references work with partial linking.
10548 * elf32-sh64.c: Fix formatting.
10549 (sh64_elf_link_output_symbol_hook): New.
10550 (elf_backend_link_output_symbol_hook): Define to
10551 sh64_elf_link_output_symbol_hook.
10552 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10553 undefined if partial linking. Adjust sanity check.
10554 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10555 (elf_backend_link_output_symbol_hook): Define to
10556 sh64_elf64_link_output_symbol_hook.
10557 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10558 undefined if partial linking. Adjust sanity check.
10559 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10560 Implement semantics for inter-file DataLabel references.
10561 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10562 (sh64_elf64_add_symbol_hook): New.
10563 (sh_elf64_relocate_section): If passing an indirect symbol with
10564 st_type STT_DATALABEL on the way to a symbol with st_other
10565 STO_SH5_ISA32, do not bitor 1 to the relocation.
10566 (elf_backend_add_symbol_hook): Define to
10567 sh64_elf64_add_symbol_hook.
10568 * elf64-sh32.c: Tweak comments.
10569 (DATALABEL_SUFFIX): Define.
10570 (sh64_elf_add_symbol_hook): New.
10571 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10572 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10573 symbol with st_type STT_DATALABEL on the way to a symbol with
10574 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10575 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10576 Pass through STT_DATALABEL.
10577 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10578 (elf_backend_get_symbol_type): Define.
10579 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10580 (elf_backend_get_symbol_type): Define.
10581 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10582 * elf32-sh64.c: Tweak comments.
10583 (sh64_elf_copy_private_data_internal): Add prototype.
10584 (bfd_elf32_bfd_set_private_flags): Define.
10585 (sh64_elf_copy_private_data_internal): Compare machine name, not
10586 textual BFD target name, to check whether to copy section flag
10587 SHF_SH5_ISA32.
10588 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10589 Tweak section-contents-type-mismatch message.
10590 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10591 Validize reloc-types.
10592 * elf64-sh64.c: New file.
10593 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10594 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10595 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10596 Regenerate dependencies.
10597 * Makefile.in: Regenerate.
10598 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10599 bfd_elf64_sh64l_vec.
10600 * configure.in: Handle bfd_elf64_sh64_vec and
10601 bfd_elf64_sh64l_vec.
10602 * configure: Regenerate.
10603 * po/POTFILES.in: Regenerate.
10604 * po/bfd.pot: Regenerate.
10605 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10606 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10607 anything else but EF_SH64 and EF_SH64_ABI64.
10608 (sh64_elf_merge_private_data): Emit error for anything else but
10609 EF_SH64 and EF_SH64_ABI64.
10610 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10611 from targ_selvecs.
10612 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10613 bfd_elf32_sh64l_vec as a temporary measure.
10614 * configure: Regenerate.
10615 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10616 * cpu-sh.c (arch_info_struct): Include sh5 item
10617 unconditionalized.
10618 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10619 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10620 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10621 * elf32-sh64.c: Tweak comments.
10622 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10623 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10624 (sh64_elf_copy_private_data_internal): Wrap long line.
10625 (sh64_elf_merge_private_data): Rewrite to allow objects from
10626 SH64 subsets to be linked together.
10627 (INCLUDE_SHMEDIA): Define.
10628 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10629 Parenthesize plus-expression inside or-expression.
10630 <global symbol>: Ditto.
10631 (sh_elf_set_mach_from_flags): Remove code refusing
10632 deleted EF_SH64_32BIT_ABI flag.
10633 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10634 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10635 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10636 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10637 (sh_elf_relocate_section) <local symbol>: Or 1 in
10638 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10639 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10640 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10641 relocation.
10642 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10643 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10644 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10645 Regenerate dependencies.
10646 * Makefile.in: Regenerate.
10647 * archures.c: Add bfd_mach_sh5.
10648 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10649 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10650 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10651 * configure: Regenerate.
10652 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10653 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10654 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10655 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10656 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10657 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10658 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10659 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10660 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10661 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10662 in item for SH5.
10663 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10664 for SHmedia relocs.
10665 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10666 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10667 shmedia_prepare_reloc, goto final_link_relocate if it returns
10668 non-zero, else fail as before.
10669 (sh_elf_set_mach_from_flags): Provide function only if not defined
10670 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10671 (sh_elf_set_private_flags): Provide function only if not defined
10672 as a macro.
10673 (sh_elf_copy_private_data): Similar.
10674 (sh_elf_merge_private_data): Similar.
10675 * section.c (SEC_SH_ISA_SHMEDIA): New.
10676 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10677 * elf32-sh64.c: New file.
10678 * libbfd.h: Regenerate.
10679 * bfd-in2.h: Regenerate.
10680 * po/POTFILES.in: Regenerate.
10681 * po/bfd.pot: Regenerate.
10682 * bfd-in2.h: Regenerate.
10683 * libbfd.h: Regenerate.
10684
10685 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10686
10687 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10688 been included, not drag it in.
10689 * bfd-in2.h: Regenerate.
10690
10691 2002-02-06 H.J. Lu (hjl@gnu.org)
10692
10693 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10694 the mach and ISA fields if necessary.
10695
10696 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10697
10698 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10699 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10700 be sure exactly which architecture this represents.
10701
10702 2002-02-05 Nick Clifton <nickc@redhat.com>
10703
10704 * po/tr.po: Updated translation.
10705
10706 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10707
10708 From Jimi X <jimix@watson.ibm.com>
10709 * archures (bfd_mach_ppc64): Define.
10710 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10711 (bfd_powerpc_arch): Define.
10712 * bfd-in2.h: Regenerate.
10713 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10714 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10715 (bfd_powerpc_archs): Add default powerpc64 arch.
10716
10717 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10718
10719 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10720 against section syms in readonly sections. Don't do the global
10721 sym check if we find one.
10722 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10723 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10724 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10725 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10726 (elf_s390_grok_prstatus): Add missing prototype.
10727
10728 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10729
10730 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10731 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10732 Call bfd_get_section_by_name only once. Initialize
10733 bpodata->n_bpo_relocs_this_section.
10734 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10735 referring to DSOs.
10736 (bpo_reloc_request_sort_fn): Don't use difference of values as
10737 return-value.
10738
10739 2002-02-02 David O'Brien <obrien@FreeBSD>
10740
10741 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10742 version 4.5 and later the same as 5-CURRENT.
10743 * configure: Re-generate.
10744
10745 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10746
10747 * config.bfd (hppa*-*-netbsd*): New target.
10748
10749 2002-01-31 Philipp Thomas <pthomas@suse.de>
10750
10751 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10752 to front of message. Unify messages with elf32-arm.h. Use
10753 commas where neccessary.
10754 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10755 ERROR in messages. Unify messages with coff-arm.c. Correct
10756 VFP/FPA error message.
10757 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10758 APCS-32 for translation.
10759
10760 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10761
10762 Perform on-demand global register allocation from
10763 R_MMIX_BASE_PLUS_OFFSET relocs.
10764 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10765 bpo_reloc_request, struct bpo_greg_section_info): New.
10766 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10767 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10768 _bfd_mmix_check_all_relocs,
10769 _bfd_mmix_prepare_linker_allocated_gregs,
10770 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10771 (elf_mmix_howto_table): Correct src_mask for most relocs.
10772 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10773 case.
10774 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10775 case. Fix typo in comment. New label do_mmix_reloc.
10776 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10777 store first object file with a base-plus-offset reloc. Call
10778 mmix_elf_check_common_relocs for the part common with mmo.
10779 (mmix_elf_final_link): Write out linker-allocated register
10780 contents section.
10781 (elf_backend_gc_sweep_hook): Define.
10782 (bfd_elf64_bfd_relax_section): Define.
10783
10784 * mmo.c: Don't include <ctype.h>
10785 (mmo_init): Correct init-once logic.
10786
10787 2002-02-01 Tom Rix <trix@redhat.com>
10788
10789 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10790
10791 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10792
10793 * Makefile.am: Run "make dep-am"
10794 * Makefile.in: Regenerate.
10795
10796 2002-01-31 David O'Brien <obrien@FreeBSD>
10797
10798 * configure.in: Recognize the differences in core files from FreeBSD
10799 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10800 5-CURRENT.
10801 * configure: Regenerate.
10802
10803 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10804
10805 * coff-or32.c: New file.
10806 * cpu-or32.c: New file.
10807 * elf32-or32.c: New file.
10808 * archures.c: Add support for or32.
10809 * targets.c: Add support for or32.
10810 * bfd-in2.h: Regenerate.
10811 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10812 coff_write_object_contents): Add support for or32.
10813 * config.bfd: Add target.
10814 * configure.in: Add support for or32.
10815 * configure: Regenerate.
10816 * Makefile.am: Add support for or32.
10817 * Makefile.in: Regenerate.
10818 * po/SRC-POTFILES.in: Add or32 files.
10819 * po/bfd.pot: Regenerate.
10820
10821 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10822 Don Lindsay <lindsayd@cisco.com>
10823
10824 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10825 false' with a return of a bfd_reloc_ error code.
10826
10827 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10828
10829 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10830 unexport unreferenced symbols when --export-dynamic. Call
10831 _bfd_elf_strtab_delref when unexporting.
10832
10833 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10834
10835 * bfd-in.h: Include <stdbool.h> if it is available.
10836 * bfd-in2.h: Regenerated.
10837
10838 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10839
10840 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10841 not go via the plt.
10842
10843 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10844
10845 * archures.c: Tidy up formatting of embedded comments.
10846 * bfd.c: Tidy up formatting of embedded comments.
10847 * bfd-in.h: Fix formatting of comments.
10848 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10849 * section.c: Tidy up formatting of embedded comments.
10850 * syms.c: Tidy up formatting of embedded comments.
10851 * targets.c: Tidy up formatting of embedded comments.
10852
10853 * bfd-in2.h: Regenerate.
10854
10855 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10856
10857 * vms-tir.c (cmd_name): New function.
10858 (tir_cmd_name): New function.
10859 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10860 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10861 Fix formatting.
10862
10863 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10864 translation.
10865 (pe_print_pdata): Rearrange message to aid in translation.
10866
10867 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10868 translation.
10869
10870 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10871
10872 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10873
10874 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10875 message to aid in translation.
10876
10877 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10878 to aid in translation.
10879
10880 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10881
10882 2002-01-30 Philipp Thomas <pthomas@suse.de>
10883
10884 * coff-arm.c, elf32-elf.h: Unify messages.
10885
10886 2002-01-30 Nick Clifton <nickc@redhat.com>
10887
10888 * po/sv.po: Updated translation.
10889
10890 2002-01-30 Philipp Thomas <pthomas@suse.de>
10891
10892 * dwarf2.c (read_abbrev): Use full section name in error message.
10893 (decode_line_info): Likewise.
10894
10895 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10896 message.
10897
10898 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10899
10900 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10901 descriptor symbols for undefined function code syms. Clear
10902 ELF_LINK_NON_ELF so that they can stay weak.
10903
10904 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10905 Mitch Lichtenberg <mpl@broadcom.com>
10906
10907 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10908 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10909 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10910 generation.
10911 * bfd-in2.h: Regenerate.
10912
10913 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10914
10915 * elf32-mips.c: Add additional comments about HI16 relocation
10916 processing.
10917 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10918 pc-relative relocations. (Reverts change made on 2001-10-31.)
10919 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10920 for pc-relative relocations.
10921 (mips_elf_calculate_relocation): Add a comment about a kludge
10922 in the R_MIPS_GNU_REL_HI16 handling.
10923 (_bfd_mips_elf_relocate_section): Implement that kludge;
10924 adjust pc-relative HI16 relocation for difference in HI16 and
10925 LO16 addresses, since it can't easily be done in
10926 mips_elf_calculate_relocation.
10927
10928 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10929
10930 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10931 relocations with PC32 relocations for undefined or weak symbols.
10932 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10933 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10934
10935 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10936
10937 * elfcore.h (elf_core_file_p): Improve comment for last change.
10938
10939 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10940
10941 * configure: Regenerated.
10942
10943 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10944
10945 * elfcore.h (elf_core_file_p): Set the machine architecture
10946 before processing the program headers.
10947
10948 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10949
10950 * configure.in <64-bit configuration>: If using gcc, check and
10951 emit error for egcs-1.1.2.
10952 * configure: Regenerate.
10953
10954 2002-01-26 Egor Duda <deo@logos-m.ru>
10955
10956 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10957 as possible to avoid stack corruption.
10958
10959 2002-01-26 Richard Henderson <rth@redhat.com>
10960
10961 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10962 for non-allocated sections.
10963
10964 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10965
10966 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10967 prstat.pr_reg even if it is a struct.
10968
10969 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10970
10971 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10972
10973 2002-01-25 Philipp Thomas <pthomas@suse.de>
10974
10975 * coffgen.c (coff_print_symbol): Don't mark info message
10976 for translation.
10977
10978 2002-01-25 Nick Clifton <nickc@redhat.com>
10979
10980 * po/fr.po: Updated translation.
10981 * po/es.po: Updated translation.
10982
10983 2002-01-25 Philipp Thomas <pthomas@suse.de>
10984
10985 * coff-alpha.c (alpha_relocate_section): Unify warning message
10986 for GP relative relocations without GP defined.
10987 * coff-mips.c (mips_relocate_section): Likewise.
10988
10989 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10990
10991 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10992 unsigned overflow when new_offset < old_offset.
10993
10994 2002-01-24 Philipp Thomas <pthomas@suse.de>
10995
10996 * bfd.c (_bfd_abort): Fix typo.
10997
10998 2002-01-23 Richard Henderson <rth@redhat.com>
10999
11000 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
11001 plt entries for undefweak symbols.
11002
11003 2002-01-23 Steve Ellcey <sje@cup.hp.com>
11004
11005 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
11006 (bfd_elf64_ia64_hpux_big_vec): Ditto.
11007 (bfd_elf32_h8300_vec): Ditto.
11008
11009 2002-01-23 Alan Modra <amodra@bigpond.net.au>
11010
11011 * elf64-ppc.c: Remove stale part of ABI comment.
11012 (NO_OPD_RELOCS): Define.
11013 (ppc64_elf_check_relocs): Use it.
11014 (ppc64_elf_relocate_section): Here too.
11015 (build_one_stub): Don't point function syms at the stub. Instead,
11016 hijack plt.offset.
11017 (ppc64_elf_relocate_section): Check whether REL24 relocs should
11018 really go to the stub. Make all dynamic relocs in opd against
11019 locals.
11020 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
11021 plt.offset.
11022
11023 2002-01-22 Richard Henderson <rth@redhat.com>
11024
11025 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
11026
11027 2002-01-22 Alan Modra <amodra@bigpond.net.au>
11028
11029 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
11030 TOC_BASE_OFF adjustment.
11031
11032 * Makefile.am: Run "make dep-am".
11033 * Makefile.in: Regenerate.
11034 * po/SRC-POTFILES.in: Regenerate.
11035
11036 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
11037
11038 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
11039 host defines.
11040
11041 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
11042
11043 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
11044 Check for and emit error if sgot is NULL at this point.
11045
11046 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
11047
11048 * config.bfd (ia64*-*-netbsd*): New target.
11049
11050 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
11051
11052 * som.c (som_write_space_strings): Comment typo fix.
11053
11054 2002-01-21 Alan Modra <amodra@bigpond.net.au>
11055
11056 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
11057 is_func_descriptor fields.
11058 (link_hash_newfunc): Init them.
11059 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
11060 dot are candidates for plt entries. When processing .opd relocs,
11061 set function descriptor strings to point inside function code
11062 string, and set new ppc_link_hash_entry fields.
11063 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
11064 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
11065 function descriptors. It's now done in..
11066 (func_desc_adjust): New.
11067 (ppc64_elf_func_desc_adjust): New.
11068 (define elf_backend_always_size_sections): Define.
11069 (ppc64_elf_hide_symbol): New.
11070 (define elf_backend_hide_symbol): Define.
11071 (allocate_dynrelocs): Remove code looking up function descriptors
11072 as that has been done earlier.
11073 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
11074 table.
11075 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
11076 up function descriptor.
11077 (build_one_stub): Look up the function code sym. Check for
11078 invalid plt offsets.
11079 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
11080 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
11081
11082 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
11083 boolean param.
11084 (_bfd_elf_link_hash_hide_symbol): Likewise.
11085 * elflink.h (elf_link_add_object_symbols): Adjust call to
11086 elf_backend_hide_symbol.
11087 (elf_fix_symbol_flags): Likewise.
11088 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
11089 than bfd_alloc.
11090 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
11091 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
11092 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
11093 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
11094 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
11095 and adjust to suit.
11096 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
11097 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
11098 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
11099
11100 2002-01-18 Alan Modra <amodra@bigpond.net.au>
11101
11102 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
11103 dynamic function descriptor symbol, not the associated function
11104 symbol.
11105
11106 2002-01-17 Eric Christopher <echristo@redhat.com>
11107
11108 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
11109
11110 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
11111
11112 * po/bfd.pot: Regenerate.
11113 * po/fr.po: Regenerate.
11114
11115 2002-01-17 Alan Modra <amodra@bigpond.net.au>
11116
11117 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
11118 Remove "Elf_Internal_Shdr *" param.
11119 (_bfd_mips_elf_section_from_bfd_section): Ditto.
11120 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
11121 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
11122 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
11123 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
11124 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
11125 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
11126 function to override special sections. Remove hdr arg from
11127 backend call, and don't loop.
11128
11129 2002-01-16 Eric Christopher <echristo@redhat.com>
11130
11131 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
11132 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
11133 relocations requiring gp0 and gp.
11134
11135 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
11136
11137 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
11138 EF_ARM_VFP_FLOAT.
11139 (elf32_arm_print_private_bfd_data): Likewise.
11140
11141 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
11142
11143 * po/tr.po: Import new version.
11144
11145 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11146
11147 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
11148 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
11149 (ORI_R0_R0_0): Correct.
11150
11151 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11152
11153 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
11154 when plt_not_loaded.
11155 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
11156 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
11157 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
11158 (ppc64_elf_glink_code): Delete.
11159 (PPC64_ELF_GLINK_SIZE): Delete.
11160 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
11161 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
11162 ORI_R0_R0_0): Define.
11163 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
11164 (struct ppc_link_hash_table): Add sstub and plt_overflow.
11165 (ppc64_elf_link_hash_table_create): Init them.
11166 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
11167 Don't copy to shared lib.
11168 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11169 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11170 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11171 room for .stub and .glink code.
11172 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11173 DT_PPC64_GLINK.
11174 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11175 bfd_elf64_bfd_final_link.
11176 (bfd_elf64_bfd_final_link): Don't define.
11177 (ppc64_elf_size_stubs): New.
11178 (build_plt_stub): New.
11179 (build_one_stub): New.
11180 (ppc64_elf_build_stubs): New.
11181 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11182 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11183 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11184 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11185 case output sections not separate. Adjust DT_RELASZ to not
11186 include plt relocs. Set reserved got entry. Set got and plt
11187 entry size.
11188 (elf_backend_got_header_size): Set to 8.
11189 * elf64-ppc.h: New file.
11190
11191 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11192
11193 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11194 sections, use bfd_section_list_remove.
11195 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11196 * elflink.h (elf_link_add_object_symbols): When removing all
11197 sections, use bfd_section_list_clear.
11198
11199 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11200
11201 * po/sv.po: New file: Swedish translation.
11202 * configure.in (ALL_LINGUAS): Add sv.
11203 * configure: Regenerate.
11204
11205 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11206
11207 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11208 * elf.c (merge_sections_remove_hook): New function.
11209 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11210 _bfd_merge_sections.
11211 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11212 * libbfd.h: Rebuilt.
11213 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11214 Call remove_hook if a SEC_EXCLUDE section is encountered.
11215
11216 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11217
11218 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11219 (xstormy16_reloc_map): Initialise new field with correct howto
11220 table.
11221 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11222 howto entry.
11223
11224 2002-01-10 Michael Snyder <msnyder@redhat.com>
11225
11226 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11227 (elfcore_write_pstatus): Use long instead of pid_t;
11228 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11229
11230 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11231
11232 * elf.c: Update copyright years.
11233 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11234 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11235
11236 2002-01-08 Michael Snyder <msnyder@redhat.com>
11237
11238 Add capability to write corefile note sections, for gdb.
11239 * elf.c (elfcore_write_note): New function.
11240 (elfcore_write_prpsinfo): New function.
11241 (elfcore_write_prstatus): New function.
11242 (elfcore_write_pstatus): New function.
11243 (elfcore_write_prfpreg): New function.
11244 (elfcore_write_prxfpreg): New function.
11245 * elf-bfd.h: Add prototypes for above functions.
11246
11247 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11248
11249 * elf.c (elf_fake_sections): Propagate errors from
11250 elf_backend_fake_section.
11251
11252 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11253
11254 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11255 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11256 (elf32-sh-nbsd.lo): New rule.
11257 * Makefile.in: Regenerate.
11258 * config.bfd (sh*le-*-netbsdelf*): New target.
11259 (sh*-*-netbsdelf*): New target.
11260 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11261 (bfd_elf32_shnbsd_vec): New vector.
11262 (bfd_elf32_shlnbsd_vec): New vector.
11263 * configure: Regenerate.
11264 * elf32-sh-nbsd.c: New file.
11265 * targets.c: Update copyright years.
11266 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11267 bfd_elf32_shnbsd_vec.
11268
11269 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11270
11271 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11272
11273 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11274
11275 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11276 of a symbol in a section that will be deleted.
11277
11278 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11279
11280 * po/es.po: New file: Spanish translation.
11281 * configure.in (ALL_LINGUAS): Add es.
11282 * configure: Regenerate.
11283
11284 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11285
11286 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11287 argument so we can handle HP-UX specially.
11288 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11289 (elfNN_hpux_backend_section_from_bfd_section): New for support
11290 of SHN_IA_64_ANSI_COMMON.
11291 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11292 (is_unwind_section_name): Add special HP-UX support.
11293 (elfNN_ia64_section_from_shdr): Add support for more sections.
11294 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11295 add support for more sections.
11296 (elfNN_ia64_additional_program_headers): Modify
11297 is_unwind_section_name call.
11298 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11299 only one unwind section in segment.
11300
11301 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11302
11303 * syms.c (_bfd_generic_make_empty_symbol): New function.
11304 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11305 _bfd_generic_make_empty_symbol.
11306 * libbfd.h: Regenerate.
11307 * bfd-in2.h: Regenerate.
11308 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11309 (hppabsd_core_get_symtab_upper_bound): Don't define.
11310 (hppabsd_core_get_symtab): Likewise.
11311 (hppabsd_core_print_symbol): Likewise.
11312 (hppabsd_core_get_symbol_info): Likewise.
11313 (hppabsd_core_bfd_is_local_label_name): Likewise.
11314 (hppabsd_core_get_lineno): Likewise.
11315 (hppabsd_core_find_nearest_line): Likewise.
11316 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11317 (hppabsd_core_read_minisymbols): Likewise.
11318 (hppabsd_core_minisymbol_to_symbol): Likewise.
11319 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11320 Formatting fixes.
11321 * hpux-core.c: Similarly.
11322 * irix-core.c: Similarly.
11323 * osf-core.c: Similarly.
11324 * sco5-core.c: Similarly.
11325 * binary.c (binary_make_empty_symbol): Remove function, define as
11326 _bfd_generic_make_empty_symbol.
11327 * ihex.c (ihex_make_empty_symbol): Likewise.
11328 * mmo.c (mmo_make_empty_symbol): Likewise.
11329 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11330 * srec.c (srec_make_empty_symbol): Likewise.
11331 * versados.c (versados_make_empty_symbol): Likewise.
11332 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11333 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11334 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11335 rather than _bfd_vms_make_empty_symbol.
11336 * vms-misc.c (new_symbol): Likewise.
11337
11338 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11339
11340 * section.c (bfd_section_init): Remove unnecessary initialisations.
11341 (bfd_section_list_clear): New function.
11342 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11343 (_bfd_strip_section_from_output): Use them.
11344 * coffcode.h (coff_set_alignment_hook): Likewise.
11345 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11346 * elf64-mips.c (mips_elf64_final_link): Likewise.
11347 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11348 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11349 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11350 * bfd-in2.h: Regenerate.
11351
11352 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11353 rather than doing our own section handling. Clean up after errors
11354 with bfd_release and bfd_section_list_clear. Handle unexpected
11355 flags.
11356 * aoutf1.h (sunos4_core_file_p): Likewise.
11357 * aix386-core.c (aix386_core_file_p): Likewise.
11358 * cisco-core.c (cisco_core_file_validate): Likewise.
11359 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11360 * trad-core.c (trad_unix_core_file_p): Likewise.
11361
11362 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11363 with bfd_release and bfd_section_list_clear.
11364 * hpux-core.c (hpux_core_core_file_p): Likewise.
11365 * irix-core.c (irix_core_core_file_p): Likewise.
11366 * lynx-core.c (lynx_core_file_p): Likewise.
11367 * osf-core.c (osf_core_core_file_p): Likewise.
11368 * rs6000-core.c (rs6000coff_core_p): Likewise.
11369 * sco5-core.c (sco5_core_file_p): Likewise.
11370
11371 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11372 sign extension adjustments without conditionals.
11373
11374 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11375
11376 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11377 CIE at .eh_frame start is removed due to no FDEs referencing it.
11378
11379 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11380
11381 * config.bfd (x86_64-*-netbsd*): New target.
11382 * configure.in (x86_64-*-netbsd*): Set COREFILE
11383 to netbsd-core.lo.
11384 * configure: Regenerated.
11385
11386 2002-01-03 Tom Rix <trix@redhat.com>
11387
11388 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11389 for recent bfd_make_section_anyway change.
11390
11391 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11392
11393 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11394 R_ARM_THM_PC11 reloc.
11395
11396 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11397
11398 * configure.in (LINGUAS): Add ja.
11399 * configure: Regenerate.
11400 * po/ja.po: Import from translation project's web site.
11401
11402 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11403
11404 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11405 messages to ease translation into other languages.
11406
11407 For older changes see ChangeLog-0001
11408 \f
11409 Local Variables:
11410 mode: change-log
11411 left-margin: 8
11412 fill-column: 74
11413 version-control: never
11414 End: