daily update
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-12-08 Richard Sandiford <rsandifo@redhat.com>
2
3 * elfxx-mips.h, elfxx-mips.c, cpu-mips.c: Convert prototypes.
4 Remove casts that were only needed for K&R compatibility.
5
6 2003-12-08 Alan Modra <amodra@bigpond.net.au>
7
8 * elf-bfd.h (struct elf_backend_data): Remove "bfd *" and add
9 "elflink_hash_entry *" param to elf_backend_link_output_symbol_hook.
10 Add "elflink_hash_entry *" param to elf_backend_output_arch_syms.
11 * elflink.h (elf_link_output_sym): Add "elflink_hash_entry *" param,
12 and pass to output_symbol_hook.
13 (elf_bfd_final_link): Adjust elf_link_output_sym calls.
14 (elf_link_output_extsym): Likewise.
15 (elf_link_input_bfd): Likewise.
16 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Adjust.
17 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
18 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
19 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
20 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
21 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
22 * elf64-sparc.c (sparc64_elf_output_arch_syms): Likewise.
23 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
24 Validate dynh->h against h.
25 * elf64-ppc.c (struct ppc_link_hash_entry): Add adjust_done bitfield.
26 (link_hash_newfunc): Init it.
27 (adjust_opd_syms): New function.
28 (ppc64_elf_edit_opd): Set adjust_done when global .opd sym adjusted.
29 Set opd.adjust for all .opd relocs. Call adjust_opd_syms.
30 (ppc64_elf_tls_optimize): Adjust possible .opd sym values here.
31 (ppc64_elf_relocate_section): Also adjust syms not a multiple of 24.
32 (ppc64_elf_output_symbol_hook): New function.
33 (elf_backend_link_output_symbol_hook): Define.
34
35 2003-12-07 Richard Sandiford <rsandifo@redhat.com>
36
37 * elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
38 Remove casts that were only needed for K&R compatibility.
39
40 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
41
42 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
43 partial_inplace for these relocs to FALSE for comptability with
44 the MS linker.
45 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
46 generated by MS linker, and brings the relocation in line the MS
47 PE documentation.
48
49 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
50
51 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
52
53 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
54
55 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
56 need_relax_finalize field in link_info instead of
57 relax_finalizing to check if the relax finalize pass is being
58 done.
59
60 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
61
62 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
63 Change ARM26* to ARM_26* in comments to match definitions.
64 (coff_arm_adjust_symndx): Replace hard-coded constants with
65 appropriate definitions (ARM_26*).
66
67 2003-12-04 Alan Modra <amodra@bigpond.net.au>
68
69 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
70 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
71 (mn10300_elf_relax_section): Likewise.
72 * nlm32-alpha.c (ONES): Define.
73 (nlm32_alpha_howto_table): Use it to avoid warnings.
74
75 2003-12-04 Alan Modra <amodra@bigpond.net.au>
76
77 * elf32-i386.c (elf_i386_object_p): Delete.
78 (elf_backend_object_p): Don't define.
79 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
80 * elf32-sh.c (sh_elf_object_p): Likewise.
81 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
82 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
83 * elf64-s390.c (elf_s390_object_p): Likewise.
84 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
85
86 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
87
88 * archures.c (bfd_mach_m32r2): Add new machine type.
89 * bfd-in2.h: Regenerate.
90 * cpu-m32r.c : Add new machine type.
91 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
92 m32r_elf_merge_private_bfd_data): Add support for new machine
93 type.
94
95 2003-12-03 Dave Airlie <airlied@linux.ie>
96
97 * config.bfd: Add vax-linux-gnu target.
98 * configure.in: Likewise.
99 * configure: Regenerate.
100
101 2003-12-03 Alan Modra <amodra@bigpond.net.au>
102
103 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
104 bfd_link_hash_entry field "next" -> "und_next".
105 * linker.c (_bfd_link_hash_newfunc): Likewise.
106 (bfd_link_add_undef): Likewise.
107 (_bfd_generic_link_add_archive_symbols): Likewise.
108 (_bfd_generic_link_add_one_symbol): Likewise.
109 * xcofflink.c (xcoff_link_add_symbols): Likewise.
110
111 2003-12-02 Nick Clifton <nickc@redhat.com>
112
113 * configure.in (ALL_LINGUAS): Add ro.
114 * po/ro.po: New Romanian translation.
115
116 2003-12-02 Alan Modra <amodra@bigpond.net.au>
117
118 * Makefile.am: Run "make dep-am".
119 * Makefile.in: Regenerate.
120
121 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
122
123 * coffcode.h (coff_compute_section_file_positions): Set page_size
124 to 1 instead of 0 in the case file alignment value is zero.
125
126 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
127
128 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
129 * coff64-rs6000.c: Likewise.
130 * coffcode.h: Likewise.
131 * elf32-vax.c: Likewise.
132 * hash.c: Likewise.
133 * hppabsd-core.c: Likewise.
134 * hpux-core.c: Likewise.
135 * ihex.c: Likewise.
136 * netbsd-core.c: Likewise.
137 * osf-core.c: Likewise.
138 * pdp11.c: Likewise.
139 * ptrace-core.c: Likewise.
140 * sco5-core.c: Likewise.
141 * section.c: Likewise.
142 * sunos.c: Likewise.
143 * trad-core.c: Likewise.
144
145 2003-12-01 Alan Modra <amodra@bigpond.net.au>
146
147 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
148 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
149 (_bfd_elf_link_just_syms): Likewise.
150 (bfd_elf_get_needed_list): Likewise.
151 (bfd_elf_get_runpath_list): Likewise.
152 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
153 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
154 creator flavour.
155 (elf32_hppa_set_gp): Look up output sections rather than using htab.
156 * elf32-i960.c: Comment fix. Formatting.
157 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
158 rather than testing creator flavour.
159 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
160 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
161 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
162 is_elf_hash_table change. Remove redundant test.
163 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
164 testing creator flavour.
165 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
166 (_bfd_elf_fix_symbol_flags): Likewise.
167 (_bfd_elf_adjust_dynamic_symbol): Likewise.
168 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
169 checks. Use is_elf_hash_table rather than testing creator flavour.
170 Use hash_table throughout in place of info->hash.
171 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
172 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
173 check.
174 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
175 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
176 testing creator flavour.
177 (elf_gc_sections): Add is_elf_hash_table check.
178 (elf_gc_common_finalize_got_offsets): Likewise.
179 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
180 redundant check.
181 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
182 rather than testing creator flavour.
183
184 2003-11-28 Christian Groessler <chris@groessler.org>
185
186 * cpu-z8k.c: Convert to ISO C90.
187 * coff-z8k.c: Likewise.
188
189 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
190
191 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
192 Add link info argument.
193 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
194 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
195 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
196 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
197 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
198 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
199 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
200 * elf.c (assign_file_positions_except_relocs,
201 assign_file_positions_for_segments): Likewise. Adjust calls.
202
203 2003-11-27 Mark Kettenis <kettenis@gnu.org>
204
205 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
206 of the note.
207
208 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
209 Richard Sandiford <rsandifo@redhat.com>
210
211 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
212 (mips_elf_set_no_stub): New function.
213 (mips_elf_multi_got): Call it.
214 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
215 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
216 use mips_elf_create_dynamic_relocation to deal with any compatibility
217 issues. Store the adjusted addend in the GOT slot.
218
219 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
220
221 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
222 procesing N_BINCL stabs.
223
224 2003-11-25 Alan Modra <amodra@bigpond.net.au>
225
226 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
227 ppc_stub_plt_call to symbols defined in shared libs.
228
229 2003-11-22 Jakub Jelinek <jakub@redhat.com>
230
231 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
232 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
233 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
234 (elf_i386_check_relocs): Set it.
235 (elf_i386_finish_dynamic_symbol): If it is not set,
236 clear st_value of SHN_UNDEF symbol.
237
238 2003-11-20 Jim Blandy <jimb@redhat.com>
239
240 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
241 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
242
243 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
244
245 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
246 section for reloc output and subtract the output section's address
247 from the addend when converting a relocation into one against a
248 section symbol.
249 * elf64-s390.c (elf_s390_relocate_section): Likewise.
250
251 2003-11-18 James E Wilson <wilson@specifixinc.com>
252
253 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
254 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
255 for ia64_info->rel_fptr_sec.
256
257 2003-11-18 Alan Modra <amodra@bigpond.net.au>
258
259 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
260 size is zero.
261
262 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
263
264 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
265 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
266 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
267 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
268 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
269 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
270 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
271 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
272 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
273 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
274 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
275 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
276 (elf_backend_copy_indirect_symbol): Don't define.
277
278 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
279
280 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
281 GOT entries.
282
283 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
284
285 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
286 to R_390_RELATIVE. Convert the other relocations against local
287 symbols to relocations against the start of the section.
288 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
289 to R_390_RELATIVE. Convert the other relocations against local
290 symbols to relocations against the start of the section.
291
292 2003-11-11 Nick Clifton <nickc@redhat.com>
293
294 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
295 info->executable not info->shared to decide if a .interp section
296 should be present.
297 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
298 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
299 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
300 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
301 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
302 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
303 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
304 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
305 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
306 * elflink.h (size_dynamic_sections): Likewise.
307
308 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
309
310 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
311 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
312 found initialise the tls data directory entry.
313
314 2003-11-07 Alan Modra <amodra@bigpond.net.au>
315
316 * elf32-ppc.c (ppc_elf_install_value): Delete.
317 (shared_stub_entry, stub_entry): Make them arrays of ints.
318 Remove initial branch.
319 (ppc_elf_relax_section): Write one branch around all trampolines
320 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
321 branch range check. Only use shared_stub_entry when shared.
322 Test that branches can reach stubs. Write trampolines out at
323 end so that just one realloc is used. Handle little-endian
324 mode. Move relevant code from ppc_elf_install_value to here.
325 (ppc_elf_relocate_section): Move code handling RELAX32 from
326 ppc_elf_install_value to here.
327
328 2003-11-06 Alan Modra <amodra@bigpond.net.au>
329
330 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
331 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
332 cases.
333 (shared_stub_entry): Correct opcode.
334 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
335 (ppc_elf_relocate_section): Handle them.
336
337 2003-11-05 Alan Modra <amodra@bigpond.net.au>
338
339 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
340 updated section in case of merged section.
341 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
342 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
343 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
344 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
345 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
346 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
347 * elf32-cris.c (cris_elf_relocate_section): Likewise.
348 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
349 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
350 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
351 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
352 * elf32-i370.c (i370_elf_relocate_section): Likewise.
353 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
354 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
355 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
356 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
357 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
358 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
359 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
360 * elf32-s390.c (elf_s390_relocate_section): Likewise.
361 * elf32-sh.c (sh_elf_relocate_section): Likewise.
362 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
363 * elf32-v850.c (v850_elf_relocate_section) Likewise.
364 * elf32-vax.c (elf_vax_relocate_section): Likewise.
365 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
366 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
367 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
368 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
369 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
370 * elf64-s390.c (elf_s390_relocate_section): Likewise.
371 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
372 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
373 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
374 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
375
376 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
377 section for reloc output.
378 * elf32-i370.c (i370_elf_relocate_section): Likewise.
379 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
380 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
381 * elf32-vax.c (elf_vax_relocate_section): Likewise.
382 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
383 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
384
385 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
386 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
387 return value.
388 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
389 sec->id.
390
391 2003-11-05 Alan Modra <amodra@bigpond.net.au>
392
393 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
394 (elf32_d10v_relocate_section): Use them to handle -r reloc
395 adjustments, and in place of _bfd_elf_rela_local_sym.
396
397 * cpu-iq2000.c (arch_info_struct): Warning fix.
398
399 2003-11-05 Alan Modra <amodra@bigpond.net.au>
400
401 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
402 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
403 weakdefs.
404 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
405 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
406 NON_GOT_REF.
407 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
408 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
409 non-default visibility.
410 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
411 SYMBOL_CALLS_LOCAL.
412
413 2003-11-04 Alan Modra <amodra@bigpond.net.au>
414
415 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
416 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
417 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
418 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
419 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
420 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
421 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
422
423 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
424 "dereferencing type-punned pointer" warnings.
425
426 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
427 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
428 * bfd-in2.h: Regenerate.
429 * binary.c (binary_set_section_contents): Ditto.
430 * bout.c (b_out_set_section_contents): Ditto.
431 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
432 * coffcode.h (coff_set_section_contents): Ditto.
433 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
434 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
435 * elf.c (_bfd_elf_set_section_contents): Ditto.
436 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
437 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
438 * i386msdos.c (msdos_set_section_contents): Ditto.
439 * ieee.c (ieee_set_section_contents): Ditto.
440 * ihex.c (ihex_set_section_contents): Ditto.
441 * libaout.h (NAME(aout,set_section_contents)): Ditto.
442 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
443 (_bfd_generic_set_section_contents): Ditto.
444 * libbfd.h: Regenerate.
445 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
446 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
447 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
448 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
449 * mmo.c (mmo_set_section_contents): Ditto.
450 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
451 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
452 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
453 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
454 * nlmcode.h (nlm_set_section_contents): Ditto.
455 * oasys.c (oasys_set_section_contents): Ditto.
456 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
457 * ppcboot.c (ppcboot_set_section_contents): Ditto.
458 * srec.c (srec_set_section_contents): Ditto.
459 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
460 * tekhex.c (tekhex_set_section_contents): Ditto.
461 (move_section_contents): Ditto.
462 * versados.c (versados_set_section_contents): Ditto.
463 * vms-misc.c (_bfd_save_vms_section): Ditto.
464 * vms.c (vms_set_section_contents): Ditto.
465 * vms.h (_bfd_save_vms_section): Ditto.
466
467 2003-11-04 Alan Modra <amodra@bigpond.net.au>
468
469 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
470 rather than htab.
471 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
472 relbrlt size.
473 (ppc64_elf_build_stubs): Allocate space for relbrlt.
474
475 2003-11-04 Alan Modra <amodra@bigpond.net.au>
476
477 * bfd-in.h (_bfd_elf_tls_setup): Declare.
478 * bfd-in2.h: Regenerate.
479 * elf-bfd.h (struct elf_link_tls_segment): Delete.
480 (struct elf_link_hash_table): Add tls_sec and tls_size.
481 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
482 * elflink.c (_bfd_elf_tls_setup): New function.
483 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
484 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
485 saving tls segment info, round segment size up.
486 (elf_link_output_extsym): Adjust code using tls segment info.
487 (elf_link_input_bfd): Likewise.
488 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
489 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
490 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
491 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
492 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
493 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
494 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
495 (elfNN_ia64_dtprel_base): Likewise.
496 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
497 (alpha_get_tprel_base): Likewise.
498 (struct alpha_relax_info): Remove tls_segment.
499 (elf64_alpha_relax_got_load): Adjust invocation of
500 alpha_get_dtprel_base and alpha_get_tprel_base.
501 (elf64_alpha_relax_tls_get_addr): Likewise.
502 (elf64_alpha_relax_section): Likewise.
503 (elf64_alpha_relocate_section): Likewise.
504 (elf64_alpha_relax_find_tls_segment): Delete.
505 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
506 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
507 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
508 * elf32-ppc.h (ppc_elf_tls_setup): Update.
509 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
510 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
511 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
512 (ppc64_elf_relocate_section): Likewise.
513 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
514
515 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
516
517 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
518 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
519 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
520 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
521 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
522 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
523 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
524 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
525 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
526 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
527 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
528 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
529 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
530 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
531 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
532 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
533 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
534 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
535 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
536 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
537 * elfxx-target.h (elf_backend_plt_header_size): Don't define
538 or include in target initializer.
539
540 2003-11-03 Andrew Cagney <cagney@redhat.com>
541
542 * section.c (bfd_set_section_contents): Make the "location" buffer
543 constant.
544 * bfd-in2.h: Re-generate.
545
546 2003-10-30 Andrew Cagney <cagney@redhat.com>
547
548 * syms.c: Replace "struct symbol_cache_entry" with "struct
549 bfd_symbol".
550 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
551 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
552 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
553 * bfd-in2.h: Re-generate.
554
555 2003-10-30 Jakub Jelinek <jakub@redhat.com>
556
557 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
558 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
559 fields.
560 (struct elfNN_ia64_local_hash_table): Remove.
561 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
562 to htab_t. Add loc_hash_memory field.
563 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
564 Removed.
565 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
566 functions.
567 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
568 loc_hash_table. Initialize loc_hash_memory.
569 (elfNN_ia64_hash_table_free): New function.
570 (elfNN_ia64_local_hash_lookup): Remove.
571 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
572 callback.
573 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
574 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
575 (bfd_elfNN_bfd_link_hash_table_free): Define.
576
577 2003-10-30 Alan Modra <amodra@bigpond.net.au>
578
579 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
580 symbol string in place.
581
582 2003-10-30 Jim Blandy <jimb@redhat.com>
583
584 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
585 object's mach field: all PowerPC machines are supersets of the
586 original rs6000, but not later rs6000 machines.
587
588 2003-10-30 Alan Modra <amodra@bigpond.net.au>
589
590 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
591 Add "val" and "sval" fields.
592 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
593 (read_attribute_value): Expand and adjust DW_* occurrences.
594 (scan_unit_for_functions, parse_comp_unit): Likewise.
595
596 2003-10-30 Phil Edwards <phil@codesourcery.com>
597
598 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
599 other common ELF triples.
600 (i[3-7]86-*-vxworks): Change to ELF format.
601 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
602 (sh-*-vxworks): New stanza.
603
604 2003-10-30 Lars Knoll <lars@trolltech.com>
605 Michael Matz <matz@suse.de>
606 Jakub Jelinek <jakub@redhat.com>
607 Alan Modra <amodra@bigpond.net.au>
608
609 * merge.c (struct sec_merge_sec_info): Update comment.
610 (struct sec_merge_hash_entry): Remove entsize.
611 (sec_merge_hash_lookup): Only adjust alignment when creating.
612 (sec_merge_emit): Remove register keyword.
613 (cmplengthentry, last4_eq, last_eq): Delete.
614 (strrevcmp, strrevcmp_align, is_suffix): New.
615 (merge_strings): Use them to implement fast suffix merging.
616 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
617 Make "len" signed.
618 (_bfd_elf_strtab_add): Lose on >2G strings.
619 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
620 (cmplengthentry, last4_eq): Delete.
621 (strrevcmp, is_suffix): New.
622 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
623
624 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
625
626 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
627 SEC_ALLOC.
628
629 2003-10-29 Philip Blundell <philb@gnu.org>
630
631 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
632 code sequence.
633 (PLT_HEADER_SIZE): New.
634 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
635 (struct elf32_arm_relocs_copied): ... this. Count both
636 pcrel and non-pcrel relocs. All uses updated.
637 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
638 sections and symbol/section mapping cache.
639 (create_got_section): New.
640 (elf32_arm_create_dynamic_sections): New.
641 (elf_backend_create_dynamic_sections): Use it.
642 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
643 (elf32_arm_check_relocs): Likewise.
644 (elf32_arm_adjust_dynamic_symbol): Likewise.
645 (elf32_arm_copy_indirect_symbol): New.
646 (elf32_arm_link_hash_table_create): Initialise new fields.
647 (elf32_arm_gc_sweep_hook): Implement.
648 (elf32_arm_discard_copies): Delete.
649 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
650 (elf32_arm_finish_dynamic_sections): Likewise.
651 (elf_backend_can_refcount): Define.
652 (elf_backend_copy_indirect_symbol): Likewise.
653 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
654
655 2003-10-29 Alan Modra <amodra@bigpond.net.au>
656
657 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
658 (elf_backend_grok_psinfo): Define.
659 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
660
661 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
662 sections with the same name.
663 (elfcore_grok_lwpstatus): Likewise.
664 (elfcore_grok_win32pstatus): Likewise.
665 (elfcore_grok_note): Likewise.
666 (elfcore_grok_nto_status): Likewise.
667 (elfcore_grok_nto_gregs): Likewise.
668
669 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
670
671 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
672 objects.
673
674 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
675
676 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
677
678 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
679
680 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
681 hash table for real symbols.
682
683 2003-10-23 Michael Snyder <msnyder@redhat.com>
684
685 * section.c (asection): Fix typo in comment.
686
687 2003-10-23 Alan Modra <amodra@bigpond.net.au>
688
689 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
690 reloc symbol index to it. Don't allow gd syms in shared libs
691 to be optimized.
692 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
693 (ppc64_elf_size_stubs): Likewise.
694 (ppc64_elf_relocate_section): Check that tls relocs are only used
695 with tls syms, and similarly for non-tls. Correct symbol used
696 when optimizing toc tls code.
697
698 2003-10-22 Nick Clifton <nickc@redhat.com>
699
700 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
701 processing an executable.
702
703 2003-10-22 Jakub Jelinek <jakub@redhat.com>
704
705 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
706 field changes.
707 (_bfd_elf_link_assign_sym_version): Likewise.
708 * elflink.h (size_dynamic_sections): Likewise.
709
710 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
711 Michael Snyder <msnyder@redhat.com>
712
713 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
714 bfd_mach_sh4a_nofpu): New machine types.
715 * bfd-in2.h: Rebuilt.
716 * cpu-sh.c (compatible): Remove unused function.
717 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
718 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
719 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
720
721 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
722
723 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
724 describing mismatched formats involving the Maverick FP type.
725
726 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
727
728 * binary.c (binary_object_p): Pass machine flag along with
729 architecture.
730
731 2003-10-21 Thorsten Brehm <brehm@gmx.net>
732
733 * archures.c (bfd_default_scan): Add support for mcf528x.
734 * ieee.c (ieee_write_processor): Likewise.
735
736 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
737 Bernardo Innocenti <bernie@develer.com>
738
739 * archures.c: Add MCF528x (MCFv4) support.
740 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
741 * bfd-in2.h: Regenerate.
742
743 2003-10-20 Andrew Cagney <cagney@redhat.com>
744
745 * targets.c: Replace "struct sec" with "struct bfd_section"
746 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
747 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
748 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
749 * aout-tic30.c, aout-target.h:
750 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
751
752 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
753
754 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
755 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
756 (struct _mmix_elf_section_data): New member pjs.
757 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
758 functions.
759 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
760 (mmix_reloc_map): Ditto.
761 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
762 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
763 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
764 unused.
765 (mmix_elf_check_relocs): Move early return to after
766 mmix_elf_check_common_relocs call.
767 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
768 (_bfd_mmix_before_linker_allocation): Rename from
769 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
770 Arrange to set the initial relaxable size of sections.
771 (_bfd_mmix_after_linker_allocation): Rename from
772 _bfd_mmix_finalize_linker_allocated_gregs.
773 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
774 (bfd_elf64_get_section_contents): Define.
775 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
776 * libbfd.h, bfd-in2.h: Regenerate.
777
778 * reloc.c (bfd_generic_relax_section): Default-set
779 section->_cooked_size here.
780 (bfd_generic_get_relocated_section_contents): Don't set it here.
781 Explain why.
782
783 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
784
785 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
786 output section has been discarded.
787
788 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
789
790 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
791 (h8300_reloc16_extra_cases): Likewise.
792 (h8300_bfd_link_add_symbols): Likewise.
793
794 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
795
796 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
797 (h8300sn_info_struct): Likewise.
798 (h8300hn_info_struct): Likewise.
799
800 2003-10-16 Pavel Roskin <proski@gnu.org>
801
802 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
803 for sections which lack size info.
804
805 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
806
807 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
808 mingw32.
809
810 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
811
812 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
813 undefined patterns with '*'.
814
815 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
816
817 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
818 use the last CIE from a different section.
819 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
820 size of the output section.
821
822 2003-10-07 Roland McGrath <roland@redhat.com>
823
824 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
825 new section from p_align header field.
826
827 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
828
829 * elf32-xtensa.c (xtensa_read_table_entries): The external size
830 of entry is 8 bytes.
831
832 2003-10-15 Andrew Cagney <cagney@redhat.com>
833
834 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
835 with NAME##_canonicalize_symtab.
836 * libcoff-in.h (coff_canonicalize_symtab): Update.
837 * xsym.h (bfd_sym_canonicalize_symtab): Update.
838 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
839 * coffgen.c (coff_canonicalize_symtab): Update.
840 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
841 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
842 * ieee.c (ieee_vec): Update comment.
843 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
844 * mmo.c (mmo_canonicalize_symtab): Update.
845 * nlm-target.h (nlm_canonicalize_symtab): Update.
846 * nlmcode.h (nlm_canonicalize_symtab): Update.
847 * i386msdos.c (msdos_canonicalize_symtab): Update.
848 * hp300hpux.c (MY (canonicalize_symtab)): Update.
849 * oasys.c (oasys_canonicalize_symtab): Update.
850 * som.c (som_canonicalize_symtab): Update.
851 * pef.c (bfd_pef_canonicalize_symtab): Update.
852 * nlmcode.h (nlm_canonicalize_symtab): Update.
853 * xsym.c (bfd_sym_canonicalize_symtab): Update.
854 * vms.c (vms_canonicalize_symtab): Update.
855 * versados.c (versados_canonicalize_symtab): Update.
856 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
857 * ieee.c (ieee_canonicalize_symtab): Update.
858 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
859 * reloc.c: Update comment.
860 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
861 * coff64-rs6000.c (aix5coff64_vec): Update.
862 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
863 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
864 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
865 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
866 * hp300hpux.c (MY_canonicalize_symtab): Update.
867 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
868 * aout-tic30.c (MY_canonicalize_symtab): Update.
869 * aout-target.h (MY_canonicalize_symtab): Update.
870 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
871 * elf.c (_bfd_elf_canonicalize_symtab): Update.
872 * elfcode.h (elf_canonicalize_symtab): Update.
873 * ihex.c (ihex_canonicalize_symtab): Update.
874 * tekhex.c (tekhex_canonicalize_symtab): Update.
875 * binary.c (binary_canonicalize_symtab): Update.
876 * srec.c (srec_canonicalize_symtab): Update.
877
878 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
879
880 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
881
882 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
883
884 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
885 relocations.
886 (sh_elf_check_relocs): Likewise.
887
888 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
889 (sh64_elf_merge_symbol_attribute): New.
890 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
891 (sh64_elf64_merge_symbol_attribute): New.
892
893 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
894
895 * elf-bfd.h (struct elf_backend_data): New function pointer member
896 elf_backend_merge_symbol_attribute.
897 * elflink.h (elf_link_add_object_symbols): Adjust call to
898 elf_backend_merge_symbol_attribute if the backend defined it.
899 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
900 (elfNN_bed): Add that to the initializer.
901
902 2003-10-14 Bob Wilson <bob.wilson@acm.org>
903
904 * elf32-xtensa.c (get_is_linkonce_section): Delete.
905 (xtensa_is_property_section, xtensa_is_littable_section): Use
906 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
907 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
908 (xtensa_get_property_section_name): Check section name instead of
909 calling get_is_linkonce_section. Remove unused bfd parameter. Use
910 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
911 linkonce section names by appending ".xt.insn" or ".xt.lit".
912 (xtensa_read_table_entries): Remove bfd argument in call to
913 xtensa_get_property_section_name. Free section name when done.
914 (elf_xtensa_combine_prop_entries): Free leaking table.
915
916 2003-10-13 Richard Sandiford <rsandifo@redht.com>
917
918 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
919 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
920 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
921 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
922 that were needed.
923 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
924 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
925
926 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
927
928 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
929 (bfd_elf64_ia64_after_parse): Likewise.
930 * bfd-in2.h: Regenerated.
931
932 * elfxx-ia64.c (oor_ip): New.
933 (oor_branch_size): Likewise.
934 (bfd_elfNN_ia64_after_parse): Likewise.
935 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
936 equals sizeof (oor_ip).
937
938 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
939
940 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
941 renumbering of some relocation numbers.
942
943 2003-10-11 Alan Modra <amodra@bigpond.net.au>
944
945 * coff-sh.c: Move definition of MAP and guard more code with
946 COFF_IMAGE_WITH_PE.
947
948 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
949 * bfd-in2.h: Regenerate.
950
951 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
952
953 * Makefile.am: Run "make dep-am".
954 * Makefile.in: Regenerate.
955 * doc/Makefile.in: Likewise.
956
957 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
958
959 * cofflink.c: Include "safe-ctype.h".
960 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
961
962 2003-10-08 Dave Brolley <brolley@redhat.com>
963 On behalf of Michael Snyder <msnyder@redhat.com>
964
965 * archures.c: Add FRV fr550 machine.
966 * cpu-frv.c: Ditto.
967 * elf32-frv.c: Ditto.
968 * bfd-in2.h: Regenerate.
969
970 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
971
972 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
973 for non-SGI N64 ABI. Improve code consitency.
974
975 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
976
977 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
978 rightshift to 2.
979
980 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
981
982 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
983 parameter.
984 * cofflink.c (coff_link_add_symbols): Deal with split stab
985 sections.
986 * elflink.h (elf_link_add_object_symbols): Deal with split stab
987 sections.
988 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
989 * libbfd.h: Regenerated.
990
991 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
992 overflow, set reloc start position to after the count
993 reloc. Subtract one from num relocs. Give error on 0xffff relocs
994 and no overflow.
995 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
996 overflow.
997 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
998 0xffff.
999
1000 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
1001
1002 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
1003 last CIE/FDE if needed.
1004
1005 2003-10-06 Nick Clifton <nickc@redhat.com>
1006
1007 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
1008 BFD64 is enabled.
1009
1010 2003-10-06 Matt Thomas <matt@3am-software.com>
1011
1012 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
1013
1014 2003-10-06 Robert Millan <robertmh@gnu.org>
1015
1016 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
1017 * config.bfd: Likewise.
1018 * configure: Regenerate.
1019
1020 2003-10-04 Christian Groessler <chris@groessler.org>
1021
1022 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
1023 and R_CALLR.
1024
1025 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1026
1027 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
1028 * elf32-m68hc11.c: Likewise.
1029 * elf32-m68hc12.c: Likewise.
1030 * elf32-m68hc1x.h: Likewise.
1031
1032 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1033
1034 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
1035 of flags between HC12 and HCS12.
1036
1037 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
1038
1039 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1040 which become empty after merging.
1041
1042 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1043
1044 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1045 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1046
1047 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1048
1049 * archures.c (bfd_mach_mipsisa64r2): New define.
1050 * bfd-in2.h: Regenerate.
1051 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1052 * cpu-mips.c (I_mipsisa64r2): New enum value.
1053 (arch_info_struct): Add entry for I_mipsisa64r2.
1054 * elfxx-mips.c (_bfd_elf_mips_mach)
1055 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1056 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1057 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1058
1059 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1060
1061 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1062 Handle SHN_IA_64_ANSI_COMMON.
1063 (elf_backend_section_from_bfd_section): Defined.
1064
1065 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1066
1067 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1068 of a pointer to section. Check bad symbol index.
1069 (_bfd_elf_link_read_relocs): Modify calls to
1070 elf_link_read_relocs_from_section.
1071
1072 2003-09-23 DJ Delorie <dj@redhat.com>
1073
1074 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1075 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1076 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1077 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1078 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1079 R_SH_PSHA, R_SH_PSHL added.
1080 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1081 (sh_elf_relocate_section): Support new relocs.
1082
1083 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1084
1085 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1086 dynamic relocation offsets.
1087
1088 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1089
1090 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1091 hash table using _bfd_generic_link_hash_table_free.
1092
1093 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1094
1095 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1096 type of prefix_length and suffix_length to int. Rename "attributes"
1097 to "attr". Comment.
1098 (_bfd_elf_get_sec_type_attr): Update prototype.
1099 * elf.c (get_special_section): Rewrite.
1100 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1101 attr and type pointers.
1102 (_bfd_elf_new_section_hook): Adjust for above.
1103 (special_sections): Merge suffix with prefix. Set
1104 prefix_length for all entries. Set suffix_length appropriately.
1105 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1106 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1107 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1108 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1109 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1110 * elf32-v850.c (v850_elf_special_sections): Likewise.
1111 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1112 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1113 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1114 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1115 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1116 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1117 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1118 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1119
1120 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1121
1122 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1123 ->got if the section already exists.
1124
1125 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1126
1127 * dwarf2.c (decode_line_info): Cope with an initially empty
1128 filename table.
1129
1130 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1131
1132 * acinclude.m4: Include ../config/accross.m4.
1133 * aclocal.m4: Regenerated.
1134
1135 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1136 or long long.
1137 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1138 (host64): Remove if HOST_64BIT_TYPE is set to long.
1139
1140 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1141 long and long long.
1142 (HOST_U_64BIT_TYPE): Likewise.
1143 (host64): Likewise.
1144 * configure: Regenerated.
1145
1146 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1147
1148 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1149 since some ABIs round up the size of the struct.
1150
1151 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1152
1153 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1154 the old symbol is undefined and the new symbol is defined.
1155
1156 2003-09-18 Andreas Schwab <schwab@suse.de>
1157
1158 * simple.c (bfd_simple_get_relocated_section_contents): Use
1159 _bfd_generic_link_hash_table_create instead of
1160 bfd_link_hash_table_create.
1161
1162 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1163
1164 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1165 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1166
1167 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1168 Randolph Chung <randolph@tausq.org>
1169
1170 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1171 hppa_link_hash_newfunc, hppa_build_one_stub,
1172 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1173 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1174 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1175 for generating import stubs for calls to statically linked PIC
1176 functions.
1177 (hppa_type_of_stub): Don't generate an import stub for calls to
1178 statically linked pic functions. Generate import stubs for calls
1179 in a shared object, to functions not in a regular file, and to
1180 defined weak functions. Add new argument INFO.
1181 (hppa_build_one_stub): Don't undef ADDIL_DP.
1182 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1183 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1184 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1185 non-shared link. Convert instructions that use the the linkage table
1186 pointer, or a facsimile thereof, to use the global data pointer when
1187 the reloc has been changed.
1188
1189 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1190
1191 * archures.c: Add new machine names for hppa.
1192 * bfd-in2.h: Regenerate.
1193 * cpu-hppa.c: Use the new machine names.
1194
1195 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1196
1197 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1198 all_local_syms member.
1199 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1200 to get the local symbols.
1201
1202 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1203
1204 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1205 (elf_backend_special_sections): Define.a
1206
1207 PR savannah/4950:
1208 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1209 section is read-only.
1210
1211 2003-09-04 Nick Clifton <nickc@redhat.com>
1212
1213 * archures.c (bfd_mach_v850e1): Define.
1214 * bfd-in2.h: Regenerate.
1215 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1216 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1217 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1218 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1219 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1220 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1221 linked with v850e binaries. Mark the output as v850e.
1222
1223 2003-09-03 Nick Clifton <nickc@redhat.com>
1224
1225 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1226 symbols that are used in relocs.
1227
1228 2003-08-30 Robert Millan <robertmh@gnu.org>
1229
1230 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1231 * config.bfd: Likewise.
1232 * configure: Regenerate.
1233
1234 2003-08-31 Christian Groessler <chris@groessler.org>
1235
1236 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1237 instead of returning bfd_reloc_continue.
1238
1239 2003-08-31 Andreas Jaeger <aj@suse.de>
1240
1241 * merge.c: Update to ISO C90.
1242
1243 2003-08-27 Ian Lance Taylor <ian@airs.com>
1244
1245 * configure.in: Check for strtoull.
1246 * bfd.c (bfd_scan_vma): Use strtoull when available.
1247 * configure, config.in: Regenerate.
1248
1249 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1250 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1251 __GNUC__ when deciding whether to use long long for
1252 BFD_HOST_64_BIT.
1253 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1254
1255 2003-08-27 Christian Groessler <chris@groessler.org>
1256
1257 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1258 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1259 functions.
1260 (elf32_i860_howto_table): Insert the new functions as
1261 'special_function's in the proper reloc type entries.
1262
1263 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1264
1265 * elf32-frv.c (elf32_frv_relocate_section): Use
1266 _bfd_elf_rela_local_sym.
1267
1268 2003-08-26 Michael Snyder <msnyder@redhat.com>
1269
1270 * cpu-frv.c: Remove unused enum.
1271
1272 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1273
1274 * reloc.c: Fix documentation for MIPS ELF relocations.
1275 libbfd.h: Regenerate.
1276 bfd-in2.h: Regenerate.
1277
1278 2003-08-24 Jason Eckhardt <jle@rice.edu>
1279
1280 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1281
1282 2003-08-24 Jason Eckhardt <jle@rice.edu>
1283
1284 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1285 shift by 2 before storing the relocated value.
1286
1287 2003-08-23 Jason Eckhardt <jle@rice.edu>
1288
1289 * coff-i860.c (coff_i860_reloc_nyi): New function.
1290 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1291 LOWn, SPLITn, and BRADDR.
1292 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1293 before trying to access the entry.
1294 (coff_i860_rtype_to_howto): Likewise.
1295 (coff_i860_reloc_type_lookup): New function.
1296 (i860_reloc_processing): New function.
1297 (coff_bfd_reloc_type_lookup): Define macro.
1298 (RELOC_PROCESSING): Define macro.
1299 Minor formatting adjustments.
1300
1301 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1302
1303 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1304
1305 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1306
1307 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1308 .got section at 8 bytes.
1309
1310 2003-08-21 Nick Clifton <nickc@redhat.com>
1311
1312 * cofflink.c: Update to ISO C90 and tidy up formatting.
1313
1314 2003-08-21 Randolph Chung <tausq@debian.org>
1315
1316 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1317 can have OSABI=Linux or OSABI=SysV. Check for both.
1318 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1319
1320 2003-08-21 Nick Clifton <nickc@redhat.com>
1321
1322 * po/sv.po: Updated Swedish translation.
1323
1324 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1325
1326 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1327
1328 2003-08-20 Nick Clifton <nickc@redhat.com>
1329
1330 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1331 replace some duplicated code in most elfxx-xxxx.c files. This
1332 version uses the new fields in bfd_link_info.
1333
1334 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1335 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1336 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1337 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1338 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1339 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1340 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1341 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1342 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1343 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1344 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1345 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1346 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1347 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1348 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1349 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1350 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1351 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1352 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1353
1354 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1355 elf_hppa_remark_useless_dynamic_symbols,
1356 elf_hppa_relocate_section): Use the new fields in
1357 bfd_link_info structure.
1358 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1359 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1360 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1361 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1362 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1363 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1364
1365 * elflink.h (elf_link_output_extsym): Fix test for reporting
1366 undefined symbols in shared libraries. Remove redundant test
1367 of shlib_undefined when reporting references to forced local
1368 symbols.
1369
1370 2003-08-18 Andreas Schwab <schwab@suse.de>
1371
1372 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1373 executables.
1374
1375 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1376
1377 * simple.c (bfd_simple_get_relocated_section_contents): Move
1378 reloc_done hack to before first bfd_section_size call. Change all
1379 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1380
1381 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1382
1383 * elf64-ppc.c: Don't include elf/ppc.h.
1384
1385 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1386
1387 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1388 code to work with 64-bit bfds.
1389
1390 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1391
1392 * dep-in.sed: Remove libintl.h.
1393 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1394 (POTFILES.in): Remove target.
1395 * Makefile.in: Regenerate.
1396
1397 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1398
1399 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1400 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1401 use the function sym from the previous reloc.
1402
1403 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1404
1405 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1406 fatal if -pie.
1407 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1408 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1409 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1410 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1411 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1412 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1413 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1414 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1415 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1416 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1417 on undefined symbols if -pie.
1418 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1419
1420 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1421
1422 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1423 branch to __libc_start_main.
1424
1425 2003-08-08 Dmitry Diky <diwil@mail.ru>
1426
1427 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1428 gcc order.
1429 * cpu-msp430.c: Likewise.
1430 * elf32-msp430.c: Likewise.
1431 * bfd-in2.h: Regenerate.
1432
1433 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1434
1435 * elfxx-target.h: Remove PTR cast.
1436 * targets.c (bfd_target): Make backend_data const void *.
1437 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1438 * elf-m10300.c: Likewise.
1439 * elf.c: Likewise.
1440 * elf32-hppa.c: Likewise.
1441 * elf32-i386.c: Likewise.
1442 * elf32-m68hc1x.c: Likewise.
1443 * elf32-ppc.c: Likewise.
1444 * elf32-s390.c: Likewise.
1445 * elf32-sh.c: Likewise.
1446 * elf32-sh64.c: Likewise.
1447 * elf32-sparc.c: Likewise.
1448 * elf32-xtensa.c: Likewise.
1449 * elf64-mips.c: Likewise.
1450 * elf64-ppc.c: Likewise.
1451 * elf64-s390.c: Likewise.
1452 * elf64-sh64.c: Likewise.
1453 * elf64-sparc.c: Likewise.
1454 * elf64-x86-64.c: Likewise.
1455 * elfcode.h: Likewise.
1456 * elfcore.h: Likewise.
1457 * elflink.c: Likewise.
1458 * elflink.h: Likewise.
1459 * elfxx-ia64.c: Likewise.
1460 * elfxx-mips.c: Likewise.
1461 * elfxx-mips.h: Likewise.
1462 * elf.c (prep_headers): Remove useless check for null backend_data.
1463 * bfd-in2.h: Regenerate.
1464
1465 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1466 (NAME): Use ## rather than CONCAT4 macro.
1467 * elfcode.h: Remove one remaining PARAMS macro.
1468 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1469 * elf-strtab.c: Likewise.
1470 * elf-hppa.h: Likewise.
1471 * elf32-hppa.h: Likewise.
1472 * elf32-hppa.c: Likewise.
1473 (elf32_hppa_add_symbol_hook): Delete.
1474 (elf_backend_add_symbol_hook): Don't define.
1475 * libhppa.h: Convert to C90. Replace INLINE with inline.
1476
1477 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1478
1479 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1480 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1481 function descriptors, but warn.
1482 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1483 stub syms so that we can avoid a stub sym if we already have a
1484 plt sym. Do not redefine an existing symbol.
1485 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1486 glink.
1487
1488 2003-08-06 Nick Clifton <nickc@redhat.com>
1489
1490 * po/fr.po: Updated French translation.
1491
1492 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1493
1494 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1495 SEC_LINKER_CREATED.
1496
1497 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1498
1499 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1500 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1501
1502 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1503
1504 * coffcode.h (coff_slurp_line_table): Return with a warning
1505 message if the line number table could not be read.
1506
1507 2003-08-04 Nick Clifton <nickc@redhat.com>
1508
1509 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1510 to messages produced for .gnu.warning.SYMBOL sections.
1511
1512 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1513
1514 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1515 * elfcore.h: Likewise.
1516 * elflink.c: Likewise.
1517 * elflink.h: Likewise.
1518 * elf.c (sym_is_global): Remove INLINE.
1519 (align_file_position): Replace INLINE with inline.
1520 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1521 (elf_file_p): Replace INLINE with inline.
1522
1523 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1524
1525 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1526
1527 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1528
1529 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1530
1531 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1532
1533 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1534 ElfNN_External_Rela instead of Elf64_External_Rela.
1535
1536 2003-08-01 Nick Clifton <nickc@redhat.com>
1537
1538 * config.bfd: Add code to catch obsolete configurations and warn
1539 about them unless --enable-obsolete is used. Use this to mark
1540 vax-vms port as obsolete.
1541
1542 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1543
1544 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1545 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1546 Formatting.
1547 * elfxx-target.h: Remove PARAMS macro. Formatting.
1548
1549 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1550
1551 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1552 * elf64-ppc.c (get_fdh): New function, split out from
1553 ppc64_elf_edit_opd.
1554 (ppc64_elf_check_relocs): Use get_fdh.
1555 (func_desc_adjust): Likewise. Tidy.
1556 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1557 exit. Use get_fdh. Account for superfluous dynamic relocs.
1558 (ppc64_elf_relocate_section): Warning fix.
1559
1560 2003-07-30 Jason Eckhardt <jle@rice.edu>
1561
1562 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1563
1564 2003-07-30 Jason Eckhardt <jle@rice.edu>
1565
1566 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1567
1568 2003-07-30 Randolph Chung <tausq@debian.org>
1569
1570 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1571 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1572
1573 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1574
1575 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1576 Replace PTR with void *. Formatting.
1577 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1578 (make_mapping): Likewise.
1579
1580 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1581
1582 * elf64-ppc.c (func_desc_adjust): Give linker created function
1583 descriptor symbols a size and type.
1584 (ppc64_elf_relocate_section): Correct lq insn test.
1585
1586 2003-07-28 Eric Christopher <echristo@redhat.com>
1587
1588 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1589 (ppc_elf_install_value): New function.
1590 (ppc_elf_sort_rela): Remove.
1591 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1592 and replace with out of range branch stubs.
1593 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1594
1595 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1596
1597 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1598 from input_bfd.
1599
1600 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1601
1602 * elf.c (special_sections): Set attributes for .got and .plt.
1603
1604 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1605
1606 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1607 on function descriptors.
1608 (ELIMINATE_COPY_RELOCS): Expand comment.
1609 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1610 Do include ".toc1".
1611
1612 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1613
1614 * elf.c (_bfd_elf_new_section_hook): Set the default section
1615 type to SHT_NULL.
1616 (elf_fake_sections): Set the section type based on asect->flags
1617 if it is SHT_NULL. Don't abort on processor specific section
1618 types.
1619
1620 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1621
1622 * bfd-in2.h: Regenerated.
1623
1624 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1625
1626 * elf-bfd.h (bfd_elf_special_section): New.
1627 (elf_backend_data): Add special_sections, a pointer to
1628 bfd_elf_special_section.
1629 (elf_section_type). New.
1630 (elf_section_flags): New.
1631 (_bfd_elf_get_sec_type_attr): New.
1632
1633 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1634 real section type/flags.
1635 (special_sections): New.
1636 (get_special_section): New.
1637 (_bfd_elf_get_sec_type_attr): New.
1638 (_bfd_elf_new_section_hook): Check special_section to set
1639 elf_section_type and elf_section_flags.
1640 (elf_fake_sections): Don't use section name to set ELF section
1641 data.
1642
1643 * elf32-m32r.c (m32r_elf_special_sections): New.
1644 (elf_backend_special_sections): Defined.
1645
1646 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1647 (elf_backend_special_sections): Defined.
1648
1649 * elf32-mcore.c (mcore_elf_special_sections): New.
1650 (elf_backend_special_sections): Defined.
1651
1652 * elf32-ppc.c (ppc_elf_special_sections): New.
1653 (elf_backend_special_sections): Defined.
1654
1655 * elf32-sh64.c (sh64_elf_special_sections): New.
1656 (elf_backend_special_sections): Defined.
1657
1658 * elf32-v850.c (v850_elf_special_sections): New.
1659 (elf_backend_special_sections): Defined.
1660
1661 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1662 (elf_backend_special_sections): Defined.
1663
1664 * elf64-alpha.c (elf64_alpha_special_sections): New.
1665 (elf_backend_special_sections): Defined.
1666
1667 * elf64-hppa.c (elf64_hppa_special_sections): New.
1668 (elf_backend_special_sections): Defined.
1669
1670 * elf64-ppc.c (ppc64_elf_special_sections): New.
1671 (elf_backend_special_sections): Defined.
1672
1673 * elf64-sh64.c (sh64_elf64_special_sections): New.
1674 (elf_backend_special_sections): Defined.
1675
1676 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1677 (elf_backend_special_sections): Defined.
1678
1679 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1680
1681 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1682 (elf_backend_special_sections): Defined.
1683
1684 * elfxx-target.h (elf_backend_special_sections): New. Default
1685 to NULL.
1686 (elfNN_bed): Initialize special_sections.
1687
1688 * section.c (bfd_abs_section): Remove const.
1689 (bfd_und_section): Likewise.
1690 (bfd_com_section): Likewise.
1691 (bfd_ind_section): Likewise.
1692
1693 2003-07-24 Nick Clifton <nickc@redhat.com>
1694
1695 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1696 sections are assigned the LOAD attribute.
1697
1698 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1699
1700 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1701 * elf32-sh64-com.c: Likewise.
1702 * elf32-sh64.c: Likewise.
1703 * elf32-sh64.h: Likewise.
1704 * elf64-sh64.c: Likewise.
1705
1706 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1707
1708 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1709 (allocate_dynrelocs): Likewise.
1710 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1711 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1712
1713 2003-07-24 Nick Clifton <nickc@redhat.com>
1714
1715 * po/fr.po: Updated French translation.
1716
1717 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1718
1719 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1720 near the beginning of the file. Swap order of arguments. Call
1721 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1722 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1723 (elf_xtensa_relocate_section): Likewise.
1724 (shrink_dynamic_reloc_sections): Likewise.
1725
1726 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1727
1728 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1729 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1730 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1731 first printing an error message.
1732 (elf_xtensa_finish_dynamic_sections): Likewise.
1733 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1734 discarding literal table entries.
1735 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1736 (elf_xtensa_do_asm_simplify): Likewise.
1737
1738 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1739
1740 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1741 we have a local symbol in common section.
1742
1743 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1744
1745 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1746 weak symbols.
1747
1748 2003-07-22 Nick Clifton <nickc@redhat.com>
1749
1750 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1751 expected RS6000 storage classes.
1752
1753 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1754
1755 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1756 output_bfd unused to silence gcc.
1757
1758 2003-07-21 Nick Clifton <nickc@redhat.com>
1759
1760 * po/sv.po: Updated Swedish translation.
1761
1762 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1763
1764 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1765 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1766 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1767 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1768 now done in _bfd_elf_symbol_refs_local_p.
1769 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1770 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1771 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1772
1773 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1774
1775 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1776
1777 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1778
1779 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1780 (SYMBOL_CALLS_LOCAL): Likewise.
1781
1782 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1783 immediately if symbol isn't defined locally.
1784
1785 2003-07-18 Richard Henderson <rth@redhat.com>
1786
1787 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1788 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1789 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1790 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1791 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1792 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1793 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1794 Update all callers to provide the relocation being resolved.
1795
1796 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1797
1798 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1799 targ_cflags.
1800
1801 2003-07-17 Nick Clifton <nickc@redhat.com>
1802
1803 * po/es.po: New Spanish translation.
1804 * po/sv.po: New Swedish translation.
1805 * po/opcodes.pot: Regenerate.
1806
1807 2003-07-16 Richard Henderson <rth@redhat.com>
1808
1809 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1810 * elfxx-ia64.c, targets.c: Likewise.
1811
1812 2003-07-16 Richard Henderson <rth@redhat.com>
1813
1814 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1815 for symbols defined locally plus -Bsymbolic. Tidy logic.
1816
1817 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1818
1819 * archures.c (bfd_mach_mips7000): New.
1820 * bfd-in2.h: Regenerated.
1821 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1822 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1823 (mips_mach_extensions): Add an entry for it.
1824
1825 2003-07-14 Nick Clifton <nickc@redhat.com>
1826
1827 * po/tr.po: Update with latest version.
1828 * po/SRC-POTFILES.in: Regenerate.
1829 * po/bfd.pot: Regenerate.
1830 * Makfile.in: Regenerate.
1831 * configure: Regenerate.
1832
1833 2003-07-12 Jeff Baker <jbaker@qnx.com>
1834
1835 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1836 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1837 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1838 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1839
1840 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1841
1842 * coffcode.h (coff_set_section_contents): Set the
1843 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1844
1845 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1846
1847 * bfd-in.h (bfd_h8300_pad_address): Declare.
1848 * bfd-in2.h: Regenerate.
1849 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1850 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1851 addresses before checking whether they can be relaxed.
1852 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1853 Don't complain about overflows in general 8-bit relocations.
1854 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1855 Fix handling of R_H8_DIR24A8.
1856
1857 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1858
1859 * elf32-h8300.c: Convert function prototypes and definitions
1860 to C90 syntax.
1861 * coff-h8300.c: Likewise.
1862 * cpu-h8300.c: Likewise.
1863
1864 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1865
1866 * po/SRC-POTFILES.in: Regenerate.
1867 * po/bfd.pot: Likewise.
1868
1869 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1870
1871 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1872 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1873 .xt.lit.plt section.
1874 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1875 and allocate memory for it.
1876 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1877 section to the .got.loc section.
1878 (elf_xtensa_finish_dynamic_sections): Fix up call to
1879 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1880 the address of .got.loc.
1881 (relax_property_section): Shrink .got.loc to match changes in any
1882 literal table section.
1883 (xtensa_is_property_section): Change to match
1884 xtensa_get_property_section_name.
1885 (xtensa_is_littable_section): New.
1886
1887 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1888
1889 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1890 -1LL.
1891
1892 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1893
1894 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1895 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1896 Run "make dep-am".
1897 * Makefile.in: Regenerate.
1898
1899 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1900
1901 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1902 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1903 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1904 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1905 * elf32-am33lin.c: Rename global functions.
1906 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1907 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1908 * configure.in (bfd_elf32_am33lin_vec): Added.
1909 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1910 (elf32-am33lin.lo): List dependencies.
1911 * aclocal.m4, configure, Makefile.in: Rebuilt.
1912 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1913 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1914 ELF_ARCH was not defined before.
1915 (elf_symbol_leading_char): Define if not defined.
1916 * elf32-am33lin.c: Override the definitions above.
1917 * targets.c (bfd_elf32_am33lin_vec): New.
1918
1919 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1920
1921 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1922 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1923 pcrel_relocs_copied.
1924 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1925 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1926 ld-linux.so.2 to ld.so.1.
1927 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1928 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1929 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1930 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1931 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1932 .rela.* section contents with bfd_zalloc.
1933 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1934 * elf-m10300.c: Added declarations for functions missing them.
1935 Merge some shared-library changes from the i386 back-end. Use
1936 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1937 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1938 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1939 members of elf_link_hash_entry. Adjusted references.
1940 (mn10300_elf_final_link_relocate): dynobj was already loaded
1941 into a local variable, use it.
1942 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1943 * elf-m10300.c: Add missing function prototypes.
1944 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1945 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1946 relocation for dynamic relocations.
1947 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1948 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1949 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1950 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1951 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1952 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1953 adress is already known at the time we compute relaxations.
1954 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1955 and PLT32 to narrower relocations.
1956 * libbfd.h, bfd-in2.h: Rebuilt.
1957 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1958 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1959 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1960 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1961 BFD_RELOC_MN10300_RELATIVE): New relocs.
1962 * libbfd.h, bfd-in2.h: Rebuilt.
1963 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1964 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1965 fields.
1966 (elf_mn10300_howto): Defined new relocation types.
1967 (mn10300_reloc_map): Map them.
1968 (_bfd_mn10300_elf_create_got_section): New fn.
1969 (mn10300_elf_check_relocs): Handle PIC relocs.
1970 (mn10300_elf_final_link_relocate): Likewise.
1971 (mn10300_elf_relocate_section): Handle DSOs.
1972 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1973 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1974 elf_mn10300_pic_plt_entry): New.
1975 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1976 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1977 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1978 elf_mn10300_plt_reloc_offset: New macros.
1979 (ELF_DYNAMIC_INTERPRETER): Likewise.
1980 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1981 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1982 (_bfd_mn10300_elf_discard_copies): Likewise.
1983 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1984 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1985 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1986 (elf_backend_can_gc_sections,
1987 elf_backend_create_dynamic_sections,
1988 elf_backend_adjust_dynamic_sections,
1989 elf_backend_size_dynamic_sections,
1990 elf_backend_finish_dynamic_symbol,
1991 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1992 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1993 elf_backend_got_header_size, elf_backend_plt_header_size): New
1994 macros.
1995
1996 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1997
1998 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1999 * elf-m10300.c (compute_function_info): Account for AM33
2000 registers in `movm' when computing stack space for `call' when
2001 linking for AM33/2.0 link.
2002 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
2003 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
2004 * bfd-in2.h: Rebuilt.
2005 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
2006 * elf-m10300.c: Updated.
2007 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
2008 * archures.c (bfd_mach_am332): Defined.
2009 * bfd-in2.h: Rebuilt.
2010 * cpu-m10300.c (bfd_am332_arch): Defined.
2011 (bfd_am33_arch): Chained with am33-2.
2012 * elf-m10300.c (elf_mn10300_mach): Handle am332.
2013 (_bfd_mn10300_elf_final_write_processing): Likewise.
2014
2015 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
2016
2017 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
2018
2019 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2020
2021 * elf64-ppc.c (bfd_elf64_mkobject): Define.
2022 (struct ppc64_elf_obj_tdata): New.
2023 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
2024 (ppc64_elf_mkobject): New function.
2025 (struct got_entry): Add "owner". Move "tls_type".
2026 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
2027 (ppc64_elf_init_stub_bfd): New function.
2028 (create_got_section): Create header .got in dynobj. Create .got
2029 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
2030 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
2031 Look for dynobj .got, and test it.
2032 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
2033 (update_local_sym_info): Likewise.
2034 (ppc64_elf_check_relocs): Likewise.
2035 (ppc64_elf_gc_sweep_hook): Likewise.
2036 (ppc64_elf_tls_optimize): Likewise.
2037 (allocate_dynrelocs): Likewise.
2038 (ppc64_elf_size_dynamic_sections): Likewise.
2039 (ppc64_elf_relocate_section): Likewise.
2040 (ppc64_elf_next_toc_section): Update comment.
2041 (toc_adjusting_stub_needed): Remove unneeded cast.
2042 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2043 testing section flags.
2044 (ppc64_elf_build_stubs): Likewise.
2045 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2046 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2047 (func_desc_adjust): Copy over dynamic info for undef weaks.
2048 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2049 (ppc64_elf_size_stubs): Update prototype.
2050 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2051 input sections rather than scanning dynobj.
2052
2053 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2054
2055 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2056 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2057 (mips_elf_create_msym_section): Delete.
2058 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2059 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2060 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2061 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2062 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2063 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2064 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2065
2066 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2067
2068 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2069 symbols protected.
2070
2071 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2072
2073 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2074 of relocations whose offset is -2.
2075
2076 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2077
2078 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2079 forced-local symbols like other locals. Don't create relocations
2080 against STN_UNDEF in irix objects.
2081
2082 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2083
2084 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2085 compatible objects, add the values of defined external symbols
2086 to the addend.
2087
2088 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2089
2090 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2091 initialize a GOT entry to the symbol's st_value.
2092
2093 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2094
2095 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2096 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2097 (ppc_elf_tdata): Define.
2098 (elf_local_ptr_offsets): Adjust.
2099 (ppc_elf_mkobject): New function.
2100 (bfd_elf32_mkobject): Define.
2101
2102 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2103 * elfcore.h (elf_core_file_p): Likewise.
2104 * section.c (bfd_section_init): Remove prototype.
2105
2106 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2107
2108 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2109 field.
2110 (enum elf_linker_section_enum): Delete.
2111 (struct elf_linker_section): Delete.
2112 (struct elf_linker_section_pointers): Delete.
2113 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2114 Make linker_section_pointers a void**.
2115 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2116 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2117 of old item in elf-bfd.h.
2118 (struct elf_linker_section): Likewise.
2119 (struct elf_linker_section_pointers): Likewise.
2120 (elf_local_ptr_offsets): Define.
2121 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2122 (ppc_elf_link_hash_newfunc): Init it.
2123 (struct ppc_elf_link_hash_table): Add sbss.
2124 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2125 individual fields.
2126 (elf_create_linker_section): Fold into..
2127 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2128 Make rela section here if shared.
2129 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2130 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2131 clearing in a loop.
2132 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2133 section here.
2134 (ppc_elf_check_relocs): Adjust.
2135 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2136 creating .sbss by hand.
2137 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2138
2139 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2140
2141 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2142 complain_overflow_bitfield.
2143 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2144 complain_overflow_bitfield.
2145
2146 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2147
2148 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2149 true even if -pie.
2150
2151 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2152
2153 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2154 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2155 !info->executable.
2156 (get_fptr): For -pie create .opd as writable section and create
2157 .rela.opd as well.
2158 (elfNN_ia64_check_relocs): Change info->shared into
2159 !info->executable.
2160 (allocate_fptr): Likewise.
2161 (allocate_dynrel_entries): Account for a relative reloc for -pie
2162 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2163 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2164 section if -pie.
2165 (set_got_entry): Don't create a relative reloc if -pie
2166 want_ltoff_fptr for undefweak symbol.
2167 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2168 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2169 @fptr().
2170
2171 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2172 even if -pie.
2173 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2174 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2175 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2176 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2177 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2178 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2179 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2180 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2181 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2182
2183 2003-07-04 Paul Clarke <paulc@senet.com.au>
2184
2185 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2186 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2187 <R_H8_DIR32A16>: Fix type of relocation.
2188
2189 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2190
2191 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2192 sections were created already. Remove unnecessary tests of
2193 the previous change.
2194
2195 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2196
2197 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2198 bfd_make_section for existing sections.
2199
2200 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2201
2202 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2203 create_got_section if we already have done so.
2204 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2205 (sh_elf_check_relocs): Likewise.
2206 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2207 htab->root.dynobj instead.
2208 (sh_elf_check_relocs): Likewise.
2209 (sh_elf_finish_dynamic_sections): Likewise.
2210
2211 * section.c (bfd_make_section): Return NULL for existing section.
2212
2213 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2214
2215 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2216 ppc_elf_create_got if we've already done so.
2217
2218 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2219 (_bfd_elf_find_pointer_linker_section): Likewise.
2220 (bfd_elf32_create_pointer_linker_section): Likewise.
2221 (bfd_elf32_finish_pointer_linker_section): Likewise.
2222 (bfd_elf64_create_pointer_linker_section): Likewise.
2223 (bfd_elf64_finish_pointer_linker_section): Likewise.
2224 (_bfd_elf_make_linker_section_rela): Likewise.
2225 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2226 (elf_finish_pointer_linker_section): Likewise.
2227 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2228 (_bfd_elf_create_linker_section): Move this function..
2229 (_bfd_elf_find_pointer_linker_section): ..and this..
2230 * elflink.h (elf_create_pointer_linker_section): ..and this..
2231 (elf_finish_pointer_linker_section): ..and this..
2232 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2233 calls.
2234 (elf_create_linker_section): Convert to C90, tidy.
2235 (elf_find_pointer_linker_section): Likewise.
2236 (elf_create_pointer_linker_section): Likewise.
2237 (elf_finish_pointer_linker_section): Likewise.
2238 * elf32-i370.c: Delete #if 0 code.
2239
2240 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2241
2242 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2243 _restf* to be satisfied by shared libs, and always force them local.
2244 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2245 Correct test for "bl".
2246 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2247 primary opcode 31.
2248
2249 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2250
2251 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2252 (s390_tls_reloc): New function.
2253 (elf_howto_table): Add long displacement relocations R_390_20,
2254 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2255 (elf_s390_reloc_type_lookup): Likewise.
2256 (elf_s390_check_relocs): Likewise.
2257 (elf_s390_gc_sweep_hook): Likewise.
2258 (elf_s390_relocate_section): Likewise.
2259 * elf64-s390.c: Same changes as for elf32-s390.c.
2260 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2261 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2262 BFD_RELOC_390_TLS_GOTIE20.
2263 * bfd-in2.h: Regenerate.
2264 * libbfd.h: Likewise.
2265
2266 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2267
2268 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2269 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2270
2271 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2272
2273 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2274 Replace PTR with void *. Formatting.
2275 * archive64.c: Likewise.
2276 * archures.c: Likewise.
2277 * bfd-in.h: Likewise.
2278 * bfd.c: Likewise.
2279 * bfdio.c: Likewise.
2280 * bfdwin.c: Likewise.
2281 * cache.c: Likewise.
2282 * corefile.c: Likewise.
2283 * format.c: Likewise.
2284 * init.c: Likewise.
2285 * libbfd-in.h: Likewise.
2286 * libbfd.c: Likewise.
2287 * linker.c: Likewise.
2288 * opncls.c: Likewise.
2289 * reloc.c: Likewise.
2290 * section.c: Likewise.
2291 * simple.c: Likewise.
2292 * syms.c: Likewise.
2293 * targets.c: Likewise.
2294 * bfd-in2.h: Regenerate.
2295 * libbfd.h: Regenerate.
2296
2297 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2298 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2299 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2300 (bfd_getb64): Rewrite without parens.
2301 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2302 * cache.c (insert, snip): Remove INLINE.
2303 * linker.c (bfd_link_add_undef): Likewise.
2304
2305 2003-06-29 Andreas Jaeger <aj@suse.de>
2306
2307 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2308 unnecessary prototypes. Replace PTR with void *.
2309 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2310 trim plt entries. Move undefweak non-default visibility test ...
2311 (allocate_dynrelocs): ... from here.
2312 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2313 Change all callers.
2314 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2315 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2316 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2317 dynreloc and .got relocs.
2318 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2319 for .got relocs.
2320
2321 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2322
2323 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2324
2325 2003-06-27 Nick Clifton <nickc@redhat.com>
2326
2327 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2328 bfd_add_gnu_debuglink_section and only create the section, do not
2329 fill in its contents.
2330 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2331 contents of a .gnu-debuglink section.
2332 * bfd-in2.h: Regenerate.
2333
2334 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2335
2336 * elfxx-mips.c: Revert .got alignment to 2**4.
2337
2338 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2339
2340 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2341
2342 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2343
2344 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2345 relocation header setup.
2346
2347 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2348
2349 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2350 (ppc_elf_reloc_type_lookup): Modify comment.
2351 (ppc_elf_info_to_howto): Ditto.
2352 (ppc_elf_relocate_section): Ditto.
2353 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2354
2355 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2356
2357 * aout-ns32k.c: Correct spelling of "relocatable".
2358 * aoutx.h: Likewise.
2359 * bfd-in.h: Likewise.
2360 * bfd.c: Likewise.
2361 * bout.c: Likewise.
2362 * coff-a29k.c: Likewise.
2363 * coff-alpha.c: Likewise.
2364 * coff-arm.c: Likewise.
2365 * coff-i386.c: Likewise.
2366 * coff-i860.c: Likewise.
2367 * coff-i960.c: Likewise.
2368 * coff-m68k.c: Likewise.
2369 * coff-m88k.c: Likewise.
2370 * coff-mcore.c: Likewise.
2371 * coff-mips.c: Likewise.
2372 * coff-or32.c: Likewise.
2373 * coff-ppc.c: Likewise.
2374 * coff-rs6000.c: Likewise.
2375 * coff-sh.c: Likewise.
2376 * coff-tic80.c: Likewise.
2377 * coff64-rs6000.c: Likewise.
2378 * cofflink.c: Likewise.
2379 * cpu-ns32k.c: Likewise.
2380 * ecoff.c: Likewise.
2381 * ecofflink.c: Likewise.
2382 * elf-bfd.h: Likewise.
2383 * elf-eh-frame.c: Likewise.
2384 * elf-hppa.h: Likewise.
2385 * elf-m10200.c: Likewise.
2386 * elf-m10300.c: Likewise.
2387 * elf.c: Likewise.
2388 * elf32-arm.h: Likewise.
2389 * elf32-avr.c: Likewise.
2390 * elf32-cris.c: Likewise.
2391 * elf32-d10v.c: Likewise.
2392 * elf32-dlx.c: Likewise.
2393 * elf32-fr30.c: Likewise.
2394 * elf32-frv.c: Likewise.
2395 * elf32-h8300.c: Likewise.
2396 * elf32-hppa.c: Likewise.
2397 * elf32-i370.c: Likewise.
2398 * elf32-i386.c: Likewise.
2399 * elf32-i860.c: Likewise.
2400 * elf32-i960.c: Likewise.
2401 * elf32-ip2k.c: Likewise.
2402 * elf32-iq2000.c: Likewise.
2403 * elf32-m32r.c: Likewise.
2404 * elf32-m68hc11.c: Likewise.
2405 * elf32-m68hc1x.c: Likewise.
2406 * elf32-m68k.c: Likewise.
2407 * elf32-mcore.c: Likewise.
2408 * elf32-mips.c: Likewise.
2409 * elf32-msp430.c: Likewise.
2410 * elf32-openrisc.c: Likewise.
2411 * elf32-ppc.c: Likewise.
2412 * elf32-s390.c: Likewise.
2413 * elf32-sh.c: Likewise.
2414 * elf32-sh64.c: Likewise.
2415 * elf32-sparc.c: Likewise.
2416 * elf32-v850.c: Likewise.
2417 * elf32-vax.c: Likewise.
2418 * elf32-xstormy16.c: Likewise.
2419 * elf32-xtensa.c: Likewise.
2420 * elf64-alpha.c: Likewise.
2421 * elf64-hppa.c: Likewise.
2422 * elf64-mips.c: Likewise.
2423 * elf64-mmix.c: Likewise.
2424 * elf64-ppc.c: Likewise.
2425 * elf64-s390.c: Likewise.
2426 * elf64-sh64.c: Likewise.
2427 * elf64-sparc.c: Likewise.
2428 * elf64-x86-64.c: Likewise.
2429 * elfcode.h: Likewise.
2430 * elflink.h: Likewise.
2431 * elfn32-mips.c: Likewise.
2432 * elfxx-ia64.c: Likewise.
2433 * elfxx-mips.c: Likewise.
2434 * i386linux.c: Likewise.
2435 * ieee.c: Likewise.
2436 * libcoff-in.h: Likewise.
2437 * linker.c: Likewise.
2438 * m68klinux.c: Likewise.
2439 * pdp11.c: Likewise.
2440 * pe-mips.c: Likewise.
2441 * peXXigen.c: Likewise.
2442 * reloc.c: Likewise.
2443 * reloc16.c: Likewise.
2444 * sparclinux.c: Likewise.
2445 * sunos.c: Likewise.
2446 * syms.c: Likewise.
2447 * versados.c: Likewise.
2448 * vms.c: Likewise.
2449 * xcofflink.c: Likewise.
2450 * bfd-in2.h: Regenerate.
2451 * libcoff.h: Regenerate.
2452 * libbfd.h: Regenerate.
2453
2454 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2455
2456 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2457 local sym errors.
2458
2459 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2460 prototypes and casts. Replace PTR with void *. Formatting.
2461 * elf32-ppc.c: Likewise. Break long strings too.
2462 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2463 (ppc_elf_unhandled_reloc): Internationalize error message.
2464 * elf32-ppc.h: Remove PARAMS.
2465
2466 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2467
2468 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2469 APUinfo slots.
2470 (ppc_elf_final_write_processing): Likewise.
2471
2472 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2473
2474 * elflink.h (elf_link_input_bfd): Check raw size when using
2475 kept_section to preserve debug information discarded by
2476 linkonce.
2477
2478 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2479
2480 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2481 (ppc64_elf_setup_section_lists): Set it.
2482 (ppc64_elf_relocate_section): Check sym section id against top_id.
2483 (ppc_build_one_stub): Comment on top_id.
2484
2485 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2486
2487 * config.bfd: Add tic4x-*-rtems*.
2488
2489 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2490
2491 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2492 prototypes and casts. Replace PTR with void *. Format copyright.
2493 Mention ABI links.
2494 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2495 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2496 (ppc_type_of_stub): Make r_type an enum.
2497 (ppc64_elf_size_stubs): Likewise.
2498 * elf64-ppc.h: Remove PARAMS macro.
2499
2500 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2501
2502 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2503 elf hash tab fields.
2504
2505 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2506 (ppc64_elf_info_to_howto): Likewise.
2507 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2508 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2509
2510 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2511
2512 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2513 reloc overflow on discarded eh_frame entries.
2514
2515 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2516
2517 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2518 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2519 Return error condition.
2520 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2521 that have has_gp_reloc set.
2522 (struct ppc_link_hash_table): Add stub_count.
2523 (ppc_build_one_stub): Increment it.
2524 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2525 individual fields.
2526 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2527
2528 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2529
2530 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2531 size calculation from addend. Round size up.
2532
2533 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2534
2535 * elf32-cris.c (cris_elf_relocate_section) <case
2536 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2537 symbol from a normal object or an undefined weak symbol.
2538
2539 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2540
2541 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2542 R_PPC64_TOC relocs.
2543
2544 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2545
2546 * section.c (struct sec): Put back kept_section.
2547 (STD_SECTION): Put back kept_section initialization.
2548 * bfd-in2.h: Regenerate.
2549
2550 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2551 sections for relocateable output. Use kept_section to preserve
2552 debug information discarded by linkonce.
2553
2554 2003-06-17 Roland McGrath <roland@redhat.com>
2555
2556 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2557 segment-relative relocation between different segments.
2558
2559 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2560
2561 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2562 optimizations earlier.
2563
2564 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2565 Restore previous input_list type.
2566 (ppc64_elf_link_hash_table_create): Undo last change.
2567 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2568 per output section, but don't bother with bfd_abs_section marker.
2569 (ppc64_elf_next_input_section): Adjust for multiple input section
2570 lists.
2571 (group_sections): Likewise.
2572
2573 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2574
2575 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2576 *r_offset == r_addend for RELATIVE relocs against .got.
2577
2578 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2579
2580 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2581
2582 2003-06-17 Nick Clifton <nickc@redhat.com>
2583
2584 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2585 in the vtable_entries_used array to allow for the accessing
2586 the largest element.
2587
2588 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2589
2590 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2591 input_list.
2592 (ppc64_elf_link_hash_table_create): Init input_list here.
2593 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2594 per output section. Set toc_off for abs and other standard sections.
2595 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2596 (ppc64_elf_next_input_section): Adjust for single input section list.
2597 Don't set toc_curr from input bfds that haven't set elf_gp.
2598 (group_sections): Adjust for single input section list.
2599
2600 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2601
2602 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2603
2604 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2605 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2606 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2607 got section for RELATIVE relocs. Fix wrong comment. Change condition
2608 under which dynamic relocs update the section contents.
2609
2610 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2611
2612 * config.bfd: Add i386-netbsd-gnu target.
2613
2614 2003-06-12 Nick Clifton <nickc@redhat.com>
2615
2616 * opncls.c (calc_crc32): Rename to
2617 bfd_calc_gnu_debuglink_crc32 and export.
2618 (GNU_DEBUGLINK): Define and use to replace occurrences of
2619 hard-coded ".gnu_debuglink" in the code.
2620 (get_debug_link_info): Prevent aborts by replacing call to
2621 xmalloc with a call to malloc.
2622 (find_separate_debug_file): Prevent aborts by replacing calls
2623 to xmalloc and xstrdup with calls to malloc and strdup.
2624 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2625 section to a bfd.
2626 * bfd-in2.h: Regenerate.
2627
2628 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2629
2630 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2631 New target (was i[3-7]86-*-openbsd* before).
2632 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2633 (vax-*-openbsd*): New target.
2634
2635 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2636
2637 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2638 for n32, too.
2639 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2640 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2641 (mips_elf_create_got_section): Likewise.
2642 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2643
2644 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2645
2646 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2647 (elf_mips_howto_table_rel): Use it.
2648 (gprel32_with_gp): Move prototype.
2649 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2650 Use mips_elf_generic_reloc.
2651 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2652 Code cleanup.
2653 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2654 zero addend.
2655 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2656 as in the other *_gprel*_reloc functions.
2657 (gprel32_with_gp): Handle partial_inplace properly.
2658 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2659 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2660 Do addend handling directly instead of calling
2661 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2662 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2663 of zero addend. Handle partial_inplace properly.
2664 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2665 addend.
2666 (mips_elf64_gprel16_reloc): Likewise.
2667 (mips_elf64_literal_reloc): Likewise.
2668 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2669 logic as in the other *_gprel*_reloc functions. Handle
2670 partial_inplace properly.
2671 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2672 addend. Handle partial_inplace properly.
2673 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2674 of calling _bfd_mips_elf_gprel16_with_gp.
2675 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2676 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2677 of zero addend.
2678 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2679 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2680 of calling _bfd_mips_elf_gprel16_with_gp.
2681 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2682 partial_inplace properly. Fix wrong addend handling. Fix overflow
2683 check.
2684 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2685 exported.
2686 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2687 (_bfd_mips_elf_relocate_section): Likewise.
2688 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2689 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2690 (_bfd_mips_elf_sign_extend): New prototype.
2691
2692 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2693
2694 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2695 New target (was sparc-*-openbsd* before).
2696 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2697
2698 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2699 * configure: Regenerate.
2700
2701 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2702
2703 * po/Make-in (DESTDIR): New.
2704 (install-data-yes): Support $(DESTDIR).
2705 (uninstall): Likewise.
2706
2707 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2708
2709 * Makefile.am (config.status): Depend on version.h.
2710 Run "make dep-am".
2711 * Makefile.in: Regenerate.
2712 * po/SRC-POTFILES.in: Regenerate.
2713
2714 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2715 Gary Hade <garyhade@us.ibm.com>
2716
2717 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2718
2719 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2720
2721 * archures.c (bfd_mach_h8300sxn): New architecture.
2722 * bfd-in2.h: Regenerate.
2723 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2724 (h8300sxn_info_struct): New.
2725 (h8300sx_info_struct): Link to it.
2726 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2727 (elf32_h8_final_write_processing): Likewise.
2728
2729 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2730
2731 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2732 elfxx-target.h so that we can use elf_backend_got_header_size.
2733 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2734 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2735 associated macros.
2736 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2737 dst_mask.
2738 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2739 ppc_stub_plt_branch_r2off.
2740 (struct ppc_stub_hash_entry): Reorganize.
2741 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2742 toc_curr, toc_off and emit_stub_syms.
2743 (ppc64_elf_link_hash_table_create): Init them.
2744 (ppc_stub_name): Correct string size.
2745 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2746 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2747 used.
2748 (ppc_type_of_stub): Tweak root.type test.
2749 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2750 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2751 ppc_stub_plt_branch_r2off.
2752 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2753 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2754 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2755 Initialize elf_gp and toc_curr.
2756 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2757 (ppc64_elf_next_input_section): Set toc_off.
2758 (group_sections): Ensure groups have the same TOC.
2759 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2760 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2761 Build new glink stub.
2762 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2763 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2764 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2765 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2766 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2767 (STD_SECTION): Update.
2768 * ecoff.c (bfd_debug_section): Update comment.
2769 * bfd-in2.h: Regenerate.
2770
2771 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2772
2773 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2774 NULL function pointers.
2775
2776 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2777
2778 * simple.c (bfd_simple_get_relocated_section_contents): Call
2779 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2780
2781 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2782
2783 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2784 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2785 swaptables.
2786 * coff-tic4x.c: Ditto
2787 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2788 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2789 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2790 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2791 swap tables.
2792 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2793 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2794 * coff-apollo.c: Ditto
2795 * coff-arm.c: Ditto
2796 * coff-h8300.c: Ditto
2797 * coff-h8500.c: Ditto
2798 * coff-i960.c: Ditto
2799 * coff-m68k.c: Ditto
2800 * coff-m88k.c: Ditto
2801 * coff-mcore.c: Ditto
2802 * coff-sh.c: Ditto
2803 * coff-sparc.c: Ditto
2804 * coff-tic80.c: Ditto
2805 * coff-we32k.c: Ditto
2806 * coff-z8k.c: Ditto
2807 * coff-w65.c: Ditto
2808
2809 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2810
2811 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2812 initialization bug
2813
2814 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2815
2816 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2817 (bfd_section_from_phdr): Likewise.
2818 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2819 (get_program_header_size): Count with PT_GNU_STACK.
2820 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2821 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2822
2823 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2824
2825 * elflink.h (elf_link_input_bfd): Call linker error_handler
2826 for discarded definitions.
2827
2828 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2829
2830 * syms.c (decode_section_type): Return 'n' if section flags are
2831 SEC_HAS_CONTENTS && SEC_READONLY.
2832
2833 2003-06-03 Nick Clifton <nickc@redhat.com>
2834
2835 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2836 R_V850_ABS32. Add entry for R_V850_REL32.
2837 (v850_elf_reloc_map): Likewise.
2838 (v850_elf_check_relocs): Likewise.
2839 (v850_elf_perform_relocation): Likewise.
2840 (v850_elf_final_link_relocate): Likewise. Include computation
2841 to make R_V850_REl32 pc-relative.
2842
2843 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2844
2845 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2846 and DT_DEBUG dynamic tag even for position independent executables.
2847 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2848
2849 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2850
2851 * config.bfd: Move obsolete entries out of the range of the
2852 targmatch sed script.
2853
2854 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2855
2856 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2857
2858 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2859
2860 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2861 plt entries, not just 8191.
2862
2863 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2864
2865 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2866 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2867
2868 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2869 Jakub Jelinek <jakub@redhat.com>
2870
2871 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2872 instead of info->shared where appropriate.
2873 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2874 * elflink.c (_bfd_elf_create_got_section): Likewise.
2875 (_bfd_elf_link_create_dynamic_sections): Likewise.
2876 (_bfd_elf_link_assign_sym_version): Likewise.
2877 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2878 and DT_DEBUG dynamic tag even for position independent executables.
2879 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2880 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2881 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2882 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2883 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2884 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2885 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2886 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2887 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2888
2889 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2890
2891 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2892 signalled thread.
2893 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2894
2895 2003-05-29 Nick Clifton <nickc@redhat.com>
2896
2897 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2898 Tidy up formatting.
2899 * Makefile.am: Add dependency on safe-ctype.h.
2900 * Makefile.in: Regenerate.
2901
2902 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2903
2904 * elfxx-mips.c: Don't force symbols local unconditionally.
2905
2906 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2907
2908 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2909 undefined_symbol call.
2910
2911 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2912
2913 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2914 (mips_elf_link_hash_table): Likewise.
2915
2916 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2917
2918 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2919 R_MIPS_GNU_REL16_S2 support.
2920 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2921 (mips_elf64_rtype_to_howto): Use it.
2922 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2923 R_MIPS_GNU_REL16_S2 support.
2924 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2925 (mips_elf_n32_rtype_to_howto): Use it.
2926
2927 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2928
2929 * som.h: Define PA_2_0 before including a.out.h
2930
2931 2003-05-07 Eric Christopher <echristo@redhat.com>
2932 Alexandre Oliva <aoliva@redhat.com>
2933
2934 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2935 pic tests, change to warning.
2936 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2937
2938 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2939
2940 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2941 well as shle-...-netbsdelf. Remove duplicate entry.
2942
2943 2003-05-21 Nick Clifton <nickc@redhat.com>
2944
2945 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2946 for X_STORMY16_REL_12 reloc.
2947
2948 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2949 the type of the hash table in the bfd_link_info structure.
2950 (bfd_elf_get_runpath_list): Likewise.
2951
2952 2003-05-19 Roland McGrath <roland@redhat.com>
2953
2954 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2955 * bfd-in.h: Declare it.
2956 * bfd-in2.h: Regenerated.
2957 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2958 * elf-bfd.h (struct elf_backend_data): New function pointer member
2959 elf_backend_bfd_from_remote_memory.
2960 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2961 Declare them.
2962 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2963 (elfNN_bed): Add that to the initializer.
2964
2965 2003-05-15 Roland McGrath <roland@redhat.com>
2966
2967 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2968
2969 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2970
2971 * elflink.h (elf_link_output_extsym): Only issue error about !=
2972 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2973
2974 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2975
2976 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2977 when removing the old definition for symbols with non-default
2978 visibility.
2979
2980 2003-05-18 Jason Eckhardt <jle@rice.edu>
2981
2982 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2983
2984 2003-05-17 Andreas Schwab <schwab@suse.de>
2985
2986 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2987 elf_section_data during processing of pc-relative and absolute
2988 relocations.
2989 (elf_m68k_relocate_section): Use the cached reloc section instead
2990 of computing it again. Fix handling of visibility. Don't modify
2991 addend when copying over a relocation into the output.
2992
2993 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2994
2995 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2996 to trim plt entries. Move undefweak non-default visibility test..
2997 (allocate_dynrelocs): ..from here.
2998 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2999 dynamic_sections_created here. Update comment. Move undefweak
3000 non-default visibility test..
3001 (allocate_dynrelocs): ..from here. Fix comment.
3002 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3003 to trim plt entries. Move undefweak non-default visibility test..
3004 (allocate_dynrelocs): ..from here. Fix comment.
3005 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
3006 STV_DEFAULT rather than comparing with zero.
3007 * elflink.c (_bfd_elf_merge_symbol): Likewise.
3008 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
3009
3010 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3011
3012 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
3013 pointers.
3014 (_bfd_set_gp_value): Likewise.
3015
3016 2003-05-16 Michael Snyder <msnyder@redhat.com>
3017 From Bernd Schmidt <bernds@redhat.com>
3018 * archures.c (bfd_mach_h8300sx): New.
3019 * bfd-in2.h: Regenerate.
3020 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
3021 (h8300sx_info_struct): New.
3022 (h8300s_info_struct): Link to it.
3023 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
3024 (elf32_h8_final_write_processing): Likewise.
3025 (elf32_h8_relax_section): Likewise.
3026
3027 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
3028
3029 * config.bfd: Accept i[3-7]86 variants.
3030 * configure.host: Likewise.
3031 * configure.in: Likewise.
3032 * configure: Regenerate.
3033
3034 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3035
3036 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
3037 symbol.
3038
3039 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3040
3041 * elflink.h (elf_link_check_versioned_symbol): Also allow
3042 the base version.
3043
3044 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3045 H.J. Lu <hongjiu.lu@intel.com>
3046
3047 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3048 (elf_i386_relocate_section): Likewise.
3049 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3050 (ppc_elf_relocate_section): Likewise.
3051 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3052 (ppc64_elf_relocate_section): Likewise.
3053
3054 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3055
3056 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3057
3058 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3059
3060 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3061 processor capability, allow merge of HC12 and HCS12 in some cases.
3062 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3063 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3064 (bfd_m68hc12_arch): Link it.
3065 (scan_mach): New function.
3066
3067 2003-05-13 Andrew Haley <aph@redhat.com>
3068
3069 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3070
3071 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3072 H.J. Lu <hongjiu.lu@intel.com>
3073
3074 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3075 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3076 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3077 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3078 (ppc_elf_relocate_section): Likewise.
3079 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3080 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3081 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3082 relocs need no other types.
3083 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3084 dynreloc check.
3085 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3086 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3087 .got relocs.
3088
3089 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3090
3091 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3092 copy ELF_LINK_NON_GOT_REF from weakdef.
3093 (allocate_dynrelocs): For undef weak syms with non-default
3094 visibility, a) don't allocate plt entries, b) don't allocate
3095 .got relocs, c) discard dyn rel space
3096 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3097 don't generate dynamic relocs.
3098 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3099 for weakdefs when symbol already adjusted.
3100
3101 2003-05-12 Nick Clifton <nickc@redhat.com>
3102
3103 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3104 overflow detection for R_XSTORMY16_16 reloc.
3105
3106 2003-05-12 Paul Clarke <paulc@senet.com.au>
3107
3108 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3109
3110 2003-05-11 Jason Eckhardt <jle@rice.edu>
3111
3112 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3113 adjust upper bits.
3114 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3115 proper place.
3116 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3117 proper place.
3118
3119 2003-05-11 Andreas Schwab <schwab@suse.de>
3120
3121 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3122 complicated tests for unresolvable relocs with a simple direct
3123 scheme using "unresolved_reloc" var. Report some detail on
3124 bfd_reloc_outofrange and similar errors.
3125
3126 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3127
3128 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3129 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3130 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3131 * elf64-s390.c: Likewise.
3132
3133 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3134
3135 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3136 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3137 ELF_LINK_NON_GOT_REF from weakdef.
3138 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3139 already been adjusted before treating it specially.
3140 * el64-s390.c: Likwise.
3141
3142 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3143
3144 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3145 non-default visibility, a) don't make them dynamic, b) discard
3146 space for dynamic relocs.
3147 (elf_s390_relocate_section): Initialize the GOT entries and skip
3148 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3149 symbols with non-default visibility.
3150 * elf64-s390.c: Likewise.
3151
3152 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3153
3154 * cpu-arm.c (arm_check_note): Warning fix.
3155 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3156 to keep relocs if edited.
3157 (iq2000_elf_print_private_bfd_data): Return TRUE.
3158 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3159 ELF64_R_SYM.
3160 (elfNN_ia64_relax_ldxmov): Warning fix.
3161 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3162 * xtensa-modules.c (get_num_opcodes): Warning fix.
3163
3164 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3165
3166 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3167
3168 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3169
3170 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3171 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3172 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3173 (bfd_elf_record_link_assignment): Move from elflink.h.
3174 (_bfd_elf_merge_symbol): Likewise.
3175 (_bfd_elf_add_default_symbol): Likewise.
3176 (_bfd_elf_export_symbol): Likewise.
3177 (_bfd_elf_link_find_version_dependencies): Likewise.
3178 (_bfd_elf_link_assign_sym_version): Likewise.
3179 (_bfd_elf_link_read_relocs): Likewise.
3180 (_bfd_elf_link_size_reloc_section): Likewise.
3181 (_bfd_elf_fix_symbol_flags): Likewise.
3182 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3183 (_bfd_elf_link_sec_merge_syms): Likewise.
3184 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3185 and bed->s->sizeof_rela.
3186 (_bfd_elf_link_output_relocs): Likewise.
3187 * elf-bfd.h (struct elf_size_info): Rename file_align to
3188 log_file_align.
3189 (struct elf_info_failed): Move from elflink.h.
3190 (struct elf_assign_sym_version_info): Likewise.
3191 (struct elf_find_verdep_info): Likewise.
3192 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3193 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3194 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3195 _bfd_elf_link_assign_sym_version,
3196 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3197 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3198 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3199 _bfd_elf_link_sec_merge_syms): Declare.
3200 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3201 (_bfd_elf32_link_read_relocs): Likewise.
3202 (bfd_elf64_link_create_dynamic_sections): Likewise.
3203 (_bfd_elf64_link_read_relocs): Likewise.
3204 * elflink.h: Move lots o' stuff elsewhere.
3205 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3206 (bfd_elf64_record_link_assignment): Likewise.
3207 (bfd_elf_record_link_assignment): Declare.
3208 * bfd-in2.h: Regenerate.
3209 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3210 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3211 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3212 (assign_file_positions_for_segments): Likewise.
3213 (assign_file_positions_except_relocs): Likewise.
3214 (swap_out_syms, elfcore_write_note): Likewise.
3215 * elf-m10200.c: Adjust for changed function names.
3216 * elf-m10300.c: Likewise.
3217 * elf32-arm.h: Likewise.
3218 * elf32-h8300.c: Likewise.
3219 * elf32-hppa.c: Likewise.
3220 * elf32-ip2k.c: Likewise.
3221 * elf32-m32r.c: Likewise.
3222 * elf32-m68hc11.c: Likewise.
3223 * elf32-m68hc1x.c: Likewise.
3224 * elf32-m68k.c: Likewise.
3225 * elf32-mips.c: Likewise.
3226 * elf32-ppc.c: Likewise.
3227 * elf32-sh.c: Likewise.
3228 * elf32-v850.c: Likewise.
3229 * elf32-xtensa.c: Likewise.
3230 * elf64-alpha.c: Likewise.
3231 * elf64-hppa.c: Likewise.
3232 * elf64-mmix.c: Likewise.
3233 * elf64-ppc.c: Likewise.
3234 * elf64-sh64.c: Likewise.
3235 * elfxx-ia64.c: Likewise.
3236 * elfxx-mips.c: Likewise.
3237 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3238 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3239 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3240 * elf64-mips.c (mips_elf64_size_info): Likewise.
3241 * elf64-s390.c (s390_elf64_size_info): Likewise.
3242 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3243
3244 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3245
3246 * elflink.h (elf_add_default_symbol): After skipping the
3247 unversioned symbol, go to non-default one.
3248
3249 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3250
3251 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3252 want_plt field.
3253 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3254 for symbols with non-default visibility.
3255
3256 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3257
3258 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3259 case that a DSO references a hidden symbol which may be
3260 satisfied by a versioned symbol in another DSO.
3261 (elf_link_output_extsym): Check versioned definition for hidden
3262 symbol referenced by a DSO.
3263
3264 2003-05-07 Nick Clifton <nickc@redhat.com>
3265
3266 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3267 R_XSTORMY16_16 reloc to ignore overflows.
3268
3269 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3270
3271 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3272 error message for mixing different-endian files. Check for ABI
3273 compatibility of input files with the selected emulation.
3274
3275 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3276
3277 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3278 non-default visibility, a) don't make them dynamic, b) discard
3279 space for dynamic relocs.
3280 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3281
3282 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3283 non-default visibility, a) don't allocate plt entries, b) don't
3284 allocate .got relocs, c) discard dyn rel space,
3285 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3286 don't generate dynamic relocs.
3287 * elf64-ppc.c (allocate_dynrelocs): As above.
3288 (ppc64_elf_relocate_section): As above.
3289
3290 2003-05-05 Andreas Jaeger <aj@suse.de>
3291
3292 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3293 relocation entries for weak undefined symbols with non-default
3294 visibility.
3295 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3296 skip R_386_32/R_386_PC32 for weak undefined symbols with
3297 non-default visibility.
3298
3299 2003-05-04 H.J. Lu <hjl@gnu.org>
3300
3301 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3302 relocation entries for weak undefined symbols with non-default
3303 visibility.
3304 (elf_i386_relocate_section): Initialize the GOT entries and
3305 skip R_386_32/R_386_PC32 for weak undefined symbols with
3306 non-default visibility.
3307
3308 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3309 descriptors for weak undefined symbols with non-default
3310 visibility.
3311 (allocate_dynrel_entries): Don't allocate relocation entries
3312 for symbols resolved to 0.
3313 (set_got_entry): Don't install dynamic relocation for weak
3314 undefined symbols with non-default visibility.
3315 (set_pltoff_entry): Likewise.
3316
3317 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3318 with non-default visibility.
3319 (elf_link_output_extsym): Don't make weak undefined symbols
3320 with non-default visibility dynamic.
3321
3322 2003-05-04 H.J. Lu <hjl@gnu.org>
3323
3324 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3325
3326 2003-05-04 H.J. Lu <hjl@gnu.org>
3327
3328 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3329 symbol dynamic. Check indirection when removing the old
3330 definition for symbols with non-default visibility.
3331 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3332
3333 2003-05-02 Nick Clifton <nickc@redhat.com>
3334
3335 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3336 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3337 unsigned overflow.
3338
3339 2003-05-02 Andreas Jaeger <aj@suse.de>
3340
3341 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3342 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3343 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3344 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3345 ELF_LINK_NON_GOT_REF from weakdef.
3346
3347 2003-05-02 Charles Lepple <clepple@ghz.cc>
3348 Nick Clifton <nickc@redhat.com>
3349
3350 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3351 * aclocal.m4: Regenerate.
3352 * configure: Regenerate.
3353 * Makefile.in: Regenerate.
3354
3355 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3356
3357 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3358 weakdef sym has already been adjusted before treating it specially.
3359 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3360 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3361 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3362 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3363
3364 2003-04-28 H.J. Lu <hjl@gnu.org>
3365
3366 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3367 the relax finalize pass.
3368
3369 * section.c (struct sec): Add need_finalize_relax and remove
3370 flag11.
3371 (STD_SECTION): Update struct sec initializer.
3372 * bfd-in2.h: Regenerated.
3373
3374 2003-04-28 H.J. Lu <hjl@gnu.org>
3375
3376 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3377 to copy any information related to dynamic linking when we flip
3378 the indirection.
3379
3380 2003-04-27 H.J. Lu <hjl@gnu.org>
3381
3382 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3383 (ELF_LINK_DYNAMIC_WEAK): New.
3384
3385 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3386 a symbol should be skipped. Ignore definitions in dynamic
3387 objects for symbols with non-default visibility.
3388 (elf_add_default_symbol): Adjusted.
3389 (elf_link_add_object_symbols): Check if a symbol should be
3390 skipped. Don't merge the visibility field with the one from
3391 a dynamic object.
3392 (elf_link_check_versioned_symbol): Use undef_bfd.
3393 (elf_link_output_extsym): Warn if a forced local symbol is
3394 referenced from dynamic objects. Make non-weak undefined symbol
3395 with non-default visibility a fatal error.
3396
3397 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3398
3399 * configure.in: Bump version on HEAD to 2.14.90.
3400 * configure: Regenerated.
3401
3402 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3403
3404 PR savannah/3331:
3405 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3406 when we couldn't relax something.
3407
3408 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3409
3410 * elflink.h (elf_merge_symbol): When we find a regular definition
3411 for an indirect symbol, flip the indirection so that the old
3412 direct symbol now points to the new definition.
3413
3414 2003-04-24 Roland McGrath <roland@redhat.com>
3415
3416 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3417
3418 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3419
3420 * elf32-ppc.c: Formatting and comment fixes.
3421 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3422 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3423
3424 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3425
3426 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3427 * bfd-in2.h: Rebuilt.
3428 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3429 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3430 & H8300SNMAGIC.
3431 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3432 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3433 (h8300sn_info_struct, h8300hn_info_struct): New.
3434 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3435 (elf32_h8_final_write_processing): Likewise.
3436
3437 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3438
3439 * elf32-sh.c (tpoff): New.
3440 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3441 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3442 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3443 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3444 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3445 (dtpoff_base): Fix wrong indentation.
3446 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3447 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3448 R_SH_TLS_TPOFF32 relocations.
3449
3450 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3451
3452 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3453 * cpu-sh.c: Likewise.
3454 * elf32-sh.c: Likewise.
3455 * reloc.c (bfd_reloc_code_real): Likewise.
3456 * elf32-sh64-com.c: Change comment to refer to SuperH.
3457 * elf32-sh64.c: Likewise.
3458 * elf64-sh64.c: Likewise.
3459 * bfd-in2.h (enum bfd_architecture): Regenerate.
3460
3461 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3462
3463 From Julien LEMOINE <speedblue@debian.org>
3464 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3465 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3466
3467 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3468
3469 * archures.c: Replace references to Mitsubishi M32R with references
3470 to Renesas M32R.
3471 * relocs.c: Likewise.
3472 * bfd-in2.h: Regenerate.
3473
3474 2003-04-21 Richard Henderson <rth@redhat.com>
3475
3476 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3477 executable when a symbol is defined both regular and dynamic.
3478
3479 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3480
3481 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3482 (elf32-m68hc1x.lo): Update dependencies
3483 * configure.in: Add elf32-m68hc1x.lo.
3484 * configure: Rebuild.
3485 * Makefile.in: Rebuild.
3486
3487 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3488
3489 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3490 (m68hc11_elf_hash_table_create): New function.
3491 (elf32_m68hc11_link_hash_table_free): New function.
3492 (stub_hash_newfunc): New function.
3493 (m68hc11_add_stub): New function.
3494 (elf32_m68hc11_add_symbol_hook): New function.
3495 (elf32_m68hc11_setup_section_lists): New function.
3496 (elf32_m68hc11_next_input_section): New function.
3497 (elf32_m68hc11_size_stubs): New function.
3498 (elf32_m68hc11_build_stubs): New function.
3499 (m68hc11_get_relocation_value): New function.
3500 (elf32_m68hc11_relocate_section): Call the above to redirect
3501 some relocations to the trampoline code.
3502 (m68hc11_elf_export_one_stub): New function.
3503 (m68hc11_elf_set_symbol): New function.
3504 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3505 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3506 is not yet initialized.
3507
3508 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3509 (elf32_m68hc11_stub_hash_entry): New struct.
3510 (m68hc11_page_info): Add trampoline handler address.
3511 (m68hc11_elf_link_hash_table): Add stubs generation members.
3512 (elf32_m68hc11_add_symbol_hook): Declare.
3513 (elf32_m68hc11_setup_section_lists): Declare.
3514 (elf32_m68hc11_size_stubs): Declare.
3515 (elf32_m68hc11_build_stubs): Declare.
3516
3517 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3518 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3519 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3520 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3521 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3522 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3523 (bfd_elf32_bfd_link_hash_table_create): Define.
3524 (elf_backend_add_symbol_hook): Define.
3525 (m68hc11_elf_bfd_link_hash_table_create): New function.
3526 (m68hc11_elf_build_one_stub): New function.
3527 (m68hc11_elf_size_one_stub): New function.
3528 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3529 (bfd_elf32_bfd_link_hash_table_create): Define.
3530
3531 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3532 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3533 (m68hc12_phys_addr): Ditto.
3534 (m68hc12_phys_page): Ditto.
3535 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3536 (elf32_m68hc11_gc_mark_hook): Likewise.
3537 (elf32_m68hc11_gc_sweep_hook): Likewise.
3538 (elf32_m68hc11_check_relocs): Likewise.
3539 (elf32_m68hc11_relocate_section): Likewise.
3540 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3541 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3542 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3543 (m68hc12_elf_build_one_stub): New function.
3544 (m68hc12_elf_size_one_stub): New function.
3545 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3546 (elf_backend_add_symbol_hook): Define.
3547 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3548
3549 2003-04-18 Nick Clifton <nickc@redhat.com>
3550
3551 * format.c (bfd_check_format_matches): Only check associated
3552 vector if the matching_vector has been created.
3553
3554 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3555
3556 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3557 2003-04-09's change.
3558
3559 2003-04-15 Brian Ford <ford@vss.fsi.com>
3560
3561 * peicode.h (coff_swap_scnhdr_in): If a section holds
3562 uninitialized data and is from an object file or from an
3563 executable image that has not initialized the s_size field, or if
3564 the physical size is padded, use the virtual size (stored in
3565 s_paddr) instead.
3566
3567 2003-04-15 H.J. Lu <hjl@gnu.org>
3568
3569 * elflink.h (elf_link_add_object_symbols): Properly report
3570 filename for alignment reduction.
3571
3572 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3573
3574 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3575 * reloc.c: Likewise.
3576 * coff-h8300.c: Likewise.
3577 * coff-h8500.c: Likewise.
3578 * coff-sh.c: Likewise.
3579 * cpu-h8300.c: Likewise.
3580 * cpu-sh.c: Likewise.
3581 * elf32-h8300.c: Likewise.
3582 * elf32-sh.c: Likewise.
3583 * elf32-sh64-com.c: Likewise.
3584 * elf32-sh64.c: Likewise.
3585 * elf64-sh64.c: Likewise.
3586 * bfd-in2.h: Regenerate.
3587
3588 2003-04-14 H.J. Lu <hjl@gnu.org>
3589
3590 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3591 alignment for common symbols. Warn reducing alignment for
3592 common symbols. Report old filename when symbol size changes.
3593
3594 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3595
3596 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3597 occurrences of the same test changed in the previous patch.
3598 Optimize.
3599
3600 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3601
3602 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3603 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3604 GOT_DISP/addend only if the symbol got a global GOT entry.
3605
3606 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3607
3608 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3609 GOT_PAGE/GOT_OFST referencing overridable symbol to
3610 GOT_DISP/addend.
3611 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3612 global symbol as GOT_DISP.
3613
3614 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3615
3616 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3617 next relocation on an undefined symbol.
3618
3619 2003-04-09 Richard Henderson <rth@redhat.com>
3620
3621 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3622 Ignore relocations against r_symndx == 0.
3623
3624 2003-04-09 H.J. Lu <hjl@gnu.org>
3625
3626 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3627 FALSE for undefined symbols.
3628 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3629
3630 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3631
3632 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3633 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3634 addr_size.
3635
3636 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3637
3638 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3639 pointer size from ABI, not arch_bits_per_address.
3640
3641 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3642
3643 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3644 constants for n32 ABI.
3645
3646 2003-04-06 Andrew Cagney <cagney@redhat.com>
3647
3648 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3649 free that leads to GDB vs BFD memory corruption.
3650
3651 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3652
3653 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3654 symbols that mark the end of the section.
3655 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3656 converting to a relative branch so that the offset is computed after
3657 the relaxation; also relocate a jsr into a bsr if possible but don't
3658 relax them if they are to a far symbol as we need to call the
3659 trampoline code.
3660 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3661
3662 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3663
3664 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3665 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3666 * bfd-in2.h: Regenerate
3667 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3668 * cpu-tic4x.c: Ditto
3669
3670 2003-04-03 Nick Clifton <nickc@redhat.com>
3671
3672 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3673 differently for object files and executables.
3674 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3675 for object files or for executables who have not already
3676 initialised the field.
3677 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3678 the PE format bfd is an executable.
3679
3680 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3681
3682 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3683 here as it's too early to reliably determine locality.
3684 (ppc_elf_gc_sweep_hook): Likewise.
3685 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3686
3687 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3688
3689 * xtensa-modules.c: Remove comment indicating that this is a
3690 generated file.
3691
3692 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3693
3694 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3695
3696 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3697
3698 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3699 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3700 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3701 xtensa-modules.lo.
3702 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3703 xtensa-modules.c.
3704 (cpu-xtensa.lo): New target.
3705 (elf32-xtensa.lo): Likewise.
3706 (xtensa-isa.lo): Likewise.
3707 (xtensa-modules.lo): Likewise.
3708 * Makefile.in: Regenerate.
3709 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3710 (bfd_archures_list): Add bfd_xtensa_arch.
3711 * config.bfd: Handle xtensa-*-*.
3712 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3713 * configure: Regenerate.
3714 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3715 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3716 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3717 (bfd_elf32_xtensa_le_vec): Likewise.
3718 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3719 * cpu-xtensa.c: New file.
3720 * elf32-xtensa.c: Likewise.
3721 * xtensa-isa.c: Likewise.
3722 * xtensa-modules.c: Likewise.
3723 * libbfd.h: Regenerate.
3724 * bfd-in2.h: Likewise.
3725
3726 2003-04-01 Nick Clifton <nickc@redhat.com>
3727
3728 * archures.c (bfd_mach_arm_unknown): Define.
3729 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3730 bfd_arm_get_mach_from_notes): Prototype.
3731 * bfd-in2.h: Regenerate.
3732 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3733 bfd_arm_merge_machines.
3734 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3735 * coffcode.h (coff_set_arch_mach_hook): Call
3736 bfd_arm_get_mach_from_notes.
3737 * coffgen.c (coff_real_object_p): Revert previous delta.
3738 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3739 .note section.
3740 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3741 binaries compiled for different architectures..
3742 (bfd_arm_update_notes): New function: Update an ARM note section.
3743 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3744 number from an ARM note section.
3745 * elf32-arm.h (elf32_arm_object_p): Use
3746 bfd_arm_get_mach_from_notes.
3747 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3748 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3749
3750 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3751
3752 * dwarf2.c (read_attribute_value): Correct typo in comment.
3753
3754 2003-04-01 Nick Clifton <nickc@redhat.com>
3755
3756 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3757 instead of concat().
3758 (decode_line_info): Only free filename if it is not NULL.
3759 (add_line_info): Make a copy of the filename when storing it into
3760 the info structure.
3761
3762 2003-03-31 Andreas Schwab <schwab@suse.de>
3763 Daniel Jacobowitz <drow@mvista.com>
3764
3765 * simple.c (bfd_simple_get_relocated_section_contents): Add
3766 parameter symbol_table. Optionally use it instead of the symbol
3767 table from the bfd. Save and restore output offsets and output
3768 sections around bfd_get_relocated_section_contents. Fix a memory
3769 leak.
3770 (simple_save_output_info, simple_restore_output_info): New
3771 functions.
3772 * bfd-in2.h: Regenerate.
3773 * dwarf2.c (read_abbrevs): Use
3774 bfd_simple_get_relocated_section_contents instead of
3775 bfd_get_section_contents.
3776 (decode_line_info): Likewise.
3777 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3778 find_rela_addend.
3779 (find_rela_addend): Remove.
3780 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3781 debugging sections.
3782 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3783 not bfd_zalloc.
3784
3785 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3786
3787 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3788 bfd_alloc.
3789 * dwarf2.c (concat_filename): Always allocate space for the
3790 returned filename.
3791 (decode_line_info): Free the allocated filename returned by
3792 concat_filename.
3793 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3794 * elf.c (copy_private_bfd_data): Likewise.
3795 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3796 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3797 * format.c (bfd_check_format_matches): Likewise.
3798 * linker.c (bfd_generic_final_link): Likewise.
3799 * opncls.c (find_separate_debug_info): Likewise.
3800 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3801
3802 2003-03-28 H.J. Lu <hjl@gnu.org>
3803
3804 * elflink.h (elf_link_add_object_symbols): Correctly combine
3805 visibilities.
3806
3807 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3808
3809 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3810 to -1 before recomputing got offsets.
3811
3812 2003-03-26 Andreas Schwab <schwab@suse.de>
3813
3814 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3815 (elf_m68k_relocate_section): Use it to correctly handle symbols
3816 forced to be local.
3817 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3818 entries for symbols that are forced to be local.
3819
3820 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3821
3822 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3823 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3824 * elfn32-mips.c, elf64-mips.c: Use it.
3825
3826 2003-03-25 Stan Cox <scox@redhat.com>
3827 Nick Clifton <nickc@redhat.com>
3828
3829 Contribute support for Intel's iWMMXt chip - an ARM variant:
3830
3831 * archures.c: Add bfd_mach_arm_iWMMXt.
3832 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3833 * bfd-in2.h: Regenerate.
3834 * libbfd.h: Regenerate.
3835 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3836 object files to be linked with XScale ones.
3837 (coff_arm_final_link_postscript): Update note section.
3838 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3839 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3840 after identifying a coff binary.
3841 * cpu-arm.c (processors): Add iWMMXt.
3842 (arch_inf): Likewise.
3843 * elf32-arm.h (arm_object_p): Handle note section.
3844 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3845 be linked with XScale ones.
3846 (elf32_arm_section_flags): New function: Set flags on note section.
3847 (elf32_arm_final_write_processing): Handle note section.
3848
3849 2003-03-21 DJ Delorie <dj@redhat.com>
3850
3851 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3852 _bfd_elf_rela_local_sym.
3853
3854 2003-03-20 H.J. Lu <hjl@gnu.org>
3855
3856 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3857 non-ELF outputs.
3858
3859 2003-03-20 Nick Clifton <nickc@redhat.com>
3860
3861 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3862 $idata5 in case bfd_coff_final_link is not called.
3863
3864 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3865
3866 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3867 field.
3868 (canon_reloc_count): Define.
3869 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3870 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3871 reloc_count.
3872 (sparc64_elf_canonicalize_reloc): New routine.
3873 (bfd_elf64_canonicalize_reloc): Define.
3874
3875 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3876
3877 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3878 againt mergeable sections. Take r_addend into account when caching
3879 trampolines.
3880
3881 2003-03-18 Richard Henderson <rth@redhat.com>
3882
3883 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3884 local symbols that have no dyninfo.
3885
3886 2003-03-14 Gene Smith <gene.smith@siemens.com>
3887
3888 * ieee.c (ieee_write_expression): Handle the case where symbol is
3889 NULL.
3890 General formatting improvements.
3891
3892 2003-03-13 Nick Clifton <nickc@redhat.com>
3893
3894 * configure.in (LINGUAS): Add zh_CN.
3895 * configure: Regenerate.
3896 * po/zh_CN.po: New file.
3897
3898 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3899
3900 * aout-cris.c (BYTES_IN_WORD): Don't define.
3901 aout-encap.c: Likewise.
3902 aout-ns32k.c: Likewise.
3903 aout-tic30.c: Likewise.
3904 hp300bsd.c: Likewise.
3905 i386aout.c: Likewise.
3906 i386dynix.c: Likewise.
3907 i386linux.c: Likewise.
3908 i386lynx.c: Likewise.
3909 i386mach3.c: Likewise.
3910 m68k4knetbsd.c: Likewise.
3911 m68klinux.c: Likewise.
3912 m68klynx.c: Likewise.
3913 m68knetbsd.c: Likewise.
3914 m88kmach3.c: Likewise.
3915 mipsbsd.c: Likewise.
3916 newsos3.c: Likewise.
3917 sparclinux.c: Likewise.
3918 sparclynx.c: Likewise.
3919 sparcnetbsd.c: Likewise.
3920 vaxbsd.c: Likewise. Fix comment formatting.
3921
3922 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3923
3924 * Reverted 2003-03-02's patch.
3925
3926 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3927 overridable.
3928 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3929 mips_elf64_get_dynamic_reloc_upper_bound,
3930 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3931 (bfd_elf64_get_canonicalize_reloc,
3932 bfd_elf64_get_dynamic_reloc_upper_bound,
3933 bfd_elf64_canonicalize_dynamic_reloc): Define.
3934 (mips_elf64_slurp_reloc_table): Support dynamic.
3935 (mips_elf64_slurp_one_reloc_table): Adjust.
3936
3937 2003-03-12 Nick Clifton <nickc@redhat.com>
3938
3939 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3940 'index' to 'offset' in test for zero value.
3941
3942 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3943
3944 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3945 dynamic relocations pointing to local or section symbols, use the
3946 NULL symbol instead. Document the choice to not emit an
3947 additional R_MIPS_64 relocation.
3948
3949 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3950
3951 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3952 zero index dynamic tls relocs generated for the GOT. Tidy code.
3953 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3954 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3955
3956 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3957
3958 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3959 a tls_get_addr call.
3960
3961 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3962 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3963 ELF_LINK_NON_GOT_REF from weakdef.
3964 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3965 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3966 ELF_LINK_NON_GOT_REF from weakdef.
3967 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3968 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3969 ELF_LINK_NON_GOT_REF from weakdef.
3970
3971 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3972 Andrew Haley <aph@redhat.com>
3973
3974 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3975 output is relocateable.
3976
3977 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3978
3979 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3980 R_COMMENT.
3981
3982 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3983
3984 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3985 error messages.
3986 (ELIMINATE_COPY_RELOCS): Define to zero.
3987 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3988 TLSLD relocs. Report reloc types on a number of errors. Optimize
3989 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3990 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3991 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3992 calculating TLSLD relocs. Report reloc types on a number of errors.
3993 Don't capitalize error messages.
3994
3995 2003-03-03 H.J. Lu <hjl@gnu.org>
3996
3997 * elfxx-ia64.c (USE_BRL): Removed.
3998 (oor_ip): Removed.
3999
4000 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
4001
4002 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
4003 relocation (no special function), and make it non-partial_inplace.
4004 (sh_elf_relax_section): When creating a bsr, use a consistent value
4005 no matter if the symbol is extern or not; set addend to -4.
4006 Don't swap load / non-load instructions for SH4.
4007 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
4008 rather than if the symbol is external to determine if adjusting the
4009 offset makes sense. Adjust the addend too if appropriate.
4010 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
4011 relocation.
4012
4013 2003-03-03 Nick Clifton <nickc@redhat.com>
4014
4015 * po/da.po: Installed latest translation.
4016
4017 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4018
4019 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
4020 R_MIPS_PC16 to rightshift 2.
4021 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
4022 (bfd_elf32_bfd_reloc_type_lookup): Support
4023 BFD_RELOC_MIPSEMB_16_PCREL_S2.
4024 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
4025 R_MIPS_PC16 to rightshift 2.
4026 (mips_elf64_howto_table_rela): Likewise.
4027 (mips_reloc_map): Map to rightshifted BFD reloc.
4028 * elfn32-mips.c: The same as in elf64-mips.c.
4029 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
4030 (mips_elf_calculate_relocation): Handle rightshifted addends for
4031 R_MIPS_PC16.
4032 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
4033 MIPS Embedded PIC. Remove superfluous empty COMMENT.
4034 * libbfd.h: Regenerate.
4035 * bfd-in2.h: Regenerate.
4036
4037 2003-02-28 Richard Henderson <rth@redhat.com>
4038
4039 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4040 for ltoff22x relaxation.
4041
4042 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4043
4044 * bfd-in.h (_bfd): Don't define.
4045 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4046 * syms.c: Likewise.
4047 * bfd-in2.h: Regenerate.
4048
4049 2003-02-27 Richard Henderson <rth@redhat.com>
4050
4051 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4052 (elfNN_ia64_check_relocs): Set it.
4053 (allocate_global_data_got): Check it.
4054 (allocate_local_got): Likewise.
4055 (allocate_dynrel_entries): Likewise.
4056 (elfNN_ia64_relax_ldxmov): New.
4057 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4058 (elfNN_ia64_choose_gp): Split out from ...
4059 (elfNN_ia64_final_link): ... here.
4060
4061 2003-02-27 Andrew Cagney <cagney@redhat.com>
4062
4063 * bfd.c (struct bfd): Rename "struct _bfd".
4064 * bfd-in.h: Update copyright.
4065 (struct bfd): Rename "struct _bfd".
4066 (_bfd): Define for backward compatibility.
4067 * bfd-in2.h: Regenerate.
4068
4069 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4070
4071 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4072 and rel_hdr2 when initially counting input relocs rather than after
4073 creating output reloc sections.
4074 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4075 sizes.
4076
4077 * Makefile.am: Run "make dep-am".
4078 * Makefile.in: Regenerate.
4079
4080 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4081
4082 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4083 (elfcore_grog_nto_note): New function.
4084 (elfcore_grog_nto_gregs): New function.
4085 (elfcore_grog_nto_status): New function.
4086
4087 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4088
4089 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4090 section flags before concluding that we've already been called.
4091 Don't use register keyword.
4092 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4093 (_bfd_elf_create_linker_section): Formatting.
4094
4095 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4096
4097 * coff-h8300.c: Fix typo: intial -> initial.
4098 * coff-ppc.c: Likewise.
4099
4100 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4101
4102 * elf32-ppc.c: Formatting.
4103 (allocate_dynrelocs): LD and GD relocs against the same sym need
4104 separate GOT entries.
4105 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4106 entries per symbol.
4107
4108 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4109
4110 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4111 removal. Localize vars. Remove unnecessary dynobj test.
4112 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4113 of INFO.
4114 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4115 and optimize.
4116 (elf_i386_relocate_section): Likewise.
4117 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4118 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4119 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4120 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4121 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4122 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4123 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4124 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4125 Formatting.
4126
4127 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4128 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4129 test.
4130 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4131 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4132 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4133 and optimize. Use ELIMINATE_COPY_RELOCS.
4134 (ppc64_elf_relocate_section): Likewise.
4135
4136 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4137 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4138 (ELIMINATE_COPY_RELOCS): Define.
4139 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4140 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4141 (MUST_BE_DYN_RELOC): Define.
4142 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4143 and optimize. Trim dyn_relocs.
4144 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4145 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4146 track of pc_rel dyn relocs.
4147 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4148 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4149 allocate_dynrelocs. Don't recalculate "sec".
4150
4151 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4152
4153 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4154 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4155 on invalid LD relocs.
4156 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4157 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4158 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4159
4160 * elf32-ppc.h: New file.
4161 * elf32-ppc.c: Include elf32-ppc.h.
4162 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4163 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4164 Add "tls_mask" field.
4165 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4166 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4167 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4168 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4169 Make use of htab shortcuts throughout file.
4170 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4171 (ppc_elf_link_hash_table_create): Init new fields.
4172 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4173 (ppc_elf_howto_raw): Add tls relocs.
4174 (ppc_elf_reloc_type_lookup): Handle them.
4175 (ppc_elf_unhandled_reloc): New function.
4176 (ppc_elf_create_got): Stash got section pointer in hash table,
4177 return status. Make .rela.got too.
4178 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4179 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4180 NON_GOT_REF set. Don't allocate space in .plt here..
4181 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4182 not allocating plt entries unnecessarily. Allocate got entries here.
4183 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4184 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4185 "info" during allocate_dynrelocs hash traversal. Use htab section
4186 shortcuts rather than searching for named sections. Get rid of
4187 "plt" and "strip" booleans.
4188 (update_local_sym_info, bad_shared_reloc): New functions.
4189 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4190 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4191 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4192 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4193 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4194 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4195 relocs that might use a plt entry. Set NON_GOT_REF too.
4196 Enumerate all do-nothing relocs.
4197 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4198 tls relocs and all plt relocs.
4199 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4200 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4201 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4202 shortcuts.
4203 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4204 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4205 entries and got relocs here. Warn on non-zero got reloc addend.
4206 Split out branch taken/not taken reloc code into a separate switch
4207 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4208 Split out HA reloc adjustments to separate switch statement. Don't
4209 warn on reloc overflow if we've already warned about undefined.
4210 Don't rebuild sym name when reporting errors. Report all possible
4211 errors from _bfd_final_link_relocate.
4212 (bfd_elf32_bfd_final_link): Don't define.
4213
4214 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4215
4216 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4217 rebuild sym name when reporting errors.
4218
4219 2003-02-17 Nick Clifton <nickc@redhat.com>
4220
4221 * elflink.h (elf_link_output_extsym): Only check
4222 allow_shlib_undefined for shared libraries.
4223 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4224 of allow_shlib_undefined.
4225 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4226 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4227 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4228 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4229 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4230 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4231 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4232 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4233 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4234 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4235 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4236 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4237 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4238 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4239 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4240 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4241
4242 2003-02-17 Nick Clifton <nickc@redhat.com>
4243
4244 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4245 address field to use in the comparison.
4246 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4247
4248 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4249
4250 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4251 backends when checking if the generic ELF target should be used.
4252
4253 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4254 outside of functions, treat values as absolute addresses.
4255
4256 * bfd.c: Change embedded documentation to use consistent indentation
4257 and to split up long lines. Change informal style of description
4258 for functions lacking real documentation.
4259 * coffcode.h: Break up long lines in embedded documentation.
4260 * format.c: Likewise.
4261 * targets.c: Likewise.
4262 * libcoff.h: Regenerate.
4263 * bfd-in2.h: Regenerate.
4264
4265 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4266
4267 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4268 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4269 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4270 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4271 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4272 (group_sections): Don't share a stub section if stubs are for a large
4273 section. Adjust comment.
4274 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4275 !stubs_always_before_branch.
4276 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4277 treat undefined and undefweak specially when processing dyn relocs.
4278
4279 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4280
4281 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4282
4283 2003-02-13 Nick Clifton <nickc@redhat.com>
4284
4285 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4286 in computation of offset to insert into BL instruction.
4287
4288 2003-02-11 Uwe Stieber <uwe@wwws.de>
4289
4290 * config.bfd: Add support for kaOS as cross build target system.
4291
4292 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4293
4294 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4295 .__tls_get_addr too.
4296 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4297
4298 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4299
4300 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4301 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4302 (sh_elf_link_hash_newfunc): Remove the initialization of
4303 tls_tpoff32 field.
4304 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4305 for which tls_tpoff32 flag is set.
4306 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4307 of the symbol includes the entry matched with the input_section
4308 and having tls_tpoff32 flag on. When linking statically, set
4309 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4310 is defined in this executable.
4311 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4312
4313 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4314
4315 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4316 even if there is just non-empty .rela.plt.
4317
4318 2003-02-10 Nick Clifton <nickc@redhat.com>
4319
4320 * archures.c (bfd_mach_arm_ep9312): Define.
4321 * bfd-in2.h: Regenerate.
4322 * cpu-arm.c (processors[]): Add ep9312.
4323 (bfd_arm_arch): Add ep9312.
4324 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4325 messages and add test for Maverick floating point support.
4326 (elf32_arm_print_private_bfd_data): Handle
4327 EF_ARM_MAVERICK_FLOAT flag.
4328 (elf32_arm_object_p): New function.
4329 (elf_backend_object_p): Define.
4330
4331 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4332
4333 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4334 variables, structure fields or function params to tls_mask or
4335 similar to better reflect usage.
4336 (struct got_entry): Comment.
4337 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4338 (get_tls_mask): Rename from get_tls_type.
4339
4340 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4341
4342 * elf64-ppc.c (TLS_GD_LD): Don't define..
4343 (TLS_GD): ..define this instead and update all uses.
4344 (TLS_TPRELGD): Define.
4345 (ppc64_elf_link_hash_table_create): Tweak initialization of
4346 init_refcount and init_offset.
4347 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4348 Mark second slot of GD or LD toc entries.
4349 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4350 from other tls types.
4351 (ppc64_elf_tls_setup): New function, split out from..
4352 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4353 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4354 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4355 return value to properly decide whether toc GD and LD entries can
4356 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4357 to determine GD or LD rather than looking at TLS_LD flag. Don't
4358 attempt to adjust got entry tls_type here..
4359 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4360 look for possible merges.
4361 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4362 optimization.
4363 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4364 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4365 Make use of return value from get_tls_type to properly detect GD and
4366 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4367 handle tls_get_addr removal when looking at REL24 relocs, do it when
4368 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4369 GD or LD.
4370 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4371
4372 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4373
4374 * elf32-hppa.c (group_sections): Don't share a stub section if
4375 stubs are for a large section.
4376
4377 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4378 stubs if !stubs_always_before_branch.
4379
4380 2003-02-07 Nick Clifton <nickc@redhat.com>
4381
4382 * elf.c (swap_out_syms): Generate an error message if an
4383 equivalent output section cannot be found for a symbol.
4384
4385 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4386
4387 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4388 local_got_entries is NULL.
4389
4390 2003-02-06 Andreas Schwab <schwab@suse.de>
4391
4392 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4393 (read_value): Add parameter is_signed, use signed extraction if
4394 the value is signed.
4395 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4396 encoding to read_value.
4397
4398 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4399
4400 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4401 plt info when called to transfer weak sym info.
4402
4403 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4404
4405 * reloc.c: Add PPC and PPC64 TLS relocs.
4406 * libbfd.h: Regenerate.
4407 * bfd-in2.h: Regenerate.
4408 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4409 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4410 against a 32 bit field.
4411 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4412 (_ppc64_elf_section_data): Add t_symndx and comments.
4413 (ppc64_elf_section_data): Use elf_section_data macro.
4414 (ppc64_elf_new_section_hook): American spelling.
4415 (struct got_entry, struct plt_entry): New.
4416 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4417 (struct ppc_stub_hash_entry): Add "addend" field.
4418 (struct ppc_link_hash_entry): Add "tls_type".
4419 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4420 TLS_EXPLICIT): Define.
4421 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4422 (link_hash_newfunc): Init new fields.
4423 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4424 init_offset to NULL.
4425 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4426 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4427 there.
4428 (update_local_sym_info, update_plt_info): New functions.
4429 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4430 handling to use got.glist rather than got.refcount. Likewise for PLT.
4431 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4432 (func_desc_adjust): Adjust for new PLT list.
4433 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4434 (get_sym_h, get_tls_type): New functions.
4435 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4436 (ppc64_elf_tls_optimize): New function.
4437 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4438 TLS relocs.
4439 (ppc64_elf_size_dynamic_sections): Likewise.
4440 (ppc_type_of_stub): Adjust for new PLT list.
4441 (ppc_build_one_stub): Likewise.
4442 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4443 calls specially.
4444 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4445 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4446 init GOT entries that have a reloc. Generate GOT relocs here..
4447 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4448 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4449
4450 2003-02-04 Andreas Schwab <schwab@suse.de>
4451
4452 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4453 (elf_m68k_link_hash_traverse): Remove.
4454 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4455 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4456 reduce casting.
4457 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4458 casting.
4459 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4460 instead of elf_m68k_link_hash_traverse.
4461 (elf_m68k_discard_copies): Change first parameter to pointer to
4462 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4463 elf_m68k_link_hash_entry is needed.
4464
4465 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4466
4467 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4468 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4469 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4470 "plt" field.
4471 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4472 Add "init_offset" field.
4473 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4474 (elf_local_got_ents): Declare.
4475 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4476 and "plt".
4477 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4478 (_bfd_elf_link_hash_table_init): Set "init_offset".
4479 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4480 from init_offset.
4481 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4482
4483 * elf.c (bfd_elf_local_sym_name): Split out from..
4484 (group_signature): ..here.
4485 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4486
4487 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4488
4489 * elf-bfd.h (enum elf_link_info_type): Remove.
4490 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4491 to struct sec. Remove linkonce_p field.
4492 (elf_linkonce_p): Delete.
4493 (elf_discarded_section): Update for sec_info_type change.
4494 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4495 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4496 (ELF_INFO_TYPE_NONE): Define.
4497 (ELF_INFO_TYPE_STABS): Define.
4498 (ELF_INFO_TYPE_MERGE): Define.
4499 (ELF_INFO_TYPE_EH_FRAME): Define.
4500 (ELF_INFO_TYPE_JUST_SYMS): Define.
4501 (STD_SECTION): Update struct sec initializer.
4502 * ecoff.c (bfd_debug_section): Likewise.
4503 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4504 * elflink.h: Likewise.
4505 * elf-eh-frame.c: Likewise.
4506 * elf64-alpha.c: Likewise.
4507 * elfxx-ia64.c: Likewise.
4508 * elfxx-mips.c: Likewise.
4509 * bfd-in2.h: Regenerate.
4510
4511 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4512 referring to used_by_bfd.
4513 * elf64-sparc.c (sec_do_relax): Likewise.
4514 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4515 * elfxx-mips.c (mips_elf_section_data): Likewise.
4516 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4517 (ieee_get_section_contents): Likewise.
4518 (ieee_new_section_hook): Formatting.
4519 (ieee_canonicalize_reloc): Remove commented out code.
4520 * mmo.c (mmo_section_data): Define. Use throughout file.
4521 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4522
4523 2003-01-31 Graydon Hoare <graydon@redhat.com>
4524
4525 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4526 * Makefile.in: Regenerate.
4527 * opncls.c (calc_crc32, get_debug_link_info,
4528 seperate_debug_file_exists, find_seperate_debug_file): New
4529 internal functions.
4530 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4531 contained inside a .gnu_debuglink section.
4532 * bfd-in2.h: Regenerate.
4533
4534 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4535
4536 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4537 entry->abfd when it's NULL.
4538
4539 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4540
4541 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4542 _bfd_elf_section_offset returning -2 the same way as -1.
4543
4544 * elfxx-mips.c (mips_elf_multi_got): New function.
4545 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4546 addend into union along with address and link hash entry.
4547 (struct mips_got_info): Added bfd2got and next.
4548 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4549 (mips_elf_got_section, mips_elf_create_got_section): Use
4550 SEC_EXCLUDE bit to tell whether we really need the got
4551 section. Take boolean arguments to disregard an excluded
4552 section, or to create it as excluded. Adjust all callers.
4553 Use mips_elf_got_section all over.
4554 (mips_elf_local_got_index, mips_elf_got_page,
4555 mips_elf_got16_entry): Take input bfd as argument, and pass it
4556 on to mips_elf_create_local_got_entry.
4557 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4558 Take input bfd as argument, and manage entries in the
4559 appropriate GOT.
4560 (mips_elf_got_offset_from_index): Take input bfd as argument,
4561 and use it to adjust the GP offset of the bfd.
4562 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4563 unreferenced GOT entries of global symbols to the end.
4564 (mips_elf_record_global_got_symbol): Take input bfd as
4565 argument. Add entries to the master GOT hash table.
4566 (struct mips_elf_bfd2got_hash): New.
4567 (struct mips_elf_got_per_bfd_arg): New.
4568 (struct mips_elf_set_global_got_offset_arg): New.
4569 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4570 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4571 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4572 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4573 mips_elf_resolve_final_got_entry,
4574 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4575 mips_elf_got_for_ibfd): New functions.
4576 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4577 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4578 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4579 (mips_elf_got_entry_hash): Take new fields into account. Use
4580 mips_elf_hash_bfd_vma.
4581 (mips_elf_got_entry_eq): Take new fields into account.
4582 (mips_elf_create_got_section): Initialize new fields.
4583 (mips_elf_calculate_relocation): Pass input_bfd to functions
4584 that now take it. Adjust gp for the input_bfd.
4585 (mips_elf_allocate_dynamic_relocation,
4586 mips_elf_create_dynamic_relocation,
4587 _bfd_mips_elf_create_dynamic_sections): Use...
4588 (mips_elf_rel_dyn_section): New function. Borrow code from...
4589 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4590 now take it. Create the got section if needed, even if
4591 excluded, before recording a global got symbol. Move some
4592 code to...
4593 (mips_elf_record_local_got_symbol): New fn.
4594 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4595 Compute multi-got global entries offsets. Move GOT code to...
4596 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4597 if the GOT is too big.
4598 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4599 undefweak symbol to zero. Generate dynamic relocations for
4600 non-primary GOT entries for global symbols.
4601 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4602 case. Generate dynamic relocations for local got entries.
4603 Sort dynamic relocations on N64 too, using...
4604 (sort_dynamic_relocs_64): New fns.
4605 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4606 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4607
4608 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4609
4610 * bfd.c (struct _bfd): Added id field.
4611 * opncls.c (_bfd_id_counter): New static variable.
4612 (_bfd_new_bfd): Use it.
4613 * bfd-in2.h: Rebuilt.
4614
4615 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4616
4617 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4618
4619 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4620
4621 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4622 (elf32_sparc_rev32_howto): New variable.
4623 (sparc_reloc_map): Add TLS relocs.
4624 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4625 Handle REV32.
4626 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4627 New functions.
4628 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4629 struct elf32_sparc_link_hash_table):
4630 New structures.
4631 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4632 elf32_sparc_hash_table): Define.
4633 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4634 create_got_section, elf32_sparc_create_dynamic_sections,
4635 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4636 functions.
4637 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4638 reference counting.
4639 (elf32_sparc_gc_sweep_hook): Likewise.
4640 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4641 (elf32_sparc_size_dynamic_sections): Likewise.
4642 (elf32_sparc_relocate_section): Likewise.
4643 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4644 New functions.
4645 (elf32_sparc_object_p): Allocate backend private object data.
4646 (bfd_elf32_bfd_link_hash_table_create,
4647 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4648 elf_backend_can_refcount): Define.
4649 (elf_backend_create_dynamic_sections): Define to
4650 elf32_sparc_create_dynamic_sections.
4651 * reloc.c: Add SPARC TLS relocs.
4652 * bfd-in2.h, libbfd.h: Rebuilt.
4653 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4654 (sparc_reloc_map): Likewise.
4655
4656 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4657
4658 * bfd-in2.h: Regenerate.
4659 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4660 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4661 (elf_howto_table): Add TLS relocs.
4662 (elf_s390_reloc_type_lookup): Likewise.
4663 (elf_s390_link_hash_entry): Add tls_type.
4664 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4665 New macros.
4666 (elf_s390_link_hash_table): Add tls_ldm_got.
4667 (link_hash_newfunc): Initialize tls_type.
4668 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4669 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4670 (elf_s390_check_relocs): Support TLS relocs.
4671 (elf_s390_gc_sweep_hook): Likewise.
4672 (allocate_dynrelocs): Likewise.
4673 (elf_s390_size_dynamic_sections): Likewise.
4674 (elf_s390_relocate_section): Likewise.
4675 (elf_s390_finish_dynamic_symbol): Likewise.
4676 (bfd_elf32_mkobject): Define for TLS.
4677 * elf64-s390.c: Same changes as for elf32-s390.c.
4678 * libbfd.h: Regenerate.
4679 * reloc.c: Add s390 TLS relocations.
4680
4681 2003-01-24 Charles Lepple <clepple@ghz.cc>
4682
4683 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4684
4685 2003-01-23 Nick Clifton <nickc@redhat.com>
4686
4687 * Add sh2e support:
4688 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4689 * archures.c (bfd_mach_sh2e): Added.
4690 * bfd-in2.h: Rebuilt.
4691 * cpu-sh.c (arch_info_struct): Added SH2e.
4692 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4693
4694 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4695
4696 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4697 dynindx to an int. Rearrange for better packing.
4698 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4699 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4700 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4701 (struct _sh64_elf_section_data): New struct.
4702 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4703 * elf32-sh64-com.c: Include elf32-sh64.h.
4704 * elf32-sh64.c: Likewise.
4705 (sh64_elf_new_section_hook): New function.
4706 (bfd_elf32_new_section_hook): Define.
4707 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4708 (sh64_bfd_elf_copy_private_section_data): Likewise.
4709 (sh64_elf_final_write_processing): Likewise.
4710 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4711 (elf32_sparc_new_section_hook): New function.
4712 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4713 (sec_do_relax): Define.
4714 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4715 (elf32_sparc_relocate_section): Likewise.
4716 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4717 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4718 (mmix_elf_section_data): Define. Use throughout file.
4719 (mmix_elf_new_section_hook): New function.
4720 (bfd_elf64_new_section_hook): Define.
4721 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4722 (ppc64_elf_section_data): Define. Use throughout.
4723 (ppc64_elf_new_section_hook): New function.
4724 (bfd_elf64_new_section_hook): Define.
4725 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4726 (sparc64_elf_new_section_hook): New function.
4727 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4728 (sec_do_relax): Define.
4729 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4730 (sparc64_elf_relocate_section): Likewise.
4731 (bfd_elf64_new_section_hook): Define.
4732 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4733 * elfxx-mips.c (struct _mips_elf_section_data): New.
4734 (mips_elf_section_data): Define. Use throughout.
4735 (_bfd_mips_elf_new_section_hook): New function.
4736 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4737 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4738 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4739 * Makefile.am: Run "make dep-am".
4740 * Makefile.in: Regenerate.
4741
4742 2003-01-21 Richard Henderson <rth@redhat.com>
4743
4744 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4745 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4746 (elf64_alpha_adjust_dynamic_symbol): Set them.
4747 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4748 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4749 symbol index when relaxing LDM to TPREL.
4750 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4751 relocs, even if the target isn't locally defined.
4752 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4753 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4754 relocs vs symndx 0 to the tp base.
4755
4756 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4757
4758 * config.bfd: Handle i[3456]86-*-aros*.
4759
4760 2003-01-21 Andreas Schwab <schwab@suse.de>
4761
4762 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4763 (struct ppc_elf_link_hash_entry): Define.
4764 (ppc_elf_hash_entry): New function.
4765 (struct ppc_elf_link_hash_table): Define.
4766 (ppc_elf_hash_table): New function.
4767 (ppc_elf_link_hash_newfunc): New function.
4768 (ppc_elf_link_hash_table_create): New function.
4769 (ppc_elf_copy_indirect_symbol): New function.
4770 (allocate_dynrelocs): New function.
4771 (readonly_dynrelocs): New function.
4772 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4773 relocs and determine DT_TEXTREL.
4774 (ppc_elf_check_relocs): Don't do that here, just count the
4775 dynamic relocs.
4776 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4777 removed section.
4778 (bfd_elf32_bfd_link_hash_table_create): Define.
4779 (elf_backend_copy_indirect_symbol): Define.
4780
4781 2003-01-21 Richard Henderson <rth@redhat.com>
4782
4783 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4784 TPREL also get a reloc if shared. Remove SREL support.
4785 (elf64_alpha_emit_dynrel): New.
4786 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4787 and GOTTPREL relocs to local symbols against the tp base.
4788 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4789
4790 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4791 use count before clobbering r_type.
4792 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4793 ordering would mean dataflow inspection is necessary.
4794
4795 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4796
4797 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4798
4799 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4800
4801 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4802 elfxx-target.h and #undef it before #define'ing it.
4803 * elf32-i386.c: Likewise.
4804 * elf32-sh64.c: Likewise.
4805 * elf64-alpha.c: Likewise.
4806 * elf64-sh64.c: Likewise.
4807
4808 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4809
4810 * bfd-in2.h: Regenerate.
4811 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4812 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4813 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4814 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4815 R_390_PLTOFF32 and R_390_PLTOFF64.
4816 (elf_s390_reloc_type_lookup): Likewise.
4817 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4818 of GOTPLT references to a function.
4819 (link_hash_newfunc): Initialize gotplt_refcount.
4820 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4821 and creation of the got section out of the main switch. Add support
4822 for the gotoff, gotplt and pltoff relocations.
4823 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4824 and pltoff.
4825 (elf_s390_adjust_gotplt): New function.
4826 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4827 plt entries.
4828 (allocate_dynrelocs): Add comment.
4829 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4830 for gotoff, gotplt and pltoff relocations.
4831 * elf64-s390.c: Same changes as for elf32-s390.c.
4832 * libbfd.h: Regenerate.
4833 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4834 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4835 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4836 and BFD_RELOC_390_PLTOFF64.
4837
4838 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4839
4840 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4841 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4842
4843 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4844
4845 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4846 self_dtpmod_done and self_dtpmod_offset.
4847 (allocate_global_data_got): Only use one got entry for all
4848 dtpmod relocs against local symbols.
4849 (allocate_dynrel_entries): Only need .rela.got entry for
4850 dtpmod against global symbol.
4851 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4852 Reserve space in .rela.got for the local dtpmod entry.
4853 (set_got_entry): Initialize the common local dtpmod .got entry.
4854 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4855 and R_IA_64_DTPREL64MSB.
4856
4857 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4858
4859 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4860 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4861 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4862 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4863 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4864 relative relocs, not with absolute ones.
4865 * Makefile.am: Run "make dep-am".
4866 * Makefile.in: Regenerate.
4867 * po/SRC-POTFILES.in: Regenerate.
4868
4869 2003-01-15 Andreas Schwab <schwab@suse.de>
4870
4871 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4872 relocation against a non-allocated readonly section.
4873
4874 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4875
4876 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4877 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4878
4879 2002-01-08 Klee Dienes <kdienes@apple.com>
4880
4881 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4882 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4883 * Makefile.in: Regenerate.
4884
4885 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4886
4887 * elfn32-mips.c (prev_reloc_section): New.
4888 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4889 (SET_RELOC_ADDEND): Parenthesize macro argument.
4890
4891 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4892
4893 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4894 adjust addil instructions if the symbol has no section.
4895
4896 2003-01-07 DJ Delorie <dj@redhat.com>
4897
4898 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4899 partial_inplace.
4900
4901 2003-01-07 Andreas Schwab <schwab@suse.de>
4902
4903 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4904 PC relative relocations.
4905 (elf_m68k_discard_copies): Set it here instead.
4906
4907 2002-01-02 Ben Elliston <bje@redhat.com>
4908 Jeff Johnston <jjohnstn@redhat.com>
4909
4910 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4911 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4912 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4913 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4914 (cpu-iq2000.lo): New target.
4915 * Makefile.in: Regenerate.
4916 * config.bfd: Handle iq2000-*-elf.
4917 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4918 (bfd_archures_list): Add bfd_iq2000_arch.
4919 * configure.in: Handle bfd_elf32_iq2000_vec.
4920 * configure: Regenerate.
4921 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4922 and BFD_RELOC_IQ2000_UHI16.
4923 * targets.c (bfd_elf32_iq2000_vec): Declare.
4924 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4925 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4926 * cpu-iq2000.c: New file.
4927 * elf32-iq2000.c: Likewise.
4928 * libbfd.h: Regenerate.
4929 * bfd-in2.h: Likewise.
4930
4931 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4932
4933 * elfxx-mips.c: Include libiberty.h.
4934 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4935 (mips_set_isa_flags): New function, split out from...
4936 (_bfd_mips_elf_final_write_processing): ...here. Only call
4937 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4938 (mips_mach_extensions): New array.
4939 (mips_32bit_flags_p): New function.
4940 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4941 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4942 other is 64-bit. When adopting IBFD's architecture, adopt the
4943 bfd_mach as well as the flags.
4944
4945 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4946
4947 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4948 fix internal errors, fix bad code generation, fix incorrect stabs
4949 information, and improve ability to eliminate redundant page
4950 instructions. Added code to ip2k_final_link_relocate to self-verify
4951 the linker relaxation. Fix formatting problems.
4952
4953 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4954
4955 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4956 * archures.c (bfd_mach_mipsisa32r2): New define.
4957 * bfd-in2.h: Regenerate.
4958 * cpu-mips.c (I_mipsisa32r2): New enum value.
4959 (arch_info_struct): Add entry for I_mipsisa32r2.
4960 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4961 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4962 (_bfd_mips_elf_final_write_processing): Add
4963 bfd_mach_mipsisa32r2 case.
4964 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4965 binaries marked as using MIPS32 Release 2.
4966
4967 2002-12-30 Dmitry Diky <diwil@mail.ru>
4968
4969 * Makefile.am: Add msp430 target.
4970 * configure.in: Likewise.
4971 * Makefile.in: Regenerate.
4972 * configure: Regenerate.
4973 * archures.c: Add msp430 architecture vector.
4974 * config.bfd: Likewise.
4975 * reloc.c: Add msp430 relocs.
4976 * targets.c: Add msp320 target.
4977 * cpu-msp430.c: New file: msp430 cpu detection.
4978 * elf32-msp430.c: New file: msp430 reloc processing.
4979 * bfd-in2.h: Regenerate.
4980 * libbfd.h: Regenerate.
4981
4982 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4983
4984 * elf.c (elf_sort_sections): Don't reorder .tbss.
4985 (assign_file_positions_for_segments): Only adjust off/voff
4986 for increased alignment in PT_LOAD or PT_NOTE segment,
4987 but adjust p_filesz for .tbss too. in PT_LOAD consider
4988 .tbss to have zero memory size.
4989 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4990 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4991 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4992 into PT_TLS segment. Never put SHF_TLS sections in
4993 segments other than PT_TLS or PT_LOAD.
4994
4995 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4996 sh_entsize.
4997
4998 2002-12-23 DJ Delorie <dj@redhat.com>
4999
5000 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
5001
5002 2002-12-23 Alan Modra <amodra@bigpond.net.au>
5003
5004 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
5005
5006 2002-12-23 Nick Clifton <nickc@redhat.com>
5007
5008 * archures.c (bfd_arch_get_compatible): Add third parameter
5009 'accept_unknowns'. Only accept unknown format BFDs if
5010 accept_unknowns is true, or if the format is "binary".
5011 * bfd-in2.h: Regenerate.
5012
5013 2002-12-21 Nick Clifton <nickc@redhat.com>
5014
5015 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
5016 that subtracted 8 from pc relative relocations.
5017
5018 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5019
5020 * coff-h8300.c: Fix comment typos.
5021 * coffcode.h: Likewise.
5022 * cpu-cris.c: Likewise.
5023 * elf32-vax.c: Likewise.
5024 * genlink.h: Likewise.
5025 * linker.c: Likewise.
5026 * som.c: Likewise.
5027 * tekhex.c: Likewise.
5028 * vms-misc.c: Likewise.
5029
5030 2002-12-20 DJ Delorie <dj@redhat.com>
5031
5032 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
5033 * libbfd.h: Regenerate.
5034 * bfd-in2.h: Regenerate.
5035 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
5036 (xstormy16_reloc_map): Add R_XSTORMY16_12.
5037
5038 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5039
5040 * doc/bfdint.texi: Fix typos.
5041
5042 2002-12-20 Paul Eggert <eggert@twinsun.com>
5043
5044 Port to POSIX 1003.1-2001.
5045 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5046 * configure.in (build-warnings): Likewise.
5047 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5048 * aclocal.m4: Regenerate.
5049 * config.in: Regenerate.
5050 * configure: Regenerate.
5051
5052 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5053
5054 * coff-h8300.c: Include libiberty.h.
5055 (h8300_reloc16_extra_cases): Check the hash table creator before
5056 referencing h8300 specific fields. Stash the hash table pointer
5057 in a local var. Comment typo fixes.
5058 (h8300_bfd_link_add_symbols): Likewise.
5059
5060 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5061 dst_mask comments.
5062 * bfd-in2.h: Regenerate.
5063
5064 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5065
5066 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5067 code a little. Comment on dynamic relocs against section symbols.
5068
5069 2002-12-17 Roger Sayle <roger@eyesopen.com>
5070
5071 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5072 the HP compiler's "long long".
5073
5074 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5075
5076 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5077 and R_XSTORMY16_HI16) howto entries.
5078 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5079 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5080 determine the start of the second reloc table.
5081
5082 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5083
5084 * ecofflink.c: Fix the reading of the debugging information
5085 of Tru64/Alpha binaries that are produced by recent Compaq
5086 compilers.
5087 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5088 table.
5089 (lookup_line): Because of the strange information sometimes
5090 generated by Compaq's recent compilers, change how the FDR
5091 table is searched so that PDRs (procedure descriptors) are
5092 correctly found. Note that this change is really more of a hack;
5093 however, I have included extensive documentation as to why
5094 this is the best solution short of an extensive rewrite or
5095 another hack.
5096 (fdrtab_lookup): Add comments to explain the algorithm.
5097
5098 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5099
5100 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5101 initializers to match struct declaration.
5102
5103 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5104
5105 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5106 * elf.c (get_program_header_size): Likewise.
5107 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5108 (m32r_elf_generic_reloc): Likewise.
5109 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5110 * elflink.h (elf_bfd_discard_info): Likewise.
5111
5112 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5113
5114 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5115 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5116 DT_RELSZ adjustment, not output section. Avoid writing tags when
5117 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5118 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5119 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5120 DT_RELASZ adjustment, not output section. Avoid writing tags when
5121 unchanged. Adjust DT_RELA.
5122 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5123 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5124
5125 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5126
5127 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5128 addend by 4.
5129
5130 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5131
5132 * elfxx-mips.c (struct mips_got_entry): New.
5133 (struct mips_got_info): Added got_entries field.
5134 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5135 (mips_elf_local_got_index, mips_elf_got_page,
5136 mips_elf_got16_entry): Re-implement in terms of new...
5137 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5138 Change return type.
5139 (mips_elf_highest): Warning clean-up.
5140 (mips_elf_create_got_section): Initialize got_entries.
5141 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5142 local got size.
5143 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5144 GOT_PAGE entries, since we now reuse GOT16 entries.
5145
5146 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5147
5148 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5149 read-only section that lies after .text and before .data to be
5150 written into the output file and included in a_text.
5151 (translate_to_native_sym_flags): If an otherwise unrepresentable
5152 section was merged with .text, convert its symbols to N_TEXT
5153 symbols.
5154 * libaout.h (aout_section_merge_with_text_p): New macro.
5155
5156 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5157
5158 * bfd-in.h: Comment typo fix. Formatting.
5159 * bfd-in2.h: Regenerate.
5160 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5161 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5162 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5163
5164 2002-12-05 Richard Henderson <rth@redhat.com>
5165
5166 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5167 Only send PCREL21B though the plt. Fix installed reloc type.
5168 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5169 against PCREL22 or PCREL64I; clean up error messages for
5170 branch relocs.
5171
5172 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5173
5174 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5175 New functions.
5176 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5177
5178 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5179
5180 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5181
5182 2002-12-04 H.J. Lu <hjl@gnu.org>
5183
5184 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5185 BFD address when constructing local name.
5186
5187 2002-12-04 Andreas Schwab <schwab@suse.de>
5188
5189 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5190 member.
5191 (elf_m68k_link_hash_table_create): Initialize it.
5192 (elf_m68k_check_relocs): Handle symbols that are forced to be
5193 local due to visibility changes.
5194 (elf_m68k_adjust_dynamic_symbol): Likewise.
5195 (elf_m68k_size_dynamic_sections): Likewise.
5196 (elf_m68k_discard_copies): Likewise.
5197 (elf_m68k_relocate_section): Likewise.
5198
5199 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5200
5201 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5202
5203 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5204
5205 * srec.c (srec_write_symbols): Restore '$' prefix to address
5206 accidentally removed in 2002-04-04 change.
5207 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5208
5209 2002-12-03 Nick Clifton <nickc@redhat.com>
5210
5211 * elf32-ppc.c (apuinfo_list_init): New function.
5212 (apuinfo_list_add): New function: Add a value to the list.
5213 (apuinfo_list_length): New function: Return the number of
5214 values on the list.
5215 (apuinfo_list_element): New function: Return a value on the
5216 list.
5217 (apuinfo_list_finish): New function: Free the resources used
5218 by the list.
5219 (ppc_elf_begin_write_processing): New function. Scan the
5220 input bfds for apuinfo sections.
5221 (ppc_elf_write_section): New function: Delay the creation of
5222 the contents of an apuinfo section in an output bfd.
5223 (ppc_elf_final_write_processing): New function. Create the
5224 contents of an apuinfo section in an output bfd.
5225 (elf_backend_begin_write_processing): Define.
5226 (elf_backend_final_write_processing): Define.
5227 (elf_backend_write_section): Define.
5228
5229 2002-12-03 Richard Henderson <rth@redhat.com>
5230
5231 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5232
5233 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5234
5235 Fix PR savannah/1417:
5236 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5237 branch if it goes to the start of the deleted region.
5238
5239 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5240
5241 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5242 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5243 bfd_mach_m6812s): Declare.
5244
5245 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5246 (_bfd_m68hc12_elf_set_private_flags): Call it.
5247 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5248 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5249 report microcontroller incompatibilities (HC12 vs HCS12).
5250 (elf_backend_object_p): Update.
5251
5252 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5253
5254 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5255 (enum bfd_boolean, boolean): Delete.
5256 (bfd_boolean): Typedef to an int.
5257 (FALSE, TRUE): Define.
5258 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5259 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5260 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5261 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5262 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5263 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5264 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5265 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5266 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5267 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5268 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5269 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5270 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5271 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5272 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5273 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5274 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5275 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5276 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5277 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5278 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5279 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5280 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5281 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5282 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5283 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5284 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5285 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5286 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5287 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5288 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5289 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5290 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5291 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5292 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5293 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5294 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5295 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5296 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5297 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5298 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5299 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5300 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5301 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5302 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5303 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5304 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5305 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5306 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5307 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5308 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5309 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5310 of bfd_boolean vars with TRUE/FALSE. Formatting.
5311 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5312
5313 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5314
5315 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5316 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5317 with Elf_Internal_Rela.
5318 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5319 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5320 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5321 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5322 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5323 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5324 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5325 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5326 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5327 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5328 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5329 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5330 throughout instead.
5331 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5332 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5333 Remove INLINE keyword.
5334 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5335 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5336 as a bfd_byte *.
5337 (elf_write_relocs): Consolidate REL and RELA code.
5338 (elf_slurp_reloc_table_from_section): Simplify REL code.
5339 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5340 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5341 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5342 RELA code.
5343 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5344 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5345 (elf_link_output_relocs): Likewise.
5346 (elf_reloc_link_order): Likewise.
5347 (elf_finish_pointer_linker_section): Likewise.
5348 (struct elf_link_sort_rela): Remove union.
5349 (elf_link_sort_cmp1): Update to suit.
5350 (elf_link_sort_cmp2): Here too.
5351 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5352 over-allocation for int_rels_per_ext_rel != 1 case.
5353 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5354 * elf32-i386.c: Likewise.
5355 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5356 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5357 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5358 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5359 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5360 elf64-sparc.c, elf64-x86-64.c: Likewise.
5361 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5362 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5363 bfd_elf32_swap_reloc_in.
5364
5365 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5366 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5367 (mips_elf64_swap_reloc_in): Zero r_addend.
5368 (mips_elf64_be_swap_reloc_in): Likewise.
5369 (mips_elf64_slurp_one_reloc_table): Simplify.
5370
5371 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5372 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5373 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5374
5375 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5376
5377 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5378 unresolved debugging relocs in dynamic applications.
5379 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5380
5381 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5382
5383 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5384 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5385 on a relocatable link. Comment typos.
5386 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5387 in the order they are declared. Clear elf_hash_value too.
5388 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5389 eh_info and tls_segment.
5390 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5391 sorted when discarding relocs by turning them into R_*_NONE.
5392
5393 * libbfd.c (warn_deprecated): Comment spelling.
5394 * po/SRC-POTFILES.in: Regenerate.
5395
5396 2002-11-21 Richard Henderson <rth@redhat.com>
5397
5398 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5399 arch's st_other bits when merging visibilities.
5400 (elf_link_output_extsym): Tidy clearing of visibility field.
5401
5402 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5403
5404 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5405 (SWAP_OUT_RELOC_OFFSET): Define.
5406
5407 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5408
5409 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5410 can_refcount is properly extended to the type of
5411 init_refcount.
5412
5413 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5414
5415 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5416 (_bfd_mips_elf_relocate_section): Use it.
5417
5418 * elfxx-mips.c (MNAME): New macro.
5419 (_bfd_mips_elf_check_relocs): Use it.
5420 (_bfd_mips_elf_discard_info): Likewise.
5421 (_bfd_mips_elf_final_link): Likewise.
5422
5423 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5424
5425 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5426 rel_hdr.sh_size too.
5427
5428 2002-11-18 Klee Dienes <kdienes@apple.com>
5429
5430 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5431 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5432 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5433 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5434 Add dependencies for bfdwin.c, bfdio.c.
5435 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5436 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5437 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5438 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5439 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5440 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5441 bfd_get_size (moved from libbfd.c and bfd.c).
5442 * bfdwin.c New file. Contains _bfd_window_internal,
5443 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5444 libbfd.c and bfd.c).
5445 * po/SRC-POTFILES.in: Regenerate.
5446 * po/bfd.pot: Regenerate.
5447 * libbfd.h: Regenerate.
5448 * bfd-in2.h: Regenerate.
5449 * aclocal.m4: Regenerate.
5450 * Makefile.in: Regenerate.
5451 * configure: Regenerate.
5452
5453 2002-11-18 Klee Dienes <kdienes@apple.com>
5454
5455 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5456
5457 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5458
5459 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5460 jsr after a short jump.
5461 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5462
5463 2002-11-15 Klee Dienes <kdienes@apple.com>
5464
5465 * pef.c (bfd_pef_convert_architecture): Move declaration of
5466 ARCH_POWERPC and ARCH_M68K to the start of the function.
5467
5468 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5469
5470 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5471
5472 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5473
5474 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5475 For bpo_gregs_section->contents, allocate _raw_size, not
5476 _cooked_size.
5477
5478 2002-11-13 Klee Dienes <kdienes@apple.com>
5479
5480 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5481
5482 2002-11-13 H.J. Lu <hjl@gnu.org>
5483
5484 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5485
5486 2002-11-13 Klee Dienes <kdienes@apple.com>
5487 Alan Modra <amodra@bigpond.net.au>
5488
5489 * bfd.c (struct bfd_preserve): New.
5490 (bfd_preserve_save): New function.
5491 (bfd_preserve_restore): Ditto.
5492 (bfd_preserve_finish): Ditto.
5493 * bfd-in2.h: Regenerate.
5494 * mach-o.c: Formatting.
5495 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5496 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5497 (bfd_mach_o_core_p): Ditto.
5498 (bfd_mach_o_scan): Pass in mdata.
5499 * mach-o.h (bfd_mach_o_scan): Update prototype.
5500 * pef.c: Formatting.
5501 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5502 (bfd_pef_xlib_object_p): Ditto.
5503 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5504 * pef.h (bfd_pef_scan): Update prototype.
5505 * xsym.c: Formatting, K&R fixes.
5506 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5507 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5508 * xsym.h (bfd_sym_scan): Declare.
5509 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5510 * elfcore.h (elf_core_file_p): Likewise.
5511 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5512
5513 2002-11-12 Nick Clifton <nickc@redhat.com>
5514
5515 * po/da.po: Updated Danish translation.
5516
5517 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5518
5519 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5520 relocatable link too.
5521 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5522 eh_frame and stab sections. Zap deleted relocs.
5523 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5524 (elf_bfd_discard_info): Run for relocatable link too.
5525 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5526 Handle ld -r case.
5527 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5528 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5529
5530 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5531 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5532 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5533 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5534 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5535 (struct elf_link_hash_table): Add eh_info.
5536 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5537 (_bfd_elf_discard_section_eh_frame): Update prototype.
5538 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5539 (_bfd_elf_write_section_eh_frame): Likewise.
5540 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5541 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5542 param. Get "hdr_info" from link hash table.
5543 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5544 header section from link hash table. Save header section to elf_tdata.
5545 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5546 header section from link hash table. Don't alloc hdr_info. Clear
5547 hdr_sec instead of setting "strip".
5548 (_bfd_elf_eh_frame_section_offset): Formatting.
5549 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5550 Get header section from link hash table.
5551 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5552 Get header section from link hash table.
5553 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5554 (get_program_header_size): Likewise.
5555 (_bfd_elf_section_offset): Formatting.
5556 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5557 section pointer in link hash table.
5558 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5559 and _bfd_elf_write_section_eh_frame calls. Update comment about
5560 eh_frame entries.
5561 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5562 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5563
5564 * po/SRC-POTFILES.in: Regenerate.
5565
5566 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5567 relocs for discarded FDEs. Remove dead code.
5568 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5569 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5570 Tidy conditions under which stabs are edited. Formatting.
5571 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5572 from discarded relocs.
5573 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5574 section adjustments after testing magic values.
5575
5576 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5577
5578 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5579 references to large plt symbols.
5580
5581 2002-11-12 Klee Dienes <kdienes@apple.com>
5582
5583 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5584 looking for an unused section name.
5585
5586 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5587
5588 * coff-h8300.c: Fix formatting.
5589 * elf32-h8300.c: Likewise.
5590 * reloc16.c: Likewise.
5591
5592 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5593
5594 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5595 section when dynamic section unused; _bfd_strip_section_from_output
5596 instead.
5597
5598 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5599
5600 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5601 and sym_vec.
5602
5603 * dwarf2.c: Revert last change.
5604
5605 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5606
5607 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5608 _bfd_dwarf2_find_nearest_line): Use
5609 bfd_simple_get_relocated_section_contents() instead of
5610 bfd_get_section_contents().
5611 * reloc.c (bfd_perform_relocation): Add sanity check.
5612 * simple.c (simple_get_relocated_section_contents): If the section
5613 does not have any relocs associated with it, just return the
5614 unadjusted contents.
5615
5616 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5617
5618 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5619 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5620 contents, enabling for a non-DSO, for symbols defined in the
5621 program with --export-dynamic.
5622
5623 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5624
5625 * elf64-ppc.c: Comment typo fixes.
5626 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5627
5628 2002-11-07 Nick Clifton <nickc@redhat.com>
5629
5630 * po/da.po: Updated Danish translation.
5631
5632 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5633
5634 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5635 exactly three internal relocs per external reloc. Set reloc_count
5636 to the external reloc count.
5637
5638 2002-11-06 Klee Dienes <kdienes@apple.com>
5639
5640 * coff-stgo32.c (stub_bytes): Mark as const.
5641 Fix comment formatting.
5642
5643 2002-11-06 Klee Dienes <kdienes@apple.com>
5644
5645 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5646 xsym.lo.
5647 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5648 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5649 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5650 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5651 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5652 sym.
5653 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5654 * Makefile.in: Regenerate.
5655 * doc/Makefile.in: Regenerate.
5656 * bfd-in2.h: Regenerate.
5657 * xsym.c: New file. Contains support for the Apple/Metrowerks
5658 xSYM debugging format.
5659 * xsym.h: New file.
5660 * pef.c: New file. Contains support for the Apple Code Fragment
5661 Manager Preferred Executable Format
5662 * pef.h: New file.
5663 * pef-traceback.h: New file. Contains support for parsing PowerPC
5664 traceback tables as used by PEF executables (and perhaps other
5665 systems as well).
5666 * mach-o.c: New file. Contains support for the Mach-O object file
5667 format.
5668 * mach-o.h: New file.
5669 * mach-o-target.c: New file. Declares the mach-o targets
5670 themselves. Included three times by mach-o.c; each time with a
5671 different set of macros set.
5672
5673 2002-11-06 Graeme Peterson <gp@qnx.com>
5674
5675 * Makefile.am: Remove entries for elf32-qnx.[ch].
5676 * Makefile.in: Regenerate.
5677 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5678 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5679 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5680 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5681 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5682 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5683 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5684 * configure: Regenerate.
5685 * elf32-qnx.c: Remove.
5686 * elf32-qnx.h: Remove.
5687 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5688 is_contained_by_filepos, and copy_private_bfd_data_p.
5689 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5690 is_contained_by_filepos, and copy_private_bfd_data_p.
5691 * elf32-i386.c: Remove QNX extended bfd support.
5692 * elf32-ppc.c: Remove QNX extended bfd support.
5693 * elf32-sh.c: Remove QNX extended bfd support.
5694 * elfarm-nabi.c: Remove QNX extended bfd support.
5695 * targets.c: Remove qnx vectors.
5696 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5697 (elf_backend_is_contained_by_filepos): Remove.
5698 (elf_backend_copy_private_bfd_data_p): Remove.
5699 * po/SRC-POTFILES.in: Regenerate.
5700
5701 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5702 Alan Modra <amodra@bigpond.net.au>
5703
5704 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5705 dynamic relocs against section symbols for the output section vma.
5706
5707 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5708
5709 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5710 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5711
5712 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5713 Alan Modra <amodra@bigpond.net.au>
5714
5715 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5716 vectors in target_selvecs.
5717 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5718 in target_selvecs.
5719 (sh-*-netbsdelf*): Likewise.
5720 * configure.in (assocvecs): New variable. Handle assocvecs like
5721 selvecs.
5722 * configure: Regenerate.
5723 * format.c (bfd_check_format_matches): Store bfd_target pointers
5724 in matching_vector instead of target names. Select first target
5725 from bfd_associated_vector that matches a list of ambiguous targets.
5726 * targets.c (_bfd_associated_vector): New array.
5727 (bfd_associated_vector): New variable.
5728 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5729 * libbfd-in.h (bfd_associated_vector): Declare.
5730 * libbfd.h: Regenerate.
5731
5732 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5733
5734 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5735 non-NULL before dereferencing.
5736
5737 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5738
5739 * vms.c (vms_object_p): Restore the start address when returning
5740 NULL.
5741
5742 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5743 Hans-Peter Nilsson <hp@axis.com>
5744
5745 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5746 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5747 Set up a larger symshndxbuf, and write it out. Free it on
5748 exit rather than freeing symbuf twice. Correct section index
5749 on output section symbol loop.
5750 (elf_link_output_sym): Accumulate symbol extension section
5751 indices, reallocating symshndxbuf rather than writing it out.
5752 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5753 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5754 Use bfd_zalloc to clear i_shdrp[0] too.
5755
5756 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5757
5758 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5759 _raw_size of cranges section if _cooked_size not yet set.
5760
5761 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5762
5763 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5764 for bfd_elf32_swap_symbol_out.
5765
5766 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5767
5768 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5769 signed and unsigned in comparison.
5770
5771 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5772
5773 * coffcode.h: Remove extraneous '\'.
5774
5775 2002-10-28 H.J. Lu <hjl@gnu.org>
5776
5777 * Makefile.am (targets.lo): Depend on Makefile instead of
5778 config.status.
5779 (archures.lo): Likewise.
5780 * Makefile.in: Regenerated.
5781
5782 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5783
5784 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5785 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5786 targ_selvecs.
5787
5788 2002-10-25 Jim Wilson <wilson@redhat.com>
5789
5790 * elf64-sh64.c (sh_elf64_relocate_section): Call
5791 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5792 of SHF_MERGE section.
5793
5794 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5795
5796 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5797
5798 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5799
5800 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5801 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5802 unsigned int.
5803 (NAME(aout,final_link)): Cast enum used in assignment.
5804 (aout_link_write_symbols): Cast enums in comparisons, int values to
5805 boolean, enums in assignments to int.
5806 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5807 (aout_link_input_section_ext): Likewise. Cast enums used in
5808 comparisons with unsigned ints.
5809 (aout_link_reloc_link_order): Cast enum to int in assignment.
5810 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5811 calls to char *.
5812 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5813 assignment.
5814 * bfd-in2.h (bfd_set_section_vma): Likewise.
5815 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5816 * binary.c (bfd_alloc): Cast enum to long.
5817 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5818 * dwarf2.c (read_abbrevs): Add casts to enum types.
5819 (read_attribute_value): Likewise.
5820 (arange_add): Cast result of bfd_zalloc call.
5821 (comp_unit_contains_address): Return true and false.
5822 (comp_unit_find_nearest_line): Cast return to boolean.
5823 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5824 * gen-aout.c: define macro '_' if not defined.
5825 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5826 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5827 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5828 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5829 (bfd_generic_is_local_label_name): Cast return to boolean.
5830 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5831 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5832 struct bfd_hash_entry *.
5833 (_bfd_generic_link_hash_newfunc): likewise.
5834 (_bfd_generic_final_link): Cast enum to unsigned int.
5835 * merge.c (sec_merge_emit): Cast return to boolean.
5836 (merge_strings): Add casts to const unsigned char *.
5837 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5838 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5839 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5840 to struct bfd_hash_entry *.
5841 (bfd_set_section_content): Add cast to PTR in comparison.
5842 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5843 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5844 simple_dummy_unattached_reloc,
5845 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5846 function definitions.
5847 * srec.c (S3Forced): Initialize to false.
5848 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5849 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5850 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5851 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5852 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5853 comparisons.
5854
5855 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5856
5857 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5858 relocs into shared lib non-allocated reloc sections.
5859
5860 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5861
5862 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5863 sorted even when given an out-of-order line sequence.
5864 (lookup_address_in_line_info_table): When an exact VMA match is
5865 not found, return line information with the closest VMA.
5866
5867 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5868
5869 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5870 HPUX 11.00 patch PHSS_26559.
5871
5872 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5873
5874 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5875 the options section into a separate section unless IRIX 6
5876 compatibility is enabled.
5877
5878 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5879
5880 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5881 into arrays.
5882 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5883 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5884 into account.
5885 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5886 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5887
5888 2002-10-21 Graeme Peterson <gp@qnx.com>
5889
5890 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5891
5892 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5893
5894 * targets.c (bfd_target_list): Don't return the default target twice.
5895
5896 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5897
5898 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5899 perror with bfd_perror.
5900
5901 2002-10-19 H.J. Lu <hjl@gnu.org>
5902
5903 * elflink.h (elf_link_add_object_symbols): Correctly handle
5904 DT_RPATH and DT_RUNPATH.
5905
5906 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5907
5908 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5909
5910 2002-10-17 Denis Chertykov <denisc@overta.ru>
5911
5912 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5913 for ip2k port.
5914
5915 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5916
5917 * elfxx-target.h (USE_REL): Don't define as 1.
5918 * elf32-arm.h (USE_REL): Provide a default define of 0.
5919 Use #if rather than #ifdef when testing USE_REL.
5920 * elf32-m32r.c: Likewise.
5921
5922 * elf32-arc.c (USE_REL): Define as 1.
5923 * elf32-d10v.c (USE_REL): Likewise.
5924 * elf32-m32r.c (USE_REL): Likewise.
5925 * elf32-m68hc11.c (USE_REL): Likewise.
5926 * elf32-m68hc12.c (USE_REL): Likewise.
5927 * elf32-or32.c (USE_REL): Likewise.
5928 * elfarm-nabi.c (USE_REL): Likewise.
5929
5930 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5931
5932 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5933 (s390x-*-linux*): Add targ_selvecs.
5934
5935 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5936
5937 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5938 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5939 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5940 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5941 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5942 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5943 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5944 (SOURCE_HFILES): Add elf32-qnx.h.
5945 (BUILD_HFILES): Add bfdver.h.
5946 Run "make dep-am".
5947 * Makefile.in: Regenerate.
5948 * configure.in Update bfd vector dependencies.
5949 * configure: Regenerate.
5950 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5951 * elf32-i386qnx.c: Likewise.
5952 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5953 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5954 * elf32-sh-lin.c: Likewise.
5955 * elf32-shqnx.c: Likewise.
5956 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5957 * elf32-sh64-nbsd.c: Likewise.
5958 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5959 * elf64-sh64-nbsd.c: Likewise.
5960 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5961 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5962 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5963 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5964 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5965 (elf_backend_is_contained_by_filepos): Likewise.
5966 (elf_backend_copy_private_bfd_data_p): Likewise.
5967 Globalize and move functions to..
5968 * elf32-qnx.c: ..here. New file.
5969 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5970 emit target vectors when INCLUDE_SHMEDIA.
5971 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5972 end of file.
5973 * elf64-sh64.c: Remove ELF_ARCH test.
5974 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5975 * po/BLD-POTFILES.in: Regenerate.
5976 * po/SRC-POTFILES.in: Regenerate.
5977
5978 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5979
5980 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5981 loaded with --just-symbols.
5982
5983 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5984 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5985 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5986 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5987
5988 2002-10-15 Richard Henderson <rth@redhat.com>
5989
5990 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5991 (BFD64_BACKENDS_CFILES): Likewise.
5992 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5993 * elf64-alpha-fbsd.c: Remove file, move code ...
5994 * elf64-alpha.c: ... here.
5995 * Makefile.in, configure: Rebuild.
5996
5997 2002-10-14 Richard Henderson <rth@redhat.com>
5998
5999 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
6000 VALUE, not ADDEND.
6001
6002 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
6003
6004 * elf32-sh.c (elf_sh_link_hash_entry): Replace
6005 datalabel_got_offset with union of datalabel_got
6006 offset and refcount.
6007 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
6008 (allocate_dynrelocs): Delete unnecessary code for
6009 STT_DATALABEL type. Create entry in got for
6010 datalabel version of symbol if datalabel_got.refcount > 0.
6011 (sh_elf_relocate_section): Use datalabel_got union.
6012 (sh_elf_gc_sweep_hook): Pull common code to initialize
6013 h and eh out of switch statement. Declare seen_stt_datalabel.
6014 Initialize it. Decrement datalabel_got.refcount for
6015 got relocs when seen_stt_datalabel is true.
6016 Decrement local_got_refcounts entry for datalabel got relocs
6017 of local symbols.
6018 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
6019 (sh_elf_check_relocs): Declare seen_stt_datalabel.
6020 Initialize it. When seen_stt_datalabel is true, increment
6021 datalabel_got refcount rather than got.refcount.
6022 (sh_elf_finish_dynamic_symbol): Create relocs to
6023 initialize got entry for datalabel version of symbol.
6024
6025 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6026
6027 * Makefile.am: Run "make dep-am".
6028 (BFD_H_FILES): Remove version.h.
6029 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
6030 * version.h: ..to here.
6031 * configure.in (bfd_version_date): Remove.
6032 (AC_OUTPUT): Make bfdver.h from version.h.
6033 * bfd.c: #include "bfdver.h".
6034 * vms-hdr.c: Likewise.
6035 * Makefile.in: Regenerate.
6036 * bfd-in2.h: Regenerate.
6037 * configure: Regenerate.
6038 * po/SRC-POTFILES.in: Regenerate.
6039
6040 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6041
6042 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6043 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6044 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6045 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6046 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6047 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6048 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6049 bfd_mach_ip2022, bfd_mach_ip2022ext,
6050 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6051 * bfd-in2.h: Regenerate.
6052
6053 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6054
6055 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6056 endian vector to targ_selvecs.
6057
6058 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6059
6060 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6061 save_addend argument. Don't apply the 32-bit mask to a
6062 GPREL32 value if it's to be used in another relocation. Don't
6063 use forced-check computation of local_p to decide whether to
6064 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6065 of the addend of a non-in-place GPREL16 relocation.
6066 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6067 mips_elf_calculate_relocation().
6068
6069 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6070
6071 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6072 with symbols in other sections if we relaxed something; the sections
6073 output offsets must be re-computed before.
6074
6075 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6076
6077 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6078 handling to use Elf_Internal_Sym.
6079 (m68hc11_elf_relax_delete_bytes): Likewise.
6080
6081 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6082
6083 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6084 sh_elf_object_p, dtpoff_base): New functions.
6085 (sh_elf_howto_table): Add TLS relocs.
6086 (sh_reloc_map): Likewise.
6087 (sh_elf_info_to_howto): Support TLS relocs.
6088 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6089 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6090 New macros.
6091 (sh_elf_obj_tdata): New.
6092 (elf_sh_link_hash_table): Add tls_ldm_got.
6093 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6094 (allocate_dynrelocs): Support TLS relocs.
6095 (sh_elf_size_dynamic_sections): Likewise.
6096 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6097 .rela.got section when found already. Return false after printing
6098 error about unresolvable relocation.
6099 (sh_elf_gc_sweep_hook): Support TLS relocs.
6100 (sh_elf_check_relocs): Likewise.
6101 (sh_elf_finish_dynamic_symbol): Likewise.
6102 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6103 * reloc.c: Add SH TLS relocs.
6104 * bfd-in2.h, libbfd.h: Regenerate.
6105
6106 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6107
6108 * Makefile.in: Regenerated.
6109
6110 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6111
6112 * Makefile.am: Run dep-am.
6113 (BFD_H_DEP): Add simple.c and linker.c.
6114 (BFD32_LIBS): Add simple.lo.
6115 (BFD32_LIBS_CFILES): Add simple.c.
6116 * Makefile.in: Regenerated.
6117 * bfd-in2.h: Regenerated.
6118 * simple.c: New file.
6119
6120 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6121
6122 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6123 (record_thumb_to_arm_glue): Likewise.
6124 * ecoff.c (ecoff_link_add_externals): Likewise.
6125 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6126 (record_thumb_to_arm_glue): Likewise.
6127 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6128 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6129 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6130 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6131 * elf64-ppc.c (func_desc_adjust): Likewise.
6132 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6133 (sh64_elf64_create_dynamic_sections): Likewise.
6134 * elflink.c (_bfd_elf_create_got_section): Likewise.
6135 (_bfd_elf_create_dynamic_sections): Likewise.
6136 (_bfd_elf_create_linker_section): Likewise.
6137 * elflink.h (elf_add_default_symbol): Likewise.
6138 (elf_link_create_dynamic_sections): Likewise.
6139 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6140 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6141 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6142 (_bfd_mips_elf_add_symbol_hook): Likewise.
6143 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6144 * linker.c (generic_link_add_symbol_list): Likewise.
6145 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6146
6147 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6148
6149 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6150 completely removed. Correct local sym adjustment.
6151
6152 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6153
6154 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6155 Correct mistake in calculation of address of .got.
6156 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6157 elf_sh64_pic_plt_entry_le): Likewise.
6158
6159 2002-10-09 Richard Shann <richard.shann@superh.com>
6160 Stephen Clarke <stephen.clarke@superh.com>
6161
6162 * Makefile.am: Add entries for elf32-sh64-lin.c and
6163 elf64-sh64-lin.c. Regenerate.
6164 * Makefile.in: Regenerate.
6165 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6166 to use sh64 vectors rather than sh vectors.
6167 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6168 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6169 * configure: Regenerate.
6170 * elf32-sh64-lin.c: New file.
6171 * elf64-sh64-lin.c: New file.
6172 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6173 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6174
6175 2002-10-08 H.J. Lu <hjl@gnu.org>
6176
6177 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6178 IE->LE transition for R_386_TLS_IE.
6179
6180 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6181
6182 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6183
6184 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6185
6186 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6187 sections.
6188
6189 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6190
6191 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6192 code.
6193
6194 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6195
6196 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6197
6198 * opncls.c: Formatting.
6199 (_bfd_new_bfd): Use a smaller section hash table.
6200
6201 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6202
6203 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6204 of the other two relocations packed with a REL32 to NONE.
6205
6206 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6207
6208 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6209 (sh_elf_link_hash_newfunc): Initialize it.
6210 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6211 to got.refcount for symbols that are forced local or when
6212 we have direct got refs.
6213 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6214 to correctly adjust got.refcount and plt.refcount.
6215 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6216 (sh_elf_check_relocs): Increment gotplt_refcount.
6217
6218 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6219
6220 * elf32-i386.c (elf_i386_relocate_section): Fix
6221 movl foo@indntpoff, %eax IE->LE transition.
6222
6223 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6224
6225 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6226 sequence and its transitions.
6227
6228 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6229
6230 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6231 to st_value + addend in non-code sections.
6232 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6233 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6234
6235 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6236 Ken Raeburn <raeburn@cygnus.com>
6237 Aldy Hernandez <aldyh@redhat.com>
6238 Eric Christopher <echristo@redhat.com>
6239 Richard Sandiford <rsandifo@redhat.com>
6240
6241 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6242 (bfd_mach_mips5500): New.
6243 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6244 (arch_info_struct): Add corresponding entries here.
6245 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6246 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6247 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6248 bfd_mach_mips5400 and bfd_mach_mips5500.
6249 (_bfd_mips_elf_mach_extends_p): New function.
6250 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6251 the EF_MIPS_MACH flags.
6252 * bfd-in2.h: Regenerate.
6253
6254 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6255
6256 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6257 .got sections.
6258
6259 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6260
6261 * elf.c (map_sections_to_segments): Correct test for start of
6262 writable section in the same page as end of read-only section.
6263
6264 2002-09-27 Matt Thomas <matt@3am-software.com>
6265
6266 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6267 local_got_refcounts usage. Remove allocation of got slot.
6268 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6269 Remove de-allocation of got slot.
6270 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6271 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6272 sections to be GC'ed.
6273 (elf_vax_instantiate_got_entries): New function.
6274 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6275 tests that are now handled by elf_vax_instantiate_got_entries.
6276 Assert GOT entry falls within .got section size. Remove redundant
6277 comparisions. Fix comments.
6278
6279 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6280
6281 * reloc.c: Add x86-64 TLS relocs.
6282 * bfd-in2.h, libbfd.h: Rebuilt.
6283 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6284 relocs. Add TLS relocs.
6285 (x86_64_reloc_map): Add TLS relocs.
6286 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6287 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6288 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6289 (elf64_x86_64_hash_entry): Define.
6290 (struct elf64_x86_64_obj_tdata): New.
6291 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6292 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6293 (link_hash_newfunc): Initialize tls_type.
6294 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6295 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6296 (elf64_x86_64_mkobject): New.
6297 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6298 (elf64_x86_64_tls_transition): New.
6299 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6300 Handle TLS relocs.
6301 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6302 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6303 (elf64_x86_64_size_dynamic_sections): Likewise.
6304 (dtpoff_base, tpoff): New.
6305 (elf64_x86_64_relocate_section): Handle TLS relocs.
6306 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6307 entries.
6308 (bfd_elf64_mkobject): Define.
6309
6310 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6311 DF_STATIC_TLS if shared.
6312
6313 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6314
6315 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6316 empty relocation sections.
6317
6318 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6319
6320 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6321 (ppc64_elf_build_stubs): Build them here instead.
6322
6323 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6324
6325 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6326 addend into r_addend, not *r_offset.
6327 (elf32_sparc_finish_dynamic_symbol): Likewise.
6328 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6329 R_SPARC_RELATIVE's r_offset.
6330
6331 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6332
6333 * dwarf2.c (decode_line_info): Update to correctly decode
6334 the (non-standard DWARF2) out-of-order address sequences
6335 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6336
6337 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6338
6339 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6340
6341 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6342
6343 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6344 for discarded FDEs. Remove redundant assignment.
6345 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6346
6347 2002-09-22 H.J. Lu <hjl@gnu.org>
6348
6349 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6350 the relocation count between different .reloc sections.
6351
6352 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6353
6354 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6355 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6356 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6357 R_PPC_EMB_RELSDA.
6358
6359 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6360 unsigned. Move "symcount" assignment out of loop.
6361 * Makefile.am: Run "make dep-am".
6362 * Makefile.in: Regenerate.
6363 * configure: Regenerate.
6364 * po/SRC-POTFILES.in: Regnerate.
6365
6366 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6367
6368 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6369 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6370 (e.g. IRIX64).
6371
6372 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6373
6374 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6375 even if generating R_PPC_RELATIVE reloc.
6376 (ppc_elf_relocate_section): Make sure relocation is performed
6377 if skip == -2. Clear memory at r_offset when creating dynamic
6378 relocation.
6379
6380 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6381
6382 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6383 BFD_RELOC_386_TLS_GOTIE): Add.
6384 * bfd-in2.h, libbfd.h: Rebuilt.
6385 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6386 and R_386_TLS_GOTIE.
6387 (elf_i386_reloc_type_lookup): Handle it.
6388 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6389 char instead of enum, change GOT_* into defines.
6390 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6391 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6392 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6393 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6394 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6395 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6396 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6397 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6398 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6399 tls_type is GOT_TLS_IE_BOTH.
6400 (elf_i386_size_dynamic_sections): Likewise.
6401 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6402 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6403 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6404 all 4 GOT_TLS_* TLS types.
6405
6406 2002-09-19 Nick Clifton <nickc@redhat.com>
6407
6408 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6409 follow indirect links.
6410
6411 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6412
6413 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6414 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6415 on 64 bit machines.
6416 (ecoff_swap_sym_in) <iss>: Likewise.
6417 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6418 ECOFF information: 'ioptMax' refers to the actual *size*
6419 of the optimization symtab, not the number of entries.
6420
6421 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6422
6423 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6424 ELF_LINK_HASH_NEEDS_PLT logic.
6425
6426 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6427
6428 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6429 correct relocation count.
6430
6431 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6432
6433 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6434 * bfd.c (struct _bfd): Add dynsymcount.
6435 * bfd-in2.h: Regenerated.
6436 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6437 abfd->dynsymcount.
6438 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6439 for overflow.
6440
6441 2002-09-17 Stan Cox <scox@redhat.com>
6442
6443 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6444 (mips_elf64_final_gp): Don't make up gp value.
6445 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6446 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6447 .MIPS.options/.options section.
6448
6449 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6450
6451 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6452 It is benign for FreeBSD < 4.1. Minor reformatting.
6453 * elf64-alpha-fbsd.c: Likewise.
6454
6455 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6456
6457 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6458 addend.
6459
6460 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6461
6462 * elf64-alpha.c (alpha_elf_size_info): Make static.
6463
6464 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6465
6466 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6467 * cpu-tic4x.c: Ditto.
6468
6469 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6470
6471 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6472 duplicate define.
6473
6474 2002-09-16 Bruno Haible <bruno@clisp.org>
6475
6476 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6477 by a target variant implementation.
6478 * elf64-alpha.c: Likewise.
6479 * elf32-i386-fbsd.c: New file.
6480 * elf64-alpha-fbsd.c: New file.
6481 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6482 bfd_elf64_alpha_freebsd_vec.
6483 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6484 bfd_elf64_alpha_freebsd_vec.
6485 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6486 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6487 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6488 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6489 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6490 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6491 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6492
6493 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6494
6495 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6496 NULL.
6497 (elf_i386_relocate_section): Return false after printing error about
6498 unresolvable relocation.
6499
6500 2002-09-12 Nick Clifton <nickc@redhat.com>
6501
6502 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6503 R_ARM_THM_PC11.
6504
6505 2002-09-11 Jeffrey Law <law@redhat.com>
6506
6507 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6508
6509 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6510
6511 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6512 line_ptr before deciding we've found a symbol.
6513
6514 2002-09-11 Nick Clifton <nickc@redhat.com>
6515
6516 * po/da.po: New Danish translation file.
6517 * configure.in (LINGUAS): Add 'da'.
6518 * configure: Regenerate.
6519
6520 2002-09-10 Michael Snyder <msnyder@redhat.com>
6521
6522 * irix-core.c (do_sections, do_sections64): New functions.
6523 (irix_core_core_file_p): Call new functions do_sections,
6524 do_sections64, depending on corefile (32-bit or 64-bit).
6525
6526 2002-09-09 Richard Henderson <rth@redhat.com>
6527
6528 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6529 and PCREL21F like PCREL21B.
6530
6531 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6532
6533 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6534 vector.
6535
6536 2002-09-02 Nick Clifton <nickc@redhat.com>
6537
6538 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6539 names instead of cryptically overloaded bfd_reloc error
6540 codes.
6541 (v850_elf_relocate_section): Likewise.
6542 (v850_elf_relax_section): Replace caching of external symbols
6543 with caching of internal symbols obtained from calling
6544 bfd_elf_get_elf_syms().
6545 Fixup problems with freeing cached allocated memory blocks.
6546
6547 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6548
6549 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6550 (bfd_pj_arch): Use bfd_default_scan.
6551 * cpu-v850.c (scan): Remove.
6552 (N): Use bfd_default_scan.
6553 * cpu-z8k.c (scan_mach): Remove.
6554 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6555 first. Use bfd_default_scan.
6556
6557 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6558 bfd_mach constants.
6559 (ecoff_get_magic): Likewise.
6560 * elf32-v850.c (v850_elf_object_p): Likewise.
6561 (v850_elf_final_write_processing): Likewise.
6562 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6563 (MY(write_object_contents)): Likewise.
6564 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6565 * coffcode.h (coff_write_object_contents): Likewise.
6566 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6567 Remove unnecessary "machine" assignments.
6568 (coff_write_relocs): Test for the absolute section sym by testing
6569 section and flags.
6570
6571 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6572 and bfd_mach_i386_i386_intel_syntax.
6573 * pdp11.c (NAME(aout,machine_type)): Likewise.
6574
6575 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6576
6577 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6578 * bfd-in2.h (align_power): Likewise.
6579
6580 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6581
6582 * Makefile.am: Run "make dep-am".
6583 * Makefile.in: Regenerate.
6584
6585 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6586 * cpu-powerpc.c (powerpc_compatible): Likewise.
6587 * cpu-rs6000.c (rs6000_compatible): Likewise.
6588
6589 2002-08-28 Catherine Moore <clm@redhat.com>
6590
6591 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6592 (v850-elf-reloc): Don't resolve pc relative relocs.
6593 (v850_elf_ignore_reloc): New routine.
6594 (v850_elf_final_link_relocate): Handle new relocs.
6595 (v850_elf_relax_delete_bytes ): New routine.
6596 (v850_elf_relax_section): New routine.
6597 (bfd_elf32_bfd_relax_section): Define.
6598 (HOWTO): New entries for new relocs.
6599 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6600 (BFD_RELOC_V850_LONGJUMP): New reloc.
6601 (BFD_RELOC_V850_ALIGN): New reloc.
6602 * archures.c: Remove redundant v850ea architecture.
6603 * cpu-v850.c: Remove redundant v850ea support.
6604 * libbfd.h: Regenerate.
6605 * bfd-in2.h: Regenerated.
6606
6607 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6608
6609 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6610 * configure.in: Add tic4x_coff vector files.
6611 * configure: Regenerate.
6612 * Makefile.am: Add tic4x target.
6613 * Makefile.in: Regenerate.
6614
6615 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6616
6617 * archures.c: Add the BFD arch type tic4x.
6618 * bfd-in.h: Add BFD_IN_MEMORY flag.
6619 * coff-tic4x.c: New file.
6620 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6621 * cpu-tic4x.c: New file.
6622 * targets.c: Added tic4x- in list of xvecs.
6623 * ticoff.h: New file.
6624 * bfd-in2.h: Regenerate.
6625
6626 2002-08-27 Adam Nemet <anemet@lnxw.com>
6627
6628 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6629 bit of DT_INIT and DT_FINI for Thumb functions.
6630
6631 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6632
6633 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6634
6635 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6636
6637 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6638
6639 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6640
6641 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6642 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6643 Likewise.
6644 (struct elf_sh_pcrel_relocs_copied): Removed.
6645 (struct elf_sh_dyn_relocs): New.
6646 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6647 field with dyn_relocs.
6648 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6649 sections and sym_sec.
6650 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6651 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6652 (sh_elf_create_dynamic_sections): Use create_got_section instead
6653 of _bfd_elf_create_got_section.
6654 (sh_elf_check_relocs): Likewise.
6655 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6656 sections.
6657 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6658 sh_elf_relocate_section, sh_elf_check_relocs,
6659 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6660 Likewise.
6661 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6662 dynamic relocations and avoiding the copy relocation when we
6663 didn't find any dynamic relocations in the section which has
6664 contents or is read-only.
6665 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6666 (sh_elf_size_dynamic_sections): Don't reset the size of
6667 .rela.got section even if dynamic_sections_created flag is off.
6668 Don't use sh_elf_discard_copies. Scan all input bfd and use
6669 allocate_dynrelocs. Call readonly_dynrelocs to determine
6670 whether we need DT_TEXTREL.
6671 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6672 whether the symbol was never referred to.
6673 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6674 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6675 (sh_elf_check_relocs): Call create_got_section if the short-cut
6676 to .got is null. Increment reference counters only instead of
6677 allocating space on dynamic sections here. Don't conditionalize
6678 uninitialized got.offset value when marking the symbol as a
6679 global offset table entry. Keep relocations for symbols satisfied
6680 by a dynamic library to avoid copy relocations for the symbol.
6681 Set dynobj field of an elf hash table if needed.
6682 (sh_elf_finish_dynamic_sections): Handle null section pointer
6683 correctly.
6684 (elf_backend_copy_indirect_symbol): Defined.
6685 (elf_backend_can_refcount): Defined.
6686
6687 2002-08-23 Nick Clifton <nickc@redhat.com>
6688
6689 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6690 previous change. Add comment explaining why.
6691
6692 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6693
6694 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6695 contents of .got.plt[2] to tr0, not address of .got.plt.
6696 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6697 patching absolute plt entry. For shmedia plt entry, set bottom bit
6698 of branch to plt0 as this is a branch to an shmedia instruction.
6699 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6700 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6701 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6702 branch to plt0.
6703 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6704 patching absolute plt entry. For shmedia plt entry, branch to
6705 plt0 is now ptrel, so use relative offset. Set bottom bit of
6706 branch target as it is a branch to an shmedia instruction.
6707
6708 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6709 Richard Shann <richard.shann@superh.com>
6710
6711 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6712 value if .init is an SHmedia function. Similarly for DT_FINI.
6713 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6714
6715 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6716
6717 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6718 dynamic section.
6719 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6720
6721 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6722
6723 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6724 byte read when reading the return address register column.
6725
6726 2002-08-22 Nick Clifton <nickc@redhat.com>
6727
6728 * config.bfd: Add powepc64-*-*bsd* target.
6729
6730 2002-08-22 Graeme Peterson <gp@qnx.com>
6731
6732 * Makefile.am: Add entries for elf32-shqnx.c
6733 * Makefile.in: Regenerate.
6734 * config.bfd: Add support sh-*-nto* target.
6735 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6736 * configure: Regenerate.
6737 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6738 * elf32-sh.c: Do not include elf32-target.h if
6739 ELF32_SH_C_INCLUDED is defined.
6740 * elf32-shqnx.c: New file: Support for QNX.
6741 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6742
6743 2002-08-22 Nick Clifton <nickc@redhat.com>
6744
6745 * po/tr.po: Updated Turkish translation.
6746
6747 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6748 symbols are not read.
6749
6750 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6751
6752 * elf32-m68hc11.c: Formatting fixes.
6753 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6754 * elf32-m68hc12.c: Formatting fixes.
6755 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6756
6757 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6758
6759 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6760 SEC_DATA.
6761 (pmac_xcoff_vec): Likewise.
6762 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6763 (aix5coff64_vec): Likewise.
6764
6765 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6766
6767 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6768 param to elf_backend_copy_indirect_symbol.
6769 (_bfd_elf_link_hash_copy_indirect): Likewise.
6770 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6771 calls to copy_indirect_symbol.
6772 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6773 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6774 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6775 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6776 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6777 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6778 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6779 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6780 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6781 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6782 test refcounts for "used" values.
6783
6784 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6785
6786 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6787 argument declaration.
6788
6789 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6790
6791 * archures.c (bfd_mach_ppc_e500): Added.
6792 * bfd-in2.h: Rebuilt.
6793 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6794
6795 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6796
6797 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6798
6799 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6800
6801 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6802 `bfd_byte'.
6803
6804 2002-08-17 Stan Cox <scox@redhat.com>
6805
6806 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6807 IRIX 6 segment layout for NEWABI.
6808
6809 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6810
6811 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6812 symbols when looking for section referred to by a relocation.
6813 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6814
6815 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6816
6817 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6818
6819 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6820
6821 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6822 missing check for whether the symbol is referenced by DSO before
6823 unexporting it as an unneeded dynamic symbol.
6824
6825 2002-08-14 H.J. Lu <hjl@gnu.org>
6826
6827 * libbfd.h: Regenerate.
6828
6829 2002-08-14 H.J. Lu <hjl@gnu.org>
6830
6831 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6832
6833 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6834
6835 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6836 instructions.
6837 (m68hc11_direct_relax): New to define table of relaxable instructions.
6838 (find_relaxable_insn): New, find a relaxable insn.
6839 (compare_reloc): New to compare two relocs.
6840 (m68hc11_elf_relax_section): New, relax text sections.
6841 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6842 (elf32_m68hc11_check_relocs): New function for GC support.
6843 (elf32_m68hc11_relocate_section): New function for GC support.
6844 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6845 (elf_backend_check_relocs): Likewise.
6846 (elf_backend_relocate_section): Likewise.
6847
6848 2002-08-13 H.J. Lu <hjl@gnu.org>
6849
6850 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6851 definitions in shared objects when checking symbol with
6852 undefined version.
6853
6854 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6855
6856 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6857 (elf32_m68hc11_gc_sweep_hook): Likewise.
6858 (elf_backend_gc_mark_hook): Define for GC section support.
6859 (elf_backend_gc_sweep_hook): Likewise.
6860 (elf_backend_can_gc_sections): Likewise.
6861
6862 * elf32-m68hc12.c: Likewise.
6863
6864 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6865
6866 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6867 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6868 (_bfd_m68hc11_elf_set_private_flags): New function.
6869 Use them to set/check/print ELF flags specific to 68HC11.
6870
6871 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6872 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6873 (_bfd_m68hc12_elf_set_private_flags): New function.
6874 Use them to set/check/print ELF flags specific to 68HC12.
6875
6876 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6877
6878 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6879 fix masks for PC-rel relocs.
6880 (m68hc11_elf_ignore_reloc): New function.
6881
6882 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6883 68HC12 banked addressing relocs.
6884 (m68hc12_phys_addr): New to compute physical address of banked memory.
6885 (m68hc12_phys_page): Likewise for page.
6886 (m68hc12_addr_is_banked): New to see if address is in banked area.
6887 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6888
6889 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6890
6891 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6892 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6893 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6894 * bfd-in2.h: Regenerate.
6895
6896 2002-08-12 H.J. Lu <hjl@gnu.org>
6897
6898 * elflink.h (elf_add_default_symbol): Preserve section across
6899 elf_merge_symbol.
6900
6901 2002-08-09 Graeme Peterson <gp@qnx.com>
6902
6903 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6904 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6905 * Makefile.in: Regenerate.
6906 * config.bfd: Add support for powerpc{le}-*-nto targets.
6907 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6908 * configure: Regenerate.
6909 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6910 common file "elf32-qnx.h", and now include that file.
6911 * elf32-qnx.h: New file: QNX specific common elf backend.
6912 * elf32-ppc.c: Do not include elf32-target.h if
6913 ELF32_PPC_C_INCLUDED is defined.
6914 * elf32-ppcqnx.c: New file: Support for QNX.
6915 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6916 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6917
6918 2002-08-09 Nick Clifton <nickc@redhat.com>
6919
6920 * po/sv.po: Updated Swedish translation.
6921
6922 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6923
6924 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6925 g->global_gotsym is NULL.
6926
6927 2002-08-08 H.J. Lu <hjl@gnu.org>
6928
6929 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6930 overrides an indirect versioned symbol.
6931
6932 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6933
6934 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6935 for R_386_TLS_TPOFF32 relocs against symndx 0.
6936
6937 2002-08-07 H.J. Lu <hjl@gnu.org>
6938
6939 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6940 with undefined version if needed.
6941 (elf_link_assign_sym_version): Match a default symbol with a
6942 version without definition. No need to hide the default
6943 definition separately.
6944
6945 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6946
6947 * elflink.h (elf_link_output_extsym): Don't output symbols from
6948 SEC_EXCLUDE sections.
6949
6950 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6951
6952 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6953
6954 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6955 entries.
6956
6957 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6958
6959 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6960 mismatch.
6961
6962 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6963
6964 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6965
6966 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6967
6968 * elf32-mips.c (mips_reloc_map): Fix typo.
6969
6970 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6971
6972 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6973
6974 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6975
6976 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6977
6978 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6979
6980 * libxcoff.h: Use PARAMS on function declarations.
6981 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6982 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6983
6984 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6985 addend.
6986 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6987
6988 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6989
6990 * coff-rs6000.c: Formatting fixes.
6991 (xcoff_calculate_relocation): Use PARAMS in declaration.
6992 (xcoff_complain_overflow): Likewise.
6993 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6994 (bfd_xcoff_backend_data): Remove useless comments.
6995 (rs6000coff_vec): Likewise.
6996 (bfd_pmac_xcoff_backend_data): Likewise.
6997 (pmac_xcoff_vec): Likewise.
6998
6999 * coff64-rs6000.c: Formatting fixes.
7000 (xcoff64_calculate_relocation): Use PARAMS in declaration.
7001 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
7002 (bfd_xcoff_backend_data): Remove useless comments.
7003 (rs6000coff64_vec): Likewise.
7004 (bfd_xcoff_aix5_backend_data): Likewise.
7005 (aix5coff64_vec): Likewise.
7006
7007 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7008
7009 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
7010 mask entries. Use complain_overflow_dont for R_REF.
7011 (xcoff_reloc_type_ba): Revert last change.
7012 (xcoff_reloc_type_br): Likewise.
7013 (xcoff_reloc_type_crel): Likewise.
7014 (xcoff_ppc_relocate_section): Likewise.
7015 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
7016 (xcoff64_ppc_relocate_section): Likewise.
7017 (xcoff64_howto_table): Revert some of last change to mask entries.
7018 Use complain_overflow_dont for R_REF.
7019
7020 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
7021 relocs with bitsize == 16 have size = 1.
7022 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
7023 (xcoff_reloc_type_br): Likewise.
7024 (xcoff_reloc_type_crel): Likewise.
7025 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7026 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
7027 dst_mask adjustment.
7028 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7029 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
7030 bitsize == 16 have size = 1.
7031
7032 2002-08-01 Denis Chertykov <denisc@overta.ru>
7033
7034 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
7035 (struct misc): New field isymbuf. All free_* fields removed.
7036 (symbol_value): Pass in internal syms. No need to swap syms in.
7037 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
7038 possibly cached info.
7039 (tidyup_after_error): Removed.
7040 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7041 misc. Use new field.
7042 (adjust_all_relocations): Use internal syms. No need to swap syms
7043 in and out.
7044 (add_page_insn): Don't use removed fields of struct misc.
7045
7046 2002-08-01 Nick Clifton <nickc@redhat.com>
7047
7048 * elf32-arm.h: Revert previous delta.
7049
7050 2002-08-01 Nick Clifton <nickc@redhat.com>
7051
7052 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7053 * configure: Regenerate.
7054
7055 2002-07-31 H.J. Lu <hjl@gnu.org>
7056
7057 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7058 selected.
7059
7060 2002-07-31 H.J. Lu <hjl@gnu.org>
7061
7062 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7063 is selected.
7064
7065 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7066
7067 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7068 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7069
7070 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7071
7072 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7073 There is no 8 byte relocation type for this architecture.
7074 (do_ns32k_reloc): Use bfd_vma instead of native types.
7075 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7076 returns void.
7077 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7078 rely on generic code to do that.
7079 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7080 to all table entries.
7081 (_bfd_ns32k_relocate_contents): put_data returns void.
7082 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7083 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7084 return void.
7085
7086 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7087
7088 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7089 archive object is target dependant.
7090
7091 2002-07-31 Adam Nemet <anemet@lnxw.com>
7092
7093 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7094 (THUMB_PLT_ENTRY_SIZE): New macro.
7095 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7096 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7097 ARM_PLT_ENTRY_SIZE.
7098 (elf32_arm_plt_entry): Likewise.
7099 (elf_backend_plt_header_size): Likewise.
7100 (elf32_thumb_plt0_entry): New global.
7101 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7102 into .plt.thumb.
7103 (elf32_thumb_plt_entry): New global.
7104 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7105 Thumb entries. Set the bottom bit of the corresponding GOT entry
7106 for a Thumb PLT entry.
7107 (struct elf32_arm_plt_entry_info): New structure.
7108 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7109 type.
7110 (elf32_arm_link_hash_newfunc): Initialize new member.
7111 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7112 relocations against the PLT.
7113 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7114 first_rel_type if this is the first time we encounter the symbol.
7115 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7116 Determine if relocation needs a PLT entry. Set first_rel_type if
7117 this is the first time we encounter the symbol
7118 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7119 functions as well.
7120 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7121 (elf32_arm_create_dynamic_sections): New function. Create the
7122 .plt.thumb section.
7123 (elf_backend_create_dynamic_sections): Call it.
7124
7125 2002-07-31 Nick Clifton <nickc@redhat.com>
7126
7127 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7128 'alternative' in order to avoid shadowing global symbol of the
7129 same name.
7130 * bfd-in2.h: Regenerate.
7131 * libbfd.h: Regenerate.
7132 * libcoff.h: Regenerate.
7133
7134 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7135
7136 * Makefile.am: Add n32 ABI support.
7137 * Makefile.in: Regenerate.
7138 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7139 bit vectors for mips*-*-linux targets as optional.
7140 * configure.in: Add n32 ABI vectors.
7141 * configure: Regenerate.
7142 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7143 * elfn32-mips.c: New file, n32 ABI support.
7144 * targets.c: Add n32 ABI vectors.
7145
7146 2002-07-30 Graeme Peterson <gp@qnx.com>
7147
7148 * elfarmqnx-nabi.c: New file: Support for QNX.
7149 * config.bfd: Add support for arm-*-nto target.
7150 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7151 * configure: Regenerate.
7152 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7153 * Makefile.in: Regenerate.
7154 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7155 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7156 * elfarm-nabi.c: Do not include elf32-arm.h if
7157 ELFARM_NABI_C_INCLUDED is defined.
7158 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7159
7160 2002-07-30 Nick Clifton <nickc@redhat.com>
7161
7162 * po/sv.po: Updated Swedish translation.
7163
7164 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7165
7166 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7167
7168 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7169
7170 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7171 * archive.c (bfd_generic_archive_p): Likewise.
7172 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7173 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7174 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7175 (xcoff64_archive_p): Likewise.
7176 (xcoff64_openr_next_archived_file): Likewise.
7177 (xcoff64_archive_p): Clean up tdata properly on error.
7178 * coffgen.c (coff_real_object_p): Likewise.
7179 (coff_object_p): Release filehdr and opthdr.
7180 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7181 * ieee.c (ieee_archive_p): Likewise.
7182 * ihex.c (ihex_object_p): Likewise.
7183 (ihex_mkobject): Always allocate tdata.
7184 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7185 * srec.c (srec_mkobject): Always allocate tdata.
7186 (srec_object_p): Clean up tdata properly on error.
7187 (symbolsrec_object_p): Likewise.
7188 * versados.c (versados_object_p): Likewise.
7189 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7190 and bfd_realloc instead of realloc.
7191 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7192 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7193 place of bfd_malloc, simplifying error freeing. Free hash table too.
7194 (vms_object_p): Clean up tdata on error.
7195 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7196 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7197
7198 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7199
7200 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7201
7202 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7203
7204 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7205 flags into resulting BFD.
7206
7207 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7208
7209 From John Reiser <jreiser@BitWagon.com>
7210 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7211 tls_ldm_got.refcount.
7212
7213 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7214
7215 * elf64-mips.c: Update TODO comment.
7216 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7217 mips_elf64_gprel16_reloca): Remove prototypes.
7218 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7219 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7220 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7221 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7222 R_MIPS_HIGHEST.
7223 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7224 R_MIPS_GOT16. Remove wrong comments.
7225 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7226 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7227 from elf32-mips.c.
7228 (mips_elf64_hi16_reloc): Fix formatting.
7229 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7230 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7231 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7232 (mips_elf64_gprel16_reloc): Make static. Add check for
7233 partial_inplace.
7234 (mips_elf64_gprel16_reloca): Remove.
7235 (mips_elf64_literal_reloc): New function.
7236 (mips_elf64_gprel32_reloc): Fix formatting.
7237 (mips_elf64_shift6_reloc): Fix comment. Make static.
7238 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7239 elf32-mips.c.
7240 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7241 elf32-mips.c
7242 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7243 specific relocations.
7244 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7245 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7246 (ELF_MAXPAGESIZE): Add comment.
7247
7248 2002-07-25 Nick Clifton <nickc@redhat.com>
7249
7250 * po/sv.po: Updated Swedish translation.
7251 * po/es.po: Updated Spanish translation.
7252 * po/fr.po: Updated French translation.
7253
7254 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7255
7256 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7257 as elf_link_record_local_dynamic_symbol.
7258 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7259 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7260 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7261 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7262 attempt is made to record a symbol in a discarded section, and
7263 return `2' in that case.
7264
7265 2002-07-24 Nick Clifton <nickc@redhat.com>
7266
7267 * po/sv.po: Updated Swedish translation.
7268 * po/es.po: Updated Spanish translation.
7269
7270 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7271
7272 * po/SRC-POTFILES.in: Regenerate.
7273
7274 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7275 immediately. Remove code handling relocatable linking.
7276 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7277 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7278 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7279 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7280 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7281 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7282 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7283 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7284 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7285 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7286 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7287 * elf32-avr.c (elf_backend_rela_normal): Define.
7288 * elf32-cris.c: Likewise.
7289 * elf32-fr30.c: Likewise.
7290 * elf32-frv.c: Likewise.
7291 * elf32-h8300.c: Likewise.
7292 * elf32-hppa.c: Likewise.
7293 * elf32-ip2k.c: Likewise.
7294 * elf32-sparc.c: Likewise.
7295 * elf32-v850.c: Likewise.
7296 * elf32-vax.c: Likewise.
7297 * elf64-hppa.c: Likewise.
7298 * elf64-sparc.c: Likewise.
7299 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7300 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7301 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7302 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7303 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7304 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7305 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7306 * elf-m10200.c (USE_RELA): Don't define.
7307 * elf-m10300.c: Likewise.
7308 * elfarm-oabi.c: Likewise.
7309 * elf32-i370.c: Likewise.
7310 * elf32-ip2k.c: Likewise.
7311 * elf32-m68k.c: Likewise.
7312 * elf32-mcore.c: Likewise.
7313 * elf32-ppc.c: Likewise.
7314 * elf32-s390.c: Likewise.
7315 * elf32-vax.c: Likewise.
7316 * elf64-ppc.c: Likewise.
7317 * elf64-s390.c: Likewise.
7318 * elf64-x86-64.c: Likewise.
7319 * elfxx-ia64.c: Likewise.
7320 * elf32-avr.c (USE_REL): Don't undef.
7321 * elf32-ip2k.c: Likewise.
7322
7323 2002-07-23 Nick Clifton <nickc@redhat.com>
7324
7325 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7326 'want_p_paddr_set_to_zero'.
7327 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7328 to false;
7329 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7330 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7331
7332 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7333
7334 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7335 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7336 show the Copyright string.
7337 Minor formatting tidy ups.
7338
7339 2002-07-23 Nick Clifton <nickc@redhat.com>
7340
7341 * po/fr.po: Updated French translation.
7342 * po/sv.po: Updated Swedish translation.
7343
7344 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7345
7346 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7347 when outputting relocs.
7348
7349 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7350
7351 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7352 DT_PLTGOT into the dynamic section if there is a PLT.
7353
7354 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7355
7356 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7357 elf32-mips.c.
7358 (_bfd_mips_elf_write_section): Likewise.
7359 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7360 (_bfd_mips_elf_write_section): Likewise.
7361 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7362 (elf32_mips_write_section): Likewise.
7363 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7364 (_bfd_mips_elf_write_section): Likewise.
7365
7366 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7367
7368 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7369 PT_IA_64_UNWIND segments for a given section.
7370
7371 2002-07-17 H.J. Lu <hjl@gnu.org>
7372
7373 * Makefile.am: Fix a typo.
7374 * Makefile.in: Regenerate.
7375
7376 2002-07-15 Denis Chertykov <denisc@overta.ru>
7377 Frank Ch. Eigler <fche@redhat.com>
7378 Ben Elliston <bje@redhat.com>
7379 Alan Lehotsky <alehotsky@cygnus.com>
7380 John Healy <jhealy@redhat.com>
7381 Graham Stott <grahams@redhat.com>
7382 Jeff Johnston <jjohnstn@redhat.com>
7383
7384 * Makefile.am: Add support for ip2k.
7385 * Makefile.in: Regenerate.
7386 * doc/Makefile.in: Regenerate.
7387 * archures.c: Add support for ip2k.
7388 * config.bfd: Add support for ip2k.
7389 * configure.in: Add support for ip2k.
7390 * configure: Regenerate.
7391 * reloc.c: Add support for ip2k.
7392 * targets.c: Add support for ip2k.
7393 * bfd-in2.h: Regenerate.
7394 * libbfd.h: Regenerate.
7395 * cpu-ip2k.c: New file.
7396 * elf32-ip2k.c: New file.
7397
7398 2002-07-17 Ian Rickards <irickard@arm.com>
7399
7400 * dwarf2.c (concat_filename): If we can't establish the directory
7401 just return the filename.
7402
7403 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7404
7405 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7406
7407 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7408
7409 * elflink.h: Formatting fixes, tidy prototypes.
7410 (elf_link_assign_sym_version): Move common code out of loop.
7411
7412 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7413
7414 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7415 reloc section size is zero. Correct reloc output location.
7416
7417 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7418
7419 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7420 the final type for the e_fsel selector when generating PA2.0W code.
7421 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7422 relocations.
7423
7424 2002-07-14 H.J. Lu <hjl@gnu.org>
7425
7426 * elflink.h (elf_link_assign_sym_version): Hide the default
7427 definition if there is a hidden versioned definition.
7428
7429 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7430
7431 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7432 dynamic reference test in assertion when initializing GOT with
7433 static contents. Just assert that there are either no dynamic
7434 sections, the symbol is defined in the regular objects or that the
7435 symbol is undef weak. Tweak comment.
7436 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7437 only if the symbol isn't defined in the program and isn't undef
7438 weak.
7439 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7440 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7441 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7442 (elf_cris_discard_excess_program_dynamics): Don't consider
7443 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7444
7445 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7446
7447 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7448 unresolved debugging relocs in dynamic applications.
7449 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7450 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7451 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7452 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7453 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7454 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7455
7456 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7457
7458 * elf64-ppc.c (ONES): Define.
7459 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7460 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7461 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7462
7463 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7464 (ppc64_elf_set_private_flags): Delete.
7465 (ppc64_elf_section_from_shdr): Delete.
7466 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7467 (ppc64_elf_fake_sections): Delete.
7468 (bfd_elf64_bfd_set_private_flags): Don't define.
7469 (bfd_elf64_get_symbol_info): Likewise.
7470 (elf_backend_section_from_shdr): Likewise.
7471 (elf_backend_fake_sections): Likewise.
7472
7473 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7474
7475 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7476 when not already set.
7477 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7478 (elf_backend_fake_sections): Define.
7479
7480 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7481
7482 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7483 Formatting.
7484 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7485
7486 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7487
7488 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7489 NULL sym_hashes to just before use.
7490 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7491 symbol with non-default visibility.
7492 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7493 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7494 Ditto.
7495 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7496 symbol with non-default visibility.
7497 (cris_elf_check_relocs): At tests for local symbol before
7498 increasing h->plt.refcount, also check for non-default
7499 visibility. Ditto when checking for local symbol to eliminate
7500 pc-relative runtime relocs.
7501
7502 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7503
7504 * elf.c: Formatting.
7505 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7506 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7507 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7508 segments.
7509
7510 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7511 Alan Modra <amodra@bigpond.net.au>
7512
7513 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7514 account the impact of relocation count overflow when computing
7515 section offsets.
7516 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7517 or not to apply the PE COFF reloc overflow handling. Fix a
7518 fencepost error in deciding whether or not to use that technique.
7519
7520 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7521
7522 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7523 change type of locsyms.
7524 (bfd_elf_get_elf_syms): Declare.
7525 * elf.c (bfd_elf_get_elf_syms): New function.
7526 (group_signature): Use bfd_elf_get_elf_syms.
7527 (bfd_section_from_r_symndx): Likewise.
7528 * elfcode.h (elf_slurp_symbol_table): Likewise.
7529 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7530 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7531 locality of various data structures. Properly free internal relocs.
7532 (elf_bfd_final_link): Properly free internal relocs.
7533 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7534 (elf_link_input_bfd): Likewise.
7535 (elf_gc_mark): Likewise. Properly free internal relocs.
7536 (elf_gc_sweep): Properly free internal relocs.
7537 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7538 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7539 internal relocs.
7540 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7541 Properly free possibly cached info.
7542 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7543 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7544 symbol swapping code.
7545 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7546 Properly free possibly cached info.
7547 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7548 (mn10300_elf_relax_delete_bytes): Likewise.
7549 (mn10300_elf_symbol_address_p): Likewise.
7550 (mn10300_elf_get_relocated_section_contents): Likewise.
7551 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7552 (elf32_h8_relax_delete_bytes): Likewise.
7553 (elf32_h8_symbol_address_p): Likewise.
7554 (elf32_h8_get_relocated_section_contents): Likewise.
7555 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7556 (m32r_elf_relax_delete_bytes): Likewise.
7557 (m32r_elf_get_relocated_section_contents): Likewise.
7558 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7559 elf_section_data to determine whether cached.
7560 (sh_elf_relax_section): As above for elf-m10200.c.
7561 (sh_elf_relax_delete_bytes): Likewise.
7562 (sh_elf_get_relocated_section_contents): Likewise.
7563 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7564 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7565 reading of local syms.
7566 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7567 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7568 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7569 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7570 relocs.
7571 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7572 free internal relocs and section contents. Don't read symbols.
7573 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7574 (elf32_hppa_size_stubs): Don't free local syms.
7575 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7576 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7577 possibly cached info.
7578 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7579 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7580 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7581 all_local_syms.
7582 (get_local_syms): Delete function.
7583 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7584 on exit.
7585 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7586
7587 2002-07-05 Jim Wilson <wilson@redhat.com>
7588
7589 * syms.c (decode_section_type): New.
7590 (bfd_decode_symclass): Call decode_section_type.
7591
7592 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7593
7594 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7595 section content start.
7596 Reported by Michael Schumacher <mike@hightec-rt.com>.
7597
7598 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7599
7600 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7601 link order code. Don't actually remove the output section here;
7602 Just set a flag for the linker to do so.
7603 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7604 sections when setting up output section dynsyms.
7605
7606 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7607
7608 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7609 fudge.
7610 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7611 libs here instead.
7612
7613 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7614
7615 * elf64-s390.c (create_got_section): Set .got section alignment to
7616 8 bytes.
7617 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7618
7619 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7620
7621 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7622
7623 2002-07-01 Matt Thomas <matt@3am-software.com>
7624
7625 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7626 to EF_VAX_*.
7627
7628 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7629
7630 * elfxx-mips.c (ABI_64_P): Fix comment.
7631 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7632 new section names for N64 ABI.
7633 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7634 (mips_elf_calculate_relocation): Code formatting.
7635 (mips_elf_create_dynamic_relocation): Likewise.
7636 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7637 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7638 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7639 in any NewABI.
7640 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7641 for NewABI.
7642 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7643 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7644 here, too.
7645
7646 2002-07-01 Andreas Schwab <schwab@suse.de>
7647
7648 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7649 R_X86_64_64 to R_X86_64_RELATIVE.
7650
7651 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7652
7653 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7654 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7655 Run "make dep-am".
7656 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7657 host_aout_vec.
7658 * configure.in (vaxbsd_vec): Add.
7659 * targets.c (vaxbsd_vec): Add.
7660 * Makefile.in: Rebuild.
7661 * configure: Rebuild.
7662 * po/SRC-POTFILES.in: Rebuild.
7663
7664 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7665
7666 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7667 examining to gc_mark_hook, rather than the bfd.
7668 (elf_gc_sections): Adjust.
7669 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7670 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7671 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7672 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7673 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7674 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7675 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7676 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7677 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7678 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7679 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7680 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7681 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7682 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7683 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7684 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7685 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7686 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7687 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7688 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7689 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7690 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7691 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7692 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7693 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7694 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7695 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7696 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7697 redundant local sym tests.
7698 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7699 (link_hash_newfunc): Init is_entry.
7700 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7701 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7702 (create_linkage_sections): Use bfd_make_section_anyway rather than
7703 bfd_make_section.
7704 (ppc64_elf_mark_entry_syms): New function.
7705 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7706 up opd entry to function section map.
7707 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7708 relocs that reference the opd section.
7709 (edit_opd): New function.
7710 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7711 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7712 (get_local_syms): Do so here. Exit if we already have local syms.
7713 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7714 read local syms on non-ELF input.
7715 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7716 than duplicating it's function here. Adjust free of internal
7717 relocs to suit.
7718 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7719 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7720 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7721 _bfd_elf32_link_read_relocs rather than duplicating it's function
7722 here. Adjust free of internal relocs to suit.
7723
7724 2002-07-01 Andreas Jaeger <aj@suse.de>
7725
7726 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7727 are not allowed in shared libs code, enforce -fPIC.
7728
7729 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7730
7731 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7732 trailing zero-sequences when there's previous left-over data.
7733
7734 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7735
7736 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7737 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7738 and opd_rel_sec in order for starting rela section. Check _raw_size.
7739 (elf_backend_reloc_type_class): Define.
7740
7741 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7742
7743 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7744 DWARF2 formats.
7745
7746 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7747
7748 * cpu-powerpc.c: Comment on ordering of arch_info.
7749 * elf32-ppc.c (ppc_elf_object_p): New function.
7750 (elf_backend_object_p): Define.
7751 * elf64-ppc.c (ppc64_elf_object_p): New function.
7752 (elf_backend_object_p): Define.
7753
7754 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7755
7756 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7757 * configure: Regenerate.
7758
7759 2002-06-25 Jason Eckhardt <jle@rice.edu>
7760
7761 * dwarf2.c (decode_line_info): Check unit->addr_size
7762 to read in the proper number of prologue bytes.
7763
7764 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7765
7766 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7767 aix5coff64_vec if 64-bit bfd support has been enabled.
7768 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7769 been enabled.
7770
7771 * targets.c (_bfd_target_vector[]): Only include
7772 aix5coff64_vec if 64-bit bfd support has been enabled.
7773
7774 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7775
7776 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7777 * elf32-hppa.c (hppa_add_stub): Likewise.
7778 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7779 * elflink.h (elf_add_default_symbol): Fix comment typo.
7780 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7781 (elf_link_add_object_symbols): Likewise.
7782 (elf_link_assign_sym_version): Likewise.
7783 * hash.c (bfd_hash_lookup): Likewise.
7784 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7785 * section.c (bfd_get_unique_section_name): Likewise.
7786 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7787 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7788 (assign_section_numbers): Likewise.
7789 (_bfd_elfcore_make_pseudosection): Likewise.
7790 (elfcore_grok_lwpstatus): Likewise.
7791 (elfcore_grok_win32pstatus): Likewise.
7792 (elfcore_write_note): Constify input params. Use PTR instead of
7793 void *. Include terminating NUL in namesz. Correct padding.
7794 Support NULL "name" param. Use memcpy instead of strcpy.
7795 (elfcore_write_prpsinfo): Constify input params.
7796 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7797 (elfcore_write_lwpstatus): Likewise.
7798 (elfcore_write_pstatus): Likewise.
7799 (elfcore_write_prfpreg): Likewise.
7800 (elfcore_write_prxfpreg): Likewise.
7801 * elf-bfd.h (elfcore_write_note): Update declaration.
7802 (elfcore_write_prpsinfo): Likewise.
7803 (elfcore_write_prstatus): Likewise.
7804 (elfcore_write_pstatus): Likewise.
7805 (elfcore_write_prfpreg): Likewise.
7806 (elfcore_write_prxfpreg): Likewise.
7807 (elfcore_write_lwpstatus): Likewise.
7808
7809 2002-06-25 Jason Eckhardt <jle@rice.edu>
7810
7811 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7812 symbols of type stProc and stStaticProc.
7813
7814 2002-06-25 Nick Clifton <nickc@redhat.com>
7815
7816 * ecoff.c: VArious formatting fixes.
7817
7818 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7819
7820 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7821
7822 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7823
7824 * aout-adobe.c: Don't compare against "true" or "false.
7825 * aout-target.h: Likewise.
7826 * aoutx.h: Likewise.
7827 * archive.c: Likewise.
7828 * bout.c: Likewise.
7829 * cache.c: Likewise.
7830 * coff-a29k.c: Likewise.
7831 * coff-alpha.c: Likewise.
7832 * coff-i386.c: Likewise.
7833 * coff-mips.c: Likewise.
7834 * coff-or32.c: Likewise.
7835 * coff64-rs6000.c: Likewise.
7836 * coffcode.h: Likewise.
7837 * coffgen.c: Likewise.
7838 * cpu-ns32k.c: Likewise.
7839 * ecoff.c: Likewise.
7840 * ecofflink.c: Likewise.
7841 * elf.c: Likewise.
7842 * elf32-arm.h: Likewise.
7843 * elf32-cris.c: Likewise.
7844 * elf32-d30v.c: Likewise.
7845 * elf32-i386.c: Likewise.
7846 * elf32-mcore.c: Likewise.
7847 * elf32-ppc.c: Likewise.
7848 * elf32-sh.c: Likewise.
7849 * elf32-sh64.c: Likewise.
7850 * elf32-v850.c: Likewise.
7851 * elf64-alpha.c: Likewise.
7852 * elf64-sh64.c: Likewise.
7853 * elfcode.h: Likewise.
7854 * elfcore.h: Likewise.
7855 * elflink.h: Likewise.
7856 * elfxx-mips.c: Likewise.
7857 * i386os9k.c: Likewise.
7858 * ieee.c: Likewise.
7859 * libbfd.c: Likewise.
7860 * linker.c: Likewise.
7861 * mmo.c: Likewise.
7862 * nlm32-alpha.c: Likewise.
7863 * nlm32-i386.c: Likewise.
7864 * nlm32-ppc.c: Likewise.
7865 * nlm32-sparc.c: Likewise.
7866 * nlmcode.h: Likewise.
7867 * oasys.c: Likewise.
7868 * pdp11.c: Likewise.
7869 * peicode.h: Likewise.
7870 * reloc.c: Likewise.
7871 * som.c: Likewise.
7872 * srec.c: Likewise.
7873 * tekhex.c: Likewise.
7874 * vms.c: Likewise.
7875 * xcofflink.c: Likewise.
7876 * elf64-sparc.c: Edit comment to not use "== false".
7877
7878 * aoutf1.h: Don't use "? true : false".
7879 * ecoff.c: Likewise.
7880 * format.c: Likewise.
7881 * ieee.c: Likewise.
7882 * linker.c: Likewise.
7883 * mmo.c: Likewise.
7884 * oasys.c: Likewise.
7885
7886 2002-06-23 H.J. Lu <hjl@gnu.org>
7887
7888 * elflink.h (elf_link_add_archive_symbols): For the default
7889 version, check references with only one `@' first.
7890
7891 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7892
7893 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7894 function.
7895 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7896 symbol table.
7897 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7898 (elf64_hppa_size_dynamic_sections): Revise to use
7899 elf64_hppa_mark_milli_and_exported_functions.
7900 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7901 symbols out of dynamic symbol table.
7902
7903 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7904
7905 * Makefile.in: Regenerate.
7906 * libbfd.h: Regenerate.
7907 * bfd-in2.h: Regenerate.
7908 * configure: Regenerate.
7909 * po/SRC-POTFILES.in: Regenerate.
7910
7911 * elflink.h: Comment typo fixes.
7912
7913 2002-06-23 H.J. Lu <hjl@gnu.org>
7914
7915 * elf-bfd.h (elf_link_loaded_list): New structure.
7916 (elf_link_hash_table): Add "loaded".
7917 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7918 * elflink.h (elf_link_check_versioned_symbol): New function.
7919 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7920
7921 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7922
7923 * elflink.h (size_dynamic_sections): If the target does not
7924 support an ELF style hash table, return true, indicating that
7925 nothing needed to be done, rather than false, indicating that the
7926 section's size could not be computed.
7927
7928 2002-06-18 Dave Brolley <brolley@redhat.com>
7929
7930 From Catherine Moore, Michael Meissner, Dave Brolley:
7931 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7932 * targets.c: Support bfd_elf32_frv_vec.
7933 * reloc.c: Add FRV relocs.
7934 * configure.in: Add support for bfd-elf32-frv-vec.
7935 * config.bfd (targ_cpu): Add support for frv-*-elf.
7936 * archures.c: Add frv arch and machines.
7937 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7938 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7939 (BFD32_BACKENDS): Add elf32-frv.lo.
7940 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7941 (cpu-frv.lo): New target.
7942 (elf32-frv.lo): New target.
7943 * cpu-frv.c: New file.
7944 * elf32-frv.c: New file.
7945
7946 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7947
7948 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7949 e_shnum == 0.
7950 Only read the first section header if e_shoff is non-zero.
7951 Don't consider e_shstrndx if there are no sections.
7952
7953 2002-06-17 Tom Rix <trix@redhat.com>
7954
7955 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7956 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7957 complain_overflow_bitfield.
7958
7959 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7960
7961 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7962 (bfd_fdopenr): Likewise.
7963 (bfd_openstreamr): Likewise.
7964 (bfd_openw): Likewise.
7965
7966 * targets.c: Sort target vecs.
7967 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7968 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7969 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7970 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7971 * configure.in: Sort target vecs. Add m88kmach3_vec.
7972 * configure: Regenerate.
7973
7974 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7975
7976 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7977 bpo_reloc_no to break sort order ties, not address of items.
7978
7979 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7980
7981 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7982 Skip excluded sections in determing __gp value.
7983 (elf_hppa_final_link_relocate): Use the symbol's address in
7984 R_PARISC_FPTR64 relocations that don't need an opd entry.
7985 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7986 (elf64_hppa_finalize_dynreloc): Likewise.
7987 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7988 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7989
7990 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7991
7992 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7993 alignment for .bss, .data and .text sections so that sse and sse2
7994 code will work.
7995 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7996
7997 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7998
7999 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
8000 sh[1234]*-elf*.
8001
8002 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8003
8004 * elflink.h (elf_bfd_final_link): Improve error handling for missing
8005 dynamic sections.
8006
8007 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
8008 for a symbol that has no output section.
8009 (allocate_dynrel_entries): Correct comment.
8010 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
8011 unless we want one.
8012 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
8013 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
8014 with no section. Remove unnecessary parentheses.
8015
8016 2002-06-11 Tom Rix <trix@redhat.com>
8017
8018 * coffcode.h (coff_compute_section_file_positions): Add data
8019 section to AIX loader alignment check.
8020
8021 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
8022 alignment to 4 bytes.
8023 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
8024 power accessor macro.
8025 (do_shared_object_padding): Remove invalid assertion.
8026
8027 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
8028
8029 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
8030 for removed output sections.
8031
8032 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
8033
8034 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
8035 htab_alloc.
8036 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
8037
8038 2002-06-08 H.J. Lu <hjl@gnu.org>
8039
8040 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8041 work around a long long bug in gcc 2.96 on mips.
8042
8043 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8044
8045 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8046 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8047 Regenerate dependency lists.
8048 * Makefile.in: Regenerate.
8049 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8050 vax1knetbsd_vec to targ_selvecs.
8051 * configure.in: Add vax1knetbsd_vec.
8052 * configure: Regenerate.
8053 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8054 * vax1knetbsd.c: New file.
8055 * vaxnetbsd.c: Update copyright years.
8056 (TARGET_PAGE_SIZE): Set to 0x1000.
8057 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8058
8059 2002-06-08 Matt Thomas <matt@3am-software.com>
8060
8061 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8062
8063 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8064
8065 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8066
8067 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8068
8069 * Makefile.am: Run "make dep-am".
8070 * Makefile.in: Regenerate.
8071
8072 * armnetbsd.c: Replace CONST with const.
8073 * corefile.c: Likewise.
8074 * elf32-dlx.c: Likewise.
8075 * elf64-mips.c: Likewise.
8076 * mmo.c: Likewise.
8077 * ns32knetbsd.c: Likewise.
8078
8079 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8080 table is elf64-sparc.
8081
8082 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8083
8084 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8085 Fix RELA addends to get not shifted in the result. Don't do special
8086 handling of R_MIPS_64 for NewABI.
8087
8088 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8089
8090 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8091 (NAME(aout,slurp_reloc_table)): Likewise.
8092 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8093 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8094 (xcoff_write_archive_contents_big): Likewise.
8095 (xcoff_generate_rtinit): Likewise.
8096 (xcoff_generate_rtinit): Likewise, and check error return.
8097 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8098 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8099 (coff_get_normalized_symtab): Likewise.
8100 (coff_make_empty_symbol): Likewise.
8101 (bfd_coff_set_symbol_class): Likewise.
8102 * cofflink.c (coff_link_add_symbols): Likewise.
8103 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8104 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8105 (bfd_ecoff_write_accumulated_debug): Likewise.
8106 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8107 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8108 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8109 * ieee.c (do_with_relocs): Use bfd_zalloc.
8110 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8111 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8112 (NAME(aout,slurp_reloc_table)): Likewise.
8113 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8114 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8115 * som.c (som_build_and_write_symbol_table): Likewise.
8116 (som_slurp_string_table): Likewise.
8117 (som_slurp_symbol_table): Likewise.
8118 (som_bfd_ar_write_symbol_stuff): Likewise.
8119 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8120 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8121 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8122 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8123 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8124
8125 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8126
8127 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8128 "group" union.
8129 (elf_group_name): Update.
8130 (elf_group_id): Define.
8131 (bfd_elf_set_group_contents): Declare.
8132 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8133 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8134 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8135 that sym for the signature.
8136 (_bfd_elf_compute_section_file_positions): Don't call
8137 set_group_contents for "ld -r" case.
8138 (swap_out_syms): Use bfd_zalloc.
8139 * elflink.h (elf_link_add_archive_symbols): Likewise.
8140 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8141 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8142
8143 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8144
8145 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8146 relocs in opd for non-shared too.
8147
8148 2002-06-06 Jeffrey Law <law@redhat.com>
8149
8150 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8151 relocations.
8152
8153 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8154
8155 * merge.c: Include libiberty.h.
8156 * elf-strtab.c: Include libiberty.h.
8157
8158 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8159
8160 * peXXigen.c (pe_print_idata): Remove unused variable.
8161
8162 2002-06-06 David Heine <dlheine@tensilica.com>
8163
8164 * elf.c (assign_file_positions_for_segments): Remove unallocated
8165 sections from the section to segment mapping for PT_LOAD segments.
8166 Update comment about empty loadable segments.
8167
8168 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8169
8170 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8171 is within the .stabstr section.
8172
8173 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8174
8175 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8176 are "const PTR", not "const PTR *".
8177 (bfd_elf32_swap_symbol_in): Likewise.
8178 (bfd_elf64_swap_symbol_in): Likewise.
8179 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8180 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8181 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8182 (elf_link_add_object_symbols): Likewise.
8183 (elf_link_record_local_dynamic_symbol): Likewise.
8184 (elf_link_input_bfd): Likewise.
8185 (elf_gc_mark): Likewise.
8186 (elf_reloc_symbol_deleted_p): Likewise.
8187 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8188 (mn10200_elf_relax_delete_bytes): Likewise.
8189 (mn10200_elf_symbol_address_p): Likewise.
8190 (mn10200_elf_get_relocated_section_contents): Likewise.
8191 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8192 (mn10300_elf_relax_section): Likewise.
8193 (mn10300_elf_relax_delete_bytes): Likewise.
8194 (mn10300_elf_symbol_address_p): Likewise.
8195 (mn10300_elf_get_relocated_section_contents): Likewise.
8196 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8197 (elf32_h8_relax_delete_bytes): Likewise.
8198 (elf32_h8_symbol_address_p): Likewise.
8199 (elf32_h8_get_relocated_section_contents): Likewise.
8200 * elf32-hppa.c (get_local_syms): Likewise.
8201 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8202 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8203 * elf32-sh.c (sh_elf_relax_section): Likewise.
8204 (sh_elf_relax_delete_bytes): Likewise.
8205 (sh_elf_get_relocated_section_contents): Likewise.
8206 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8207 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8208 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8209 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8210 * elf64-ppc.c (get_local_syms): Likewise.
8211 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8212 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8213
8214 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8215
8216 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8217
8218 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8219
8220 * elf.c (group_signature): Swap in the whole symbol, and handle
8221 extracting section symbol names.
8222 (setup_group): Add comment.
8223 (set_group_contents): When called from objcopy or ld, arrange for
8224 section contents to be written. Write group member output section
8225 indices to allow objcopy to reorganize sections.
8226 (_bfd_elf_copy_private_section_data): Copy group info.
8227
8228 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8229 (bfd_elf32_swap_symbol_in): Update prototype.
8230 (bfd_elf64_swap_symbol_in): Likewise.
8231 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8232 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8233 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8234 (elf_link_add_object_symbols): Likewise.
8235 (elf_link_record_local_dynamic_symbol): Likewise.
8236 (elf_link_input_bfd): Likewise.
8237 (elf_gc_mark): Likewise.
8238 (elf_reloc_symbol_deleted_p): Likewise.
8239 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8240 (mn10200_elf_relax_delete_bytes): Likewise.
8241 (mn10200_elf_symbol_address_p): Likewise.
8242 (mn10200_elf_get_relocated_section_contents): Likewise.
8243 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8244 (mn10300_elf_relax_section): Likewise.
8245 (mn10300_elf_relax_delete_bytes): Likewise.
8246 (mn10300_elf_symbol_address_p): Likewise.
8247 (mn10300_elf_get_relocated_section_contents): Likewise.
8248 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8249 (elf32_h8_relax_delete_bytes): Likewise.
8250 (elf32_h8_symbol_address_p): Likewise.
8251 (elf32_h8_get_relocated_section_contents): Likewise.
8252 * elf32-hppa.c (get_local_syms): Likewise.
8253 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8254 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8255 * elf32-sh.c (sh_elf_relax_section): Likewise.
8256 (sh_elf_relax_delete_bytes): Likewise.
8257 (sh_elf_get_relocated_section_contents): Likewise.
8258 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8259 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8260 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8261 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8262 * elf64-ppc.c (get_local_syms): Likewise.
8263 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8264 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8265 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8266 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8267 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8268 * elf64-mips.c (mips_elf64_size_info): Likewise.
8269 * elf64-s390.c (s390_elf64_size_info): Likewise.
8270 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8271
8272 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8273
8274 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8275 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8276 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8277 _bfd_mips_elf_ignore_discarded_relocs.
8278 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8279
8280 2002-06-05 H.J. Lu <hjl@gnu.org>
8281
8282 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8283 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8284 the SEC_MERGE section.
8285
8286 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8287
8288 * coff-alpha.c: Update copyright date.
8289 * coff-mips.c: Likewise.
8290 * xcoff-target.h: Likewise.
8291
8292 * bfd-in.h: Remove "taken from the source" comment.
8293 * libbfd-in.h: Likewise.
8294 * libcoff-in.h: Likewise.
8295 * bfd-in2.h: Regenerate.
8296 * libbfd.h: Regenerate.
8297 * libcoff.h: Regenerate.
8298
8299 * elf.c (bfd_elf_discard_group): Return true.
8300 * elf-bfd.h (bfd_elf_discard_group): Declare.
8301 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8302 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8303 * bfd.c (bfd_discard_group): Define.
8304 * targets.c (struct bfd_target): Add _bfd_discard_group.
8305 (BFD_JUMP_TABLE_LINK): Here too.
8306 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8307 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8308 * aout-target.h (MY_bfd_discard_group): Define.
8309 * aout-tic30.c (MY_bfd_discard_group): Define.
8310 * binary.c (binary_bfd_discard_group): Define.
8311 * bout.c (b_out_bfd_discard_group): Define.
8312 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8313 * coffcode.h (coff_bfd_discard_group): Define.
8314 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8315 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8316 * i386msdos.c (msdos_bfd_discard_group): Define.
8317 * i386os9k.c (os9k_bfd_discard_group): Define.
8318 * ieee.c (ieee_bfd_discard_group): Define.
8319 * ihex.c (ihex_bfd_discard_group): Define.
8320 * mmo.c (mmo_bfd_discard_group): Define.
8321 * nlm-target.h (nlm_bfd_discard_group): Define.
8322 * oasys.c (oasys_bfd_discard_group): Define.
8323 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8324 * som.c (som_bfd_discard_group): Define.
8325 * srec.c (srec_bfd_discard_group): Define.
8326 * tekhex.c (tekhex_bfd_discard_group): Define.
8327 * versados.c (versados_bfd_discard_group): Define.
8328 * vms.c (vms_bfd_discard_group): Define.
8329 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8330 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8331 (aix5coff64_vec): Likewise.
8332 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8333
8334 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8335
8336 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8337 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8338 (elf32-sh64-com.lo): New dependency list.
8339 * Makefile.in: Regenerate.
8340 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8341 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8342 elf32-sh64-com.lo.
8343 * configure: Regenerate.
8344 * elf32-sh64.c (sh64_address_in_cranges)
8345 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8346 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8347 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8348 * elf32-sh64-com.c: ...here. New file.
8349
8350 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8351
8352 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8353 ATTRIBUTE_UNUSED on used params.
8354 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8355 before calling bfd_section_from_elf_index on local syms.
8356 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8357
8358 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8359
8360 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8361 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8362 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8363 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8364 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8365 * Makefile.in: Regenerate.
8366 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8367 (sh64-*-netbsd*): New targets.
8368 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8369 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8370 * configure: Regenerate.
8371 * elf32-sh64-nbsd.c: New file.
8372 * elf64-sh64-nbsd.c: New file.
8373 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8374 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8375 bfd_elf64_sh64lnbsd_vec.
8376
8377 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8378
8379 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8380 (bfd_section_from_shdr): Likewise. Set section name of group
8381 sections from signature.
8382 (group_signature): Split out from setup_group. Ensure symbol table
8383 is available.
8384 (bfd_elf_discard_group): New function.
8385 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8386 .gnu.linkonce* sections if they are members of a group.
8387 (set_group_contents): Set GRP_COMDAT flag.
8388 * section.c (bfd_discard_group): New function.
8389 * bfd-in.h (bfd_elf_discard_group): Declare.
8390 * bfd-in2.h: Regenerate.
8391 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8392 (elf_linkonce_p): Define.
8393
8394 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8395
8396 * elf.c (bfd_section_from_shdr): Make "name" const.
8397 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8398 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8399 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8400 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8401 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8402 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8403 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8404 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8405 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8406 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8407 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8408
8409 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8410
8411 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8412 ABI.
8413
8414 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8415
8416 * elf32-arc.c: Fix formatting.
8417 * elf32-arm.h: Likewise.
8418 * elf32-cris.c: Likewise.
8419 * elf32-dlx.c: Likewise.
8420 * elf32-hppa.c: Likewise.
8421 * elf32-i386.c: Likewise.
8422 * elf32-i386qnx.c: Likewise.
8423 * elf32-or32.c: Likewise.
8424 * elf32-s390.c: Likewise.
8425 * elf32-sh64.c: Likewise.
8426 * elf32-vax.c: Likewise.
8427 * elf32-xstormy16.c: Likewise.
8428 * elf64-alpha.c: Likewise.
8429 * elf64-mmix.c: Likewise.
8430 * elf64-ppc.c: Likewise.
8431 * elf64-s390.c: Likewise.
8432 * elf64-sh64.c: Likewise.
8433 * elf64-x86-64.c: Likewise.
8434
8435 2002-06-02 Richard Henderson <rth@redhat.com>
8436
8437 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8438 null when there are no got entries for a symbol.
8439 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8440 uninitialized variable warning.
8441
8442 2002-06-01 Richard Henderson <rth@redhat.com>
8443
8444 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8445 undefined symbols here.
8446 (elf64_alpha_relax_section): Do it here. Also test for not
8447 defined in the current module.
8448 (elf64_alpha_relocate_section_r): Split out of ...
8449 (elf64_alpha_relocate_section): ... here. Don't dereference
8450 NULL when looking up local got entries.
8451
8452 2002-06-01 Richard Henderson <rth@redhat.com>
8453
8454 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8455 symbols from JSR relaxation.
8456 (elf64_alpha_size_plt_section_1): New.
8457 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8458 (elf64_alpha_size_rela_got_1): ... here.
8459 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8460 (elf64_alpha_size_rela_got_section): ... here.
8461 (elf64_alpha_size_plt_section): New.
8462 (elf64_alpha_relax_section): Call them.
8463 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8464 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8465
8466 2002-06-01 Richard Henderson <rth@redhat.com>
8467
8468 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8469 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8470 in shared libraries. Fix DTPRELHI and TPRELHI value.
8471 (INSN_ADDQ, INSN_RDUNIQ): New.
8472 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8473 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8474 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8475 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8476 Handle GOTDTPREL and GOTTPREL relocations.
8477 (elf64_alpha_relax_gprelhilo): New.
8478 (elf64_alpha_relax_tls_get_addr): New.
8479 (elf64_alpha_relax_find_tls_segment): New.
8480 (elf64_alpha_relax_section): Handle TLS relocations.
8481 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8482 (elf64_alpha_check_relocs): Set it.
8483
8484 2002-06-01 Richard Henderson <rth@redhat.com>
8485
8486 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8487
8488 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8489 check; don't suppress dynamic relocs for non-allocated sections.
8490
8491 * elf64-alpha.c: Remove dead code.
8492
8493 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8494
8495 * bfd-in2.h: Regenerate.
8496 * libbfd.h: Regenerate.
8497 * po/SRC-POTFILES.in: Regenerate.
8498
8499 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8500 space for bss .plt.
8501
8502 2002-05-31 Graeme Peterson <gp@qnx.com>
8503
8504 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8505 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8506 Run "make dep-am".
8507 * Makefile.in: Regenerate.
8508 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8509 * configure.in: Add bfd_elf32_i386qnx_vec support.
8510 * configure: Regenerate.
8511 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8512 is_contained_by_filepos, and copy_private_bfd_data_p.
8513 * elf.c (assign_file_positions_for_segments): Call backend
8514 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8515 (IS_CONTAINED_BY_FILEPOS): Define.
8516 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8517 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8518 Fix non-K&R call to _bfd_error_handler.
8519 (_bfd_elf_copy_private_section_data): Use backend
8520 copy_private_bfd_data_p.
8521 * elf32-i386.c: Don't include elfxx-target.h when
8522 ELF32_I386_C_INCLUDED is defined.
8523 * elf32-i386qnx.c: New QNX elf backend file.
8524 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8525 elf_backend_is_contained_by_filepos, and
8526 elf_backend_do_copy_private_bfd_data.
8527 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8528
8529 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8530
8531 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8532 Move other similar defines to start of file.
8533
8534 2002-05-30 Tom Rix <trix@redhat.com>
8535
8536 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8537 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8538
8539 2002-05-30 Richard Henderson <rth@redhat.com>
8540
8541 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8542 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8543 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8544 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8545 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8546 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8547 n_local_got_entries to total_got_size and local_got_size.
8548 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8549 (alpha_got_entry_size): New.
8550 (elf64_alpha_relax_with_lituse): Use it.
8551 (elf64_alpha_relax_without_lituse): Likewise.
8552 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8553 (get_got_entry): New.
8554 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8555 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8556 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8557 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8558 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8559 (elf64_alpha_calc_got_offsets): Likewise.
8560 (alpha_dynamic_entries_for_reloc): New.
8561 (elf64_alpha_calc_dynrel_sizes): Use it.
8562 (elf64_alpha_size_dynamic_sections): Likewise.
8563 (elf64_alpha_relocate_section): Handle TLS relocations.
8564 * reloc.c: Add Alpha TLS relocations.
8565 * bfd-in2.h, libbfd.h: Rebuild.
8566
8567 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8568
8569 * peXXigen.c (pe_print_idata): Remove double printed
8570 import table lines; add Bound-To comment.
8571
8572 2002-05-29 Matt Thomas <matt@3am-software.com>
8573
8574 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8575 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8576 (elf32-vax.lo): New rule.
8577 * Makefile.in: Regenerate.
8578 * configure.in (bfd_elf32_vax_vec)
8579 (vaxnetbsd_vec): New vectors.
8580 * configure: Regenerate.
8581 * config.bfd (vax-*-netbsdelf*)
8582 (vax-*-netbsdaout*)
8583 (vax-*-netbsd*): New targets.
8584 * elf32-vax.c: New file.
8585 * reloc.c: Add VAX relocations.
8586 * bfd-in2.h: Regenerate.
8587 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8588
8589 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8590
8591 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8592 and bfd_elf32_bigarm_vec to targ_selvecs.
8593
8594 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8595
8596 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8597 with auto-imported symbols.
8598
8599 2002-05-29 Adam Nemet <anemet@lnxw.com>
8600
8601 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8602 sections only record bfd.
8603 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8604 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8605 * bfd-in2.h: Regenerate.
8606
8607 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8608
8609 * syms.c (_bfd_stab_section_find_nearest_line): Move
8610 declaration and initialisation of saw_line and saw_func out of
8611 for loop.
8612
8613 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8614
8615 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8616 (bfd_elf64_get_symbol_info): Define.
8617 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8618
8619 2002-05-29 Andrey Volkov <avolkov@transas.com>
8620
8621 * cpu-h8300.c: Make default h8300 machine first in machine list.
8622
8623 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8624
8625 * config.bfd: Added DLX configuraton.
8626 * Makefile.am: Added DLX configuraton.
8627 * configure.in: Added DLX configuraton.
8628 * archures.c: Add DLX architecture.
8629 * reloc.c: Add DLX relocs.
8630 * targets.c: Added DLX target vector.
8631 * configure: Regenerate.
8632 * Makefile.in: Regenreate.
8633 * bfd-in2.h: Regenreate.
8634 * elf32-dlx.c: New file: Support DLX target.
8635 * cpu-dlx.c: New file: Support DLX target.
8636
8637 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8638
8639 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8640
8641 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8642 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8643 strings to point inside function code sym string.
8644 (func_desc_adjust): Likewise.
8645 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8646
8647 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8648
8649 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8650 (elf64_x86_64_grok_psinfo): Added.
8651
8652 2002-05-24 TAMURA Kent <kent@netbsd.org>
8653
8654 * config.bfd: Add a target for i386-netbsdpe.
8655
8656 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8657
8658 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8659 and is_func_descriptor.
8660 (func_desc_adjust): Hide function code sym in shared libs unless
8661 there is a matching exported function descriptor sym.
8662
8663 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8664
8665 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8666 for symbols from SHF_TLS section.
8667 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8668 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8669 (map_sections_to_segments): Build PT_TLS segment if necessary.
8670 (assign_file_positions_for_segments): Likewise.
8671 (get_program_header_size): Account for PT_TLS segment.
8672 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8673 SEC_THREAD_LOCAL sections to STT_TLS.
8674 * reloc.c: Add 386 and IA-64 TLS relocs.
8675 * section.c (SEC_THREAD_LOCAL): Define.
8676 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8677 Remove.
8678 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8679 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8680 unconditionally.
8681 (struct elf_final_link_info): Add first_tls_sec.
8682 (elf_bfd_final_link): Set first_tls_sec.
8683 Compute elf_hash_table (info)->tls_segment.
8684 (elf_link_output_extsym): Handle STT_TLS symbols.
8685 (elf_link_input_bfd): Likewise.
8686 * syms.c (BSF_THREAD_LOCAL): Define.
8687 * bfd-in2.h: Rebuilt.
8688 * libbfd.h: Rebuilt.
8689 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8690 elf_i386_mkobject, elf_i386_object_p): New functions.
8691 (elf_howto_table): Add TLS relocs.
8692 (elf_i386_reloc_type_lookup): Support TLS relocs.
8693 (elf_i386_info_to_howto_rel): Likewise.
8694 (struct elf_i386_link_hash_entry): Add tls_type.
8695 (struct elf_i386_obj_tdata): New.
8696 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8697 New macros.
8698 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8699 (link_hash_newfunc): Clear tls_type.
8700 (elf_i386_check_relocs): Support TLS relocs.
8701 (elf_i386_gc_sweep_hook): Likewise.
8702 (allocate_dynrelocs): Likewise.
8703 (elf_i386_size_dynamic_sections): Likewise.
8704 (elf_i386_relocate_section): Likewise.
8705 (elf_i386_finish_dynamic_symbol): Likewise.
8706 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8707 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8708 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8709 want_tprel, want_dtpmod, want_dtprel.
8710 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8711 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8712 R_IA64_LTOFF_TPREL22.
8713 (elf_code_to_howto_index): Add TLS relocs.
8714 (elfNN_ia64_check_relocs): Support TLS relocs.
8715 (allocate_global_data_got): Account for TLS .got data.
8716 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8717 (elfNN_ia64_install_value): Supprt TLS relocs.
8718 (set_got_entry): Support TLS relocs.
8719 (elfNN_ia64_relocate_section): Likewise.
8720
8721 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8722
8723 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8724 BLX reloc round the relocation up rather than down.
8725 * coff-arm.c (coff_arm_relocate_section): Likewise.
8726
8727 2002-05-21 H.J. Lu (hjl@gnu.org)
8728
8729 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8730 definition.
8731
8732 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8733
8734 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8735 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8736
8737 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8738
8739 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8740 unresolved relocs.
8741 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8742
8743 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8744
8745 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8746 non-ELF targets.
8747
8748 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8749
8750 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8751 an error value.
8752 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8753 return with false on error.
8754 (elf_link_input_bfd): Check reloc_emitter return value.
8755
8756 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8757
8758 * config.bfd (armeb-*-netbsdelf*): New target.
8759
8760 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8761
8762 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8763 at the plt call stub.
8764
8765 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8766
8767 * cpu-mips.c (mips_compatible): Don't try to check machine
8768 compatibility.
8769
8770 2002-05-18 Tom Rix <trix@redhat.com>
8771
8772 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8773
8774 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8775
8776 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8777 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8778 we've already warned about an undefined symbol. Report more
8779 detail on reloc errors.
8780
8781 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8782
8783 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8784 * configure.in: Invoke AM_INSTALL_LIBBFD.
8785 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8786 (install_libbfd): .. New target.
8787 (uninstall_libbfd): Likewise.
8788 (install-bfdlibLTLIBRARIES): Likewise.
8789 (uninstall-bfdlibLTLIBRARIES): Likewise.
8790 (bfdlibdir): New.
8791 (bfdincludedir): New.
8792 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8793 * aclocal.m4: Regenerate.
8794 * configure: Regenerate.
8795 * Makefile.in: Regenerate.
8796
8797 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8798
8799 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8800 hash loop.
8801
8802 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8803
8804 * config.bfd: Add targets for sh64-linux (little endian and
8805 big endian).
8806
8807 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8808
8809 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8810 is located in the same section as the import table. Instead
8811 check, and if necessary load the section containing the thunk.
8812
8813 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8814
8815 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8816 bfd_bread.
8817 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8818 with bfd_bread.
8819
8820 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8821
8822 * aix5ppc-core.c: Warning fixes.
8823 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8824 * aout-target.h (MY_bfd_link_just_syms): Define.
8825 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8826 * bfd.c (bfd_link_just_syms): Define.
8827 * binary.c (binary_bfd_link_just_syms): Define.
8828 * bout.c (b_out_bfd_link_just_syms): Define.
8829 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8830 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8831 * coffcode.h (coff_bfd_link_just_syms): Define.
8832 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8833 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8834 (_bfd_elf_link_just_syms): Declare.
8835 * elf.c (_bfd_elf_link_just_syms): New function.
8836 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8837 sections haven't already been discarded by the linker.
8838 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8839 sections and SEC_MERGE sections.
8840 (elf_bfd_discard_info): Similarly here.
8841 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8842 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8843 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8844 * ieee.c (ieee_bfd_link_just_syms): Define.
8845 * ihex.c (ihex_bfd_link_just_syms): Define.
8846 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8847 (_bfd_generic_link_just_syms): Declare.
8848 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8849 * linker.c (_bfd_generic_link_just_syms): New function.
8850 * mmo.c (mmo_bfd_link_just_syms): Define.
8851 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8852 * oasys.c (oasys_bfd_link_just_syms): Define.
8853 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8854 * som.c (som_bfd_link_just_syms): Define.
8855 * srec.c (srec_bfd_link_just_syms): Define.
8856 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8857 (BFD_JUMP_TABLE_LINK): And here.
8858 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8859 * versados.c (versados_bfd_link_just_syms): Define.
8860 * vms.c (vms_bfd_link_just_syms): Define.
8861 * libbfd.h: Regenerate.
8862 * bfd-in2.h: Regenerate.
8863
8864 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8865
8866 * elf32-mips.c: Remove superfluous definitions copied from
8867 elfxx-mips.c.
8868 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8869 SGIish vectors to check the special case.
8870 (mips_elf_hi16_reloc): Fix comment.
8871 (mips_elf_got16_reloc): Likewise.
8872 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8873 (elf_reloc_map): Code cleanup.
8874 (mips_reloc_map): Add comment.
8875 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8876 (mips_elf32_rtype_to_howto): Likewise.
8877 (mips_elf32_discard_info): Likewise.
8878 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8879 lead to IRIX compatibility now.
8880
8881 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8882
8883 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8884
8885 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8886
8887 * config.bfd (shle-*-netbsdelf*): Add target which includes
8888 sh64 support.
8889
8890 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8891
8892 * configure.in: Revert 2002-04-07. Instead, auto-configure
8893 HAVE_ST_C_IMPL.
8894 * configure: Regenerate.
8895 * config.in: Regenerate.
8896 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8897 or AIX_5_CORE.
8898
8899 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8900
8901 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8902 corefiles as well.2
8903 * configure: Regenerate.
8904
8905 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8906
8907 * Makefile.am (install-data-local): Install headers to
8908 $(exec_prefix)/include.
8909 * Makefile.in: Regenerate.
8910
8911 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8912 Daniel Jacobowitz <drow@mvista.com>
8913
8914 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8915 map BFD_RELOC_RVA.
8916
8917 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8918
8919 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8920 hppa*-*-openbsd*): New targets.
8921 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8922 * configure: Regenerate.
8923
8924 2002-05-10 Tom Rix <trix@redhat.com>
8925
8926 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8927 xcoff64_ppc_relocate_section.
8928 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8929 * libxcoff.h: Common xcoff_reloc_type function declaration.
8930
8931 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8932
8933 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8934 added in 2002-05-09 commit.
8935
8936 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8937 don't look for stubs on all undefined syms.
8938
8939 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8940
8941 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8942 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8943 pcrel_offset.
8944
8945 * elf32-i386.c (elf_howto_table): Comments.
8946 (elf_i386_relocate_section): Handle more relocs for relocatable
8947 linking and against SEC_MERGE sections.
8948
8949 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8950
8951 * elf32-ppc.c (ppc_elf_create_got): New function.
8952 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8953 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8954 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8955 _bfd_elf_create_got_section.
8956
8957 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8958
8959 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8960 * elfxx-target.h (elf_backend_rela_normal): Define.
8961 (elfNN_bed): Init rela_normal.
8962 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8963 for section symbols here if rela_normal. Simplify abs section test.
8964 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8965 return immediately. Remove code handling relocatable linking.
8966 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8967 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8968 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8969 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8970 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8971 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8972 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8973 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8974 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8975 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8976 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8977 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8978 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8979 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8980 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8981 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8982 * elf-m10200.c (elf_backend_rela_normal): Define.
8983 * elf-m10300.c (elf_backend_rela_normal): Define.
8984 * elf32-fr30.c (elf_backend_rela_normal): Define.
8985 * elf32-i370.c (elf_backend_rela_normal): Define.
8986 * elf32-i860.c (elf_backend_rela_normal): Define.
8987 * elf32-m68k.c (elf_backend_rela_normal): Define.
8988 * elf32-mcore.c (elf_backend_rela_normal): Define.
8989 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8990 * elf32-ppc.c (elf_backend_rela_normal): Define.
8991 * elf32-s390.c (elf_backend_rela_normal): Define.
8992 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8993 * elf64-ppc.c (elf_backend_rela_normal): Define.
8994 * elf64-s390.c (elf_backend_rela_normal): Define.
8995 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8996 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8997 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8998 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8999
9000 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
9001
9002 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
9003 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
9004
9005 2002-05-06 Alan Modra <amodra@bigpond.net.au>
9006
9007 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
9008 when not relocatable. Fix reloc_emitter call for K&R.
9009
9010 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9011
9012 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
9013 reloading local sym addend mistakenly removed in 2002-05-01 change.
9014
9015 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
9016 (read_abbrevs): Change "offset" param to bfd_vma.
9017 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
9018 Change "abbrev_offset" to bfd_vma.
9019 (read_indirect_string): Use correct conversion chars in error
9020 message format string, cast bfd_vma's to unsigned long.
9021 (read_abbrevs): Likewise.
9022 (read_attribute_value): Likewise.
9023 (decode_line_info): Likewise.
9024 (scan_unit_for_functions): Likewise.
9025 (parse_comp_unit): Likewise.
9026
9027 2002-05-04 Tom Rix <trix@redhat.com>
9028
9029 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
9030 (coff_swap_reloc_out): Same.
9031 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
9032 (xcoff_swap_reloc_out): Same.
9033 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
9034 case some 16 bit relocs. Add reloc value to output.
9035 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
9036 R_RBR. Improve names.
9037 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
9038 (bfd_xcoff_backend_data): Update with new reloc swap names.
9039 (bfd_pmac_xcoff_backend_data) : Same.
9040 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9041 (xcoff64_swap_reloc_out): Same.
9042 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9043 R_POS. Add reloc value to output.
9044 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9045 bit R_RBR. Improve names, masks.
9046 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9047 (bfd_xcoff_backend_data): Update with new reloc swap names.
9048 (bfd_xcoff_aix5_backend_data) : Same.
9049
9050 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9051
9052 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9053 bfd_count top_index, input_list, all_local_syms.
9054 (elf32_hppa_setup_section_lists): New function, split from
9055 elf32_hppa_size_stubs.
9056 (elf32_hppa_next_input_section): Likewise.
9057 (group_sections): Likewise.
9058 (get_local_syms): Likewise.
9059 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9060 stubs on undefined syms too.
9061 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9062 Only access htab elf fields when we have an elf hash table.
9063 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9064 (elf32_hppa_next_input_section): Declare.
9065
9066 2002-05-04 Bob Byrnes <byrnes@curl.com>
9067
9068 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9069 _bfd_new_bfd.
9070
9071 2002-05-03 H.J. Lu (hjl@gnu.org)
9072
9073 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9074 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9075 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9076 to hide a global symbol.
9077 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9078 forced_local to true.
9079
9080 2002-05-02 Richard Henderson <rth@redhat.com>
9081
9082 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9083 vs SHN_UNDEF to zero.
9084
9085 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9086
9087 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9088 16 bit reloc.
9089 <R_PPC64_SECTOFF_DS>: Likewise.
9090 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9091 SECTOFF reloc.
9092 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9093 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9094 SECTOFF reloc.
9095
9096 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9097 (ppc64_elf_ha_reloc): New function.
9098 (ppc64_elf_brtaken_reloc): New function.
9099 (ppc64_elf_sectoff_reloc): New function.
9100 (ppc64_elf_sectoff_ha_reloc): New function.
9101 (ppc64_elf_toc_reloc): New function.
9102 (ppc64_elf_toc_ha_reloc): New function.
9103 (ppc64_elf_toc64_reloc): New function.
9104 (ppc64_elf_unhandled_reloc): New function.
9105 (ppc64_elf_howto_raw): Use the above.
9106 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9107 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9108 <R_PPC64_SECTOFF_DS>: Likewise.
9109 (IS_ABSOLUTE_RELOC): Update.
9110 (struct ppc_link_hash_table): Add have_undefweak.
9111 (ppc64_elf_link_hash_table_create): Init.
9112 (func_desc_adjust): Set have_undefweak.
9113 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9114 add the .sfpr blr when have_undefweak.
9115 (ppc64_elf_setup_section_lists): Check hash table flavour.
9116 (ppc64_elf_next_input_section): Move output_section->owner test to
9117 ppc64elf.em.
9118 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9119 and relocatable test. Return TOCstart and don't set elf_gp.
9120 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9121 offset calculation. Add assert on weak sym branch tweaks.
9122 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9123 (ppc64_elf_toc): Declare.
9124 (ppc64_elf_next_input_section): Update.
9125
9126 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9127
9128 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9129 file_name.
9130
9131 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9132
9133 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9134 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9135 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9136 call branches. Correct undefined weak destination.
9137 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9138 .sfpr, and correct case where either only savef* or restf* is
9139 needed.
9140
9141 Long branch stubs, multiple stub sections.
9142 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9143 (ppc64_elf_next_input_section): Declare.
9144 * elf64-ppc.c: Move linker-only prototypes.
9145 (STUB_SUFFIX): Define.
9146 (enum ppc_stub_type): New.
9147 (struct ppc_stub_hash_entry): New.
9148 (struct ppc_branch_hash_entry): New.
9149 (struct ppc_link_hash_entry): Add stub_cache, oh.
9150 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9151 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9152 Rename plt_overflow to stub_error.
9153 (ppc_stub_hash_lookup): Define.
9154 (ppc_branch_hash_lookup): Define.
9155 (stub_hash_newfunc): New function.
9156 (branch_hash_newfunc): New function.
9157 (link_hash_newfunc): Init new fields.
9158 (ppc64_elf_link_hash_table_create): Likewise.
9159 (ppc64_elf_link_hash_table_free): New function.
9160 (ppc_stub_name): New function.
9161 (ppc_get_stub_entry): New function.
9162 (ppc_add_stub): New function.
9163 (create_linkage_sections): Use bfd_make_section_anyway. Create
9164 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9165 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9166 and set up for plt call stubs. Link func and func desc syms.
9167 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9168 (func_desc_adjust): Avoid hash lookup when func desc sym available
9169 via shortcut, and set links when processing.
9170 (ppc64_elf_hide_symbol): Likewise.
9171 (allocate_dynrelocs): Don't allocate stub section here.
9172 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9173 Remove sstub code.
9174 (ppc_type_of_stub): New function.
9175 (build_one_stub): Delete.
9176 (ppc_build_one_stub): New function.
9177 (ppc_size_one_stub): New function.
9178 (ppc64_elf_setup_section_lists): New function.
9179 (ppc64_elf_next_input_section): New function.
9180 (group_sections): New function.
9181 (get_local_syms): New function.
9182 (ppc64_elf_size_stubs): Rewrite.
9183 (ppc64_elf_build_stubs): Rewrite.
9184 (ppc64_elf_relocate_section): Look up stub entry for REL24
9185 relocs. Don't propagate REL14* to dynamic objects. Look for long
9186 branch stubs if REL14* or REL24 relocs won't reach.
9187 (bfd_elf64_bfd_link_hash_table_free): Define.
9188
9189 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9190
9191 * config.bfd: Add support for powerpc-*-windiss.
9192
9193 2002-04-30 Tom Rix <trix@redhat.com>
9194
9195 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9196 symbol names into the hash table.
9197
9198 2002-04-28 Tom Rix <trix@redhat.com>
9199
9200 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9201 calulating relocations.
9202 (xcoff_complain_overflow) : Function table for relocation errors.
9203 (xcoff_ppc_relocate_section): Use relocation and complain function
9204 tables.
9205 (xcoff_complain_overflow_unsigned_func): New complain function.
9206 (xcoff_complain_overflow_signed_func): Same.
9207 (xcoff_complain_overflow_bitfield_func): Same.
9208 (xcoff_complain_overflow_dont_func): Same.
9209 (xcoff_reloc_type_crel): New recot function.
9210 (xcoff_reloc_type_br): Same.
9211 (xcoff_reloc_type_ba): Same.
9212 (xcoff_reloc_type_toc): Same.
9213 (xcoff_reloc_type_rel): Same.
9214 (xcoff_reloc_type_neg): Same.
9215 (xcoff_reloc_type_pos): Same.
9216 (xcoff_reloc_type_fail): Same.
9217 (xcoff_reloc_type_noop): Same.
9218 * libxcoff.h : Declare common parts for xcoff64.
9219 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9220 and complain function tables.
9221
9222 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9223
9224 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9225 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9226
9227 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9228
9229 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9230 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9231
9232 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9233 same as the output before calling elf_link_input_bfd.
9234
9235 * coffcode.h (coff_compute_section_file_positions): Set
9236 section_tail after shuffling section list.
9237
9238 2002-04-24 Christian Groessler <chris@groessler.org>
9239
9240 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9241 addresses are 23bit with a special layout, not plain 32bit
9242 values. Prevent relocation of immediate values.
9243
9244 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9245
9246 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9247 MIPS-16 ASE flags are set, print something to indicate that.
9248
9249 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9250
9251 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9252 under which a plt call stub is used.
9253 (final_link_relocate): Similarly.
9254 (allocate_plt_static): Clear h-plabel except when plt entry is
9255 exclusively used for a plabel.
9256 (allocate_dynrelocs): Use the above to simplify plt sizing.
9257 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9258 (elf32_hppa_link_hash_table_create): Init.
9259 (BL22_RP): Define.
9260 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9261 (elf32_hppa_check_relocs): Set has_22bit_branch.
9262
9263 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9264 (final_link_relocate): Likewise.
9265
9266 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9267
9268 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9269 search table if some FDE is DW_EH_PE_aligned encoded either.
9270 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9271
9272 2002-04-22 Richard Smith <richard@ex-parrot.com>
9273 Jakub Jelinek <jakub@redhat.com>
9274
9275 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9276 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9277 encoded personality.
9278 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9279 for CIE/FDE removal.
9280
9281 2002-04-20 Tom Rix <trix@redhat.com>
9282
9283 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9284
9285 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9286
9287 * archures.c (bfd_lookup_arch): Move the list order comment..
9288 (struct bfd_arch_info): ..to where it belongs.
9289 * bfd-in2.h: Regenerate.
9290
9291 * archures.c (bfd_lookup_arch): Add comment on list order.
9292 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9293 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9294 is always at head of list.
9295
9296 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9297
9298 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9299 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9300 definition of these functions for ARM_WINCE builds as they are
9301 not used.
9302 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9303 for ARM_WINCE builds.
9304
9305 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9306
9307 * coff-arm.c (bfd_arm_process_before_allocation):
9308
9309 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9310
9311 * cpu-sh.c (scan_mach): Delete.
9312 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9313 (bfd_sh_arch): Likewise.
9314
9315 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9316
9317 * ihex.c (ihex_write_object_contents): Fix check for records
9318 crossing 64K boundaries.
9319
9320 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9321
9322 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9323 type rather than just assuming entries are ELF.
9324 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9325 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9326 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9327 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9328 rather than elf_link_hash_entry.
9329
9330 2002-04-15 Richard Henderson <rth@redhat.com>
9331
9332 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9333 n32 binaries.
9334
9335 2002-04-15 Michael Snyder <msnyder@redhat.com>
9336
9337 * opncls.c (bfd_close): Write contents if writeable.
9338 Minor formatting tidy-ups.
9339
9340 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9341
9342 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9343
9344 2002-04-12 Michael Snyder <msnyder@redhat.com>
9345
9346 * bfd-in.h (bfd_get_section_lma): New access macro.
9347 Minor white-space fix-up.
9348
9349 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9350
9351 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9352 header pad.
9353
9354 2002-04-09 DJ Delorie <dj@redhat.com>
9355
9356 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9357
9358 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9359
9360 * coffcode.h (coff_read_word): New.
9361 (coff_compute_checksum): New.
9362 (coff_apply_checksum): New.
9363 (coff_write_object_contents): Call coff_apply_checksum () to
9364 apply checksum to PE image.
9365
9366 2002-04-08 Randolph Chung <tausq@debian.org>
9367
9368 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9369 (elf32_hppa_final_link): Split out sorting logic to..
9370 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9371 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9372
9373 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9374
9375 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9376 pattern.
9377 * configure: Re-generate.
9378
9379 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9380
9381 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9382 is greater or equal to 4.3.3.
9383 * configure: Regenerate.
9384 Fix PR gdb/344.
9385
9386 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9387
9388 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9389 R_CRIS_32_PCREL>: Fix typo in name.
9390 (cris_elf_check_relocs): Always create .rela.got here when
9391 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9392 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9393 assume it's created.
9394
9395 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9396
9397 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9398 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9399 define.
9400 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9401 * bfd.c (bfd_link_hash_table_free): Define.
9402 * binary.c (binary_bfd_link_hash_table_free): Define.
9403 * bout.c (b_out_bfd_link_hash_table_free): Define.
9404 * coff-rs6000.c (rs6000coff_vec): Include
9405 _bfd_generic_link_hash_table_free.
9406 (pmac_xcoff_vec): Likewise.
9407 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9408 (aix5coff64_vec): Likewise.
9409 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9410 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9411 (bfd_elf32_bfd_link_hash_table_free): Define.
9412 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9413 (bfd_elf32_bfd_link_hash_table_free): Define.
9414 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9415 define.
9416 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9417 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9418 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9419 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9420 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9421 (_bfd_generic_link_hash_table_free): Add prototype.
9422 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9423 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9424 * linker.c (_bfd_generic_link_hash_table_free): New function.
9425 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9426 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9427 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9428 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9429 * som.c (som_bfd_link_hash_table_free): Define.
9430 * srec.c (srec_bfd_link_hash_table_free): Define.
9431 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9432 * versados.c (versados_bfd_link_hash_table_free): Define.
9433 * vms.c (vms_bfd_link_hash_table_free): New function.
9434 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9435
9436 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9437 instead of bfd_alloc.
9438 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9439 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9440 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9441 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9442 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9443 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9444 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9445 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9446 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9447 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9448 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9449 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9450 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9451 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9452 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9453 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9454 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9455 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9456 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9457 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9458 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9459 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9460 * m68klinux.c (linux_link_hash_table_create): Likewise.
9461 * sparclinux.c (linux_link_hash_table_create): Likewise.
9462 * sunos.c (sunos_link_hash_table_create): Likewise.
9463 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9464
9465 * targets.c: Add _bfd_link_hash_table_free to xvec.
9466
9467 * bfd-in2.h: Regenerate.
9468 * libbfd.h: Regenerate.
9469 * libcoff.h: Regenerate.
9470
9471 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9472
9473 * dep-in.sed: Cope with absolute paths.
9474 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9475 Run "make dep-am".
9476 * Makefile.in: Regenerate.
9477 * coff-arm.c: Fix copyright date.
9478 * cpu-h8300.c: Likewise.
9479 * cpu-i370.c: Likewise.
9480 * cpu-s390.c: Likewise.
9481 * cpu-mips.c: Likewise.
9482 * po/SRC-POTFILES.in: Regenerate.
9483
9484 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9485
9486 * Makefile.am: Add elfxx-mips.c to the known backends.
9487 (elf32-mips.lo): remove dependency to coff/external.h.
9488 * Makefile.in: Regenerate.
9489 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9490 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9491 accordingly.
9492 * configure: Regenerate.
9493 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9494 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9495 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9496 MIPS specific backend functions.
9497 * elf32-mips.c: Moved most code to elfxx-mips.c.
9498 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9499 static.
9500 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9501 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9502 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9503 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9504 interface to allow selection of the right REL or RELA howto table.
9505 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9506 static. Let it refuse n32 objects.
9507 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9508 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9509 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9510 (elf32_mips_ignore_discarded_relocs): Rename from
9511 _bfd_elf32_mips_ignore_discarded_relocs.
9512 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9513 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9514 (elf_mips_howto_table_rela): Remove.
9515 * elf64-mips.c: Moved most code to elfxx-mips.c.
9516 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9517 (mips_elf64_rtype_to_howto): New function.
9518 (mips_elf64_object_p): Likewise.
9519 (elf64_mips_irix_compat): Likewise.
9520 * elfxx-mips.c: New file containing common code merged together from
9521 elf32-mips.c and elf64-mips.c.
9522 * elfxx-mips.h: New file containing MIPS specific prototypes from
9523 elf-bfd.h.
9524 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9525 elf_backend_mips_rtype_to_howto.
9526
9527 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9528
9529 * srec.c (MAXCHUNK, Chunk): Revise comments.
9530 (srec_write_record): Correct buffer size.
9531 (srec_write_header): Do without intermediate buffer.
9532 (srec_write_section): Validate Chunk.
9533 (srec_write_terminator): Pass NULL instead of dummy buffer.
9534 (srec_write_symbols): Pass file and symbol names directly to
9535 bfd_bwrite so sprintf won't overflow buffer.
9536
9537 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9538
9539 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9540 PC relative relocs against hidden symbols.
9541 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9542
9543 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9544
9545 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9546 LMAs, loop over segments until p_vaddr and p_memsz specify an
9547 extent enclosing the section.
9548
9549 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9550
9551 * ihex.c (ihex_write_object_contents): Do not allow records to
9552 cross a 64K boundary - wrap if necessary.
9553
9554 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9555
9556 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9557 which caused the returned LWP ID to always be 0.
9558
9559 2002-04-01 Richard Henderson <rth@redhat.com>
9560
9561 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9562 (elf32_sparc_relocate_section): Use it to figure out when to
9563 initialize .got entries.
9564 * elf64-sparc.c: Similarly.
9565
9566 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9567
9568 * linker.c (link_action): Ignore duplicate warning syms.
9569 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9570 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9571 (elf_adjust_dynamic_symbol): Likewise.
9572 (elf_export_symbol): Likewise.
9573 (elf_link_find_version_dependencies): Likewise.
9574 (elf_link_assign_sym_version): Likewise.
9575 (elf_link_sec_merge_syms): Likewise.
9576 (elf_link_output_extsym): Likewise.
9577 (elf_gc_sweep_symbol): Likewise.
9578 (elf_gc_propagate_vtable_entries_used): Likewise.
9579 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9580 (elf_gc_allocate_got_offsets): Likewise.
9581 (elf_collect_hash_codes): Likewise.
9582 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9583 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9584 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9585 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9586 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9587 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9588 (elf_cris_discard_excess_dso_dynamics): Likewise.
9589 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9590 (mark_PIC_calls): Likewise.
9591 (allocate_plt_static): Likewise.
9592 (allocate_dynrelocs): Likewise.
9593 (readonly_dynrelocs): Likewise.
9594 * elf32-i386.c (allocate_dynrelocs): Likewise.
9595 (readonly_dynrelocs): Likewise.
9596 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9597 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9598 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9599 (mips_elf_sort_hash_table_f): Likewise.
9600 (mips_elf_check_mips16_stubs): Likewise.
9601 * elf32-s390.c (allocate_dynrelocs): Likewise.
9602 (readonly_dynrelocs): Likewise.
9603 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9604 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9605 (xstormy16_relax_plt_realloc): Likewise.
9606 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9607 (elf64_alpha_output_extsym): Likewise.
9608 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9609 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9610 (mips_elf64_check_mips16_stubs): Likewise.
9611 (mips_elf64_output_extsym): Likewise.
9612 * elf64-ppc.c (func_desc_adjust): Likewise.
9613 (allocate_dynrelocs): Likewise.
9614 (readonly_dynrelocs): Likewise.
9615 * elf64-s390.c (allocate_dynrelocs): Likewise.
9616 (readonly_dynrelocs): Likewise.
9617 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9618 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9619 (readonly_dynrelocs): Likewise.
9620 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9621 * aoutx.h (aout_link_write_other_symbol): Likewise.
9622 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9623 (_bfd_coff_write_global_sym): Likewise.
9624 * i386linux.c (linux_tally_symbols): Likewise.
9625 * m68klinux.c (linux_tally_symbols): Likewise.
9626 * sparclinux.c (linux_tally_symbols): Likewise.
9627 * pdp11.c (aout_link_write_other_symbol): Likewise.
9628 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9629 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9630 (xcoff_write_global_symbol): Likewise.
9631
9632 * cofflink.c (_bfd_coff_final_link): Formatting.
9633 * cpu-mips.c (mips_compatible): Make static, prototype.
9634 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9635 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9636 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9637 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9638 (mips_elf64_final_link): Likewise.
9639 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9640 prototype.
9641
9642 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9643
9644 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9645 (SWAP_OUT_RELOC_OFFSET): Define.
9646
9647 2002-03-27 Gregory Steuck <greg@nest.cx>
9648
9649 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9650 terminating NULL if empty symbol table.
9651 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9652
9653 2002-03-26 H.J. Lu (hjl@gnu.org)
9654
9655 * elflink.h (elf_link_input_bfd): Revert the last change since
9656 the gcc exception handling isn't fixed yet.
9657
9658 2002-03-26 H.J. Lu (hjl@gnu.org)
9659
9660 * elflink.h (elf_link_input_bfd): Complain about relocations
9661 against local symbols in discarded sections.
9662
9663 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9664
9665 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9666
9667 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9668
9669 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9670 section file offset for !SEC_LOAD sections.
9671
9672 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9673
9674 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9675 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9676
9677 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9678
9679 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9680 Whitespace changes.
9681 * archive.c: Update copyright date.
9682 * bfd-in2.h: Regenerate.
9683 * libbfd.h: Regenerate.
9684 * Makefile.am: Run "make dep-am"
9685 * Makefile.in: Regenerate.
9686 * po/SRC-POTFILES.in: Regenerate.
9687
9688 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9689
9690 * dwarf2.c (struct funcinfo): Move up.
9691 (lookup_address_in_function_table): New argument function_ptr.
9692 Set it.
9693 (lookup_address_in_line_table): New argument function. If function
9694 is non-NULL, use it to handle ``addr'' before the first line note of
9695 the function.
9696 (comp_unit_find_nearest_line): Update and swap calls to
9697 lookup_address_in_function_table and lookup_address_in_line_table.
9698 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9699 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9700
9701 2002-03-20 Tom Rix <trix@redhat.com>
9702
9703 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9704 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9705 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9706
9707 2002-03-19 Tom Rix <trix@redhat.com>
9708
9709 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9710 dynamic objects in archives.
9711
9712 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9713
9714 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9715 STT_NOTYPE symbols to STT_OBJECT.
9716
9717 2002-03-18 Jan Hubicka <jh@suse.cz>
9718
9719 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9720
9721 2002-03-18 Tom Rix <trix@redhat.com>
9722
9723 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9724 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9725 * coff-rs6000 (do_pad) : New function for archive padding.
9726 (do_copy) : New function for object file copying in archives.
9727 (do_shared_object_padding) : New function for padding shared
9728 objects to their text section alignment in archives.
9729 (bfd_xcoff_ar_achive_set_magic) : Stub.
9730 (xcoff_write_armap_big) : Use do_copy and do_pad.
9731 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9732 do_copy and do_pad.
9733 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9734 bfd_xcoff_magic_number.
9735 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9736 fop.
9737 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9738 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9739 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9740 * rs6000-core.c : Update copyright date.
9741 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9742 csectpp.
9743 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9744 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9745 (coff_set_flags) : Use bfd_xcoff_magic_number.
9746 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9747 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9748 * Makefile.am : Same.
9749 * config.bfd : Same.
9750 * targets.c : Same.
9751 * configure : Regnerate.
9752 * Makefile.in : Same.
9753 * bfd-in2.h : Same.
9754
9755 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9756
9757 * po/fr.po: Updated version.
9758
9759 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9760
9761 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9762 * libbfd.h: Regenerate.
9763 * archive.c (coff_write_armap): Pass on failures from
9764 bfd_write_bigendian_4byte_int.
9765
9766 2002-03-14 H.J. Lu <hjl@gnu.org>
9767
9768 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9769 error to bfd_error_nonrepresentable_section for reinit_array
9770 section in DSO.
9771
9772 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9773
9774 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9775 OR it in rather than replacing previously selected flags.
9776
9777 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9778 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9779
9780 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9781
9782 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9783 (N): Use the above.
9784 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9785 ensure reloc size matches before calling elf_link_input_bfd.
9786 Add an assert to check reloc size when counting output relocs.
9787
9788 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9789
9790 * mmo.c (mmo_get_loc): Return NULL rather than false.
9791
9792 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9793
9794 * po/fr.po: Updated version.
9795
9796 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9797
9798 * archures.c (bfd_default_compatible): Test bits_per_word.
9799 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9800 bfd_default_compatible.
9801 * cpu-i370.c (i370_compatible): Likewise.
9802 * cpu-sparc.c (sparc_compatible): Likewise.
9803 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9804
9805 * elflink.h: Formatting fixes.
9806 (elf_link_output_extsym): Merge undefined and undef weak cases.
9807
9808 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9809 when word size of input matches output word size.
9810
9811 2002-03-12 Andreas Jaeger <aj@suse.de>
9812
9813 * cpu-i386.c (i386_compatible): New. Use it instead of
9814 bfd_default_compatible.
9815
9816 2002-03-07 H.J. Lu (hjl@gnu.org)
9817
9818 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9819 as the type for bfd_reloc_val.
9820
9821 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9822
9823 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9824 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9825 (elf_hppa_final_link_relocate): Correct relocations for indirect
9826 references to local data through the DLT. Fix .opd creation for
9827 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9828 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9829 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9830 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9831 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9832 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9833 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9834
9835 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9836
9837 * merge.c (_bfd_merge_sections): Don't segfault if there
9838 is nothing to merge due to GC.
9839
9840 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9841
9842 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9843 symbols that have been forced local.
9844
9845 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9846 to output forced local syms for non-shared link.
9847 (elf_link_output_extsym): Tweak condition for calling backend
9848 adjust_dynamic_symbol so that previous behaviour is kept.
9849 Whitespace changes throughout file.
9850
9851 2002-03-04 H.J. Lu <hjl@gnu.org>
9852
9853 * elf.c (bfd_section_from_shdr): Handle special sections,
9854 .init_array, .fini_array and .preinit_array.
9855 (elf_fake_sections): Likewise.
9856
9857 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9858 DT entry only if the section is in output for .init_array,
9859 .fini_array and .preinit_array. Complain about .preinit_array
9860 section in DSO.
9861 (elf_bfd_final_link): Warn zero size for .init_array,
9862 .fini_array and .preinit_array sections.
9863
9864 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9865 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9866 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9867 .preinit_array.
9868
9869 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9870
9871 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9872 * configure: Regenerate.
9873
9874 2002-03-02 Tom Rix <trix@redhat.com>
9875
9876 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9877 symbolic equiv.
9878 * coff-rs6000.c (xcoff_howto_table): Same.
9879
9880 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9881
9882 * elflink.h (size_dynamic_sections): If section named
9883 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9884 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9885 ".init_array" and ".fini_array".
9886 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9887 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9888 DT_FINI_ARRAY.
9889
9890 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9891
9892 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9893 dynsyms.
9894
9895 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9896
9897 * elf64-hppa.h: Update copyright date.
9898
9899 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9900 (ppc64_elf_relocate_section): Don't generate power4 style branch
9901 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9902
9903 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9904
9905 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9906 last patch.
9907 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9908
9909 2002-02-21 Andreas Jaeger <aj@suse.de>
9910
9911 * elf64-x86-64.c: Major rework that introduces all recent changes
9912 to the x86-64 backend. Get a closer match to elf32-i386.
9913 (struct elf64_x86_64_dyn_relocs): Rename from
9914 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9915 all users.
9916 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9917 sections.
9918 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9919 remove casts, initialize new hash members.
9920 (create_got_section): New.
9921 (elf64_x86_64_create_dynamic_sections): New.
9922 (elf64_x86_64_copy_indirect_symbol): New.
9923 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9924 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9925 Reference count possible .plt and .got entries. Don't test input
9926 section SEC_READONLY here to try to avoid copy relocs, and keep
9927 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9928 DF_TEXTREL here. Delay setting of variables until needed. Cache
9929 pointer to "sreloc" section in elf_section_data. Tweak condition
9930 under which .got created. Report files with bad relocation
9931 section names.
9932 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9933 Reference count possible .plt entries. Don't deallocate .got and
9934 .relgot space here.
9935 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9936 do copy reloc processing for weakdefs. Remove redundant casts and
9937 aborts. Delay setting of vars until needed. Move creation of
9938 dynamic symbols and allocation of .plt and .rela.plt to
9939 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9940 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9941 (allocate_dynrelocs): New.
9942 (readonly_dynrelocs): New.
9943 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9944 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9945 Zero out the dynamic allocated content space.
9946 (elf64_x86_64_discard_copies): Removed.
9947 (elf64_x86_64_relocate_section): Make use of dynamic section
9948 short-cuts. Localise vars, and delay setting. Better error
9949 reporting, replace BFD_ASSERT with abort. Check
9950 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9951 regular object file and tread the weak definition as the normal
9952 one. Don't discard relocs for undefweak or undefined symbols and
9953 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9954 relocs.
9955 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9956 symbols that have been forced local. Use same test to decide if
9957 we can use a relative reloc for got as relocate_section. Expand
9958 SHN_UNDEF comment. Move expressions out of function calls.
9959 Replace BFD_ASSERT with abort.
9960 (bfd_elf64_bfd_final_link): Removed.
9961 (elf_backend_copy_indirect_symbol): Define.
9962
9963 2002-02-20 Tom Rix <trix@redhat.com>
9964
9965 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9966 (_bfd_xcoff_reloc_type_lookup): Use it.
9967 * coff64-rs6000.c (xcoff64_howto_table): Same.
9968 (xcoff64_reloc_type_lookup): Same.
9969
9970 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9971
9972 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9973 little endian.
9974
9975 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9976
9977 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9978 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9979 * bfd-in2.h: Regenerate.
9980 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9981 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9982 with "s390:64-bit".
9983 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9984 (elf_s390_reloc_type_lookup): Likewise.
9985 (elf_s390_check_relocs): Likewise.
9986 (elf_s390_gc_sweep_hook): Likewise.
9987 (elf_s390_relocate_section): Likewise.
9988 (elf_s390_object_p): Use renamed architecture define.
9989 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9990
9991 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9992
9993 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9994
9995 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9996
9997 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9998 absptr -> pcrel optimization for shared libs.
9999 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
10000 library cannot be converted to pcrel.
10001 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
10002 relative.
10003 * elf32-i386.c (elf_i386_relocate_section): If
10004 _bfd_elf_section_offset returned -2, skip, but make sure the
10005 relocation is installed.
10006 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
10007 * elf32-cris.c (cris_elf_relocate_section): Likewise.
10008 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
10009 * elf32-i370.c (i370_elf_relocate_section): Likewise.
10010 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
10011 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
10012 * elf32-s390.c (elf_s390_relocate_section): Likewise.
10013 * elf32-sh.c (sh_elf_relocate_section): Likewise.
10014 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
10015 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
10016 * elf64-s390.c (elf_s390_relocate_section): Likewise.
10017 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
10018 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
10019 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10020 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
10021 _bfd_elf_section_offset returning -2 the same way as -1.
10022 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
10023 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
10024 and BFD_ASSERT.
10025 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
10026
10027 2002-02-18 Tom Rix <trix@redhat.com>
10028
10029 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
10030 (bfd_xcoff_size_dynamic_sections): Same.
10031 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
10032 (bfd_xcoff_size_dynamic_sections): Same.
10033 * coff-rs6000.c (xcoff_generate_rtinit): Same.
10034 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
10035 * libxcoff.h (struct xcoff_backend_data_rec): Same.
10036 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
10037 * bfd-in2.h: Regenerate.
10038
10039 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10040
10041 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10042 (struct ppc_link_hash_table): Add sfpr.
10043 (ppc64_elf_link_hash_table_create): Init it.
10044 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10045 .glink out to..
10046 (create_linkage_sections): ..here. Make .sfpr too.
10047 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10048 dynobj early.
10049 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10050 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10051 ._restf* functions, and create as needed.
10052 (func_desc_adjust): Only force_local for shared libs.
10053
10054 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10055
10056 * configure.in: Bump version number post 2.12 branching.
10057 * configure: Regenerate.
10058
10059 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10060
10061 * mmo.c: Correct and improve comments.
10062 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10063 zero-pad. Use input to fill up non-empty bfd buffer.
10064 (mmo_flush_chunk): New function.
10065 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10066 changed. Don't emit location specifier if VMA is same as
10067 *LAST_VMAP after omitting leading zero contents. Call
10068 mmo_flush_chunk before emitting location specifier.
10069 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10070 with mmo_write_loc_chunk calls.
10071 (mmo_internal_write_section): Call mmo_flush_chunk after
10072 mmo_write_chunk.
10073 (mmo_write_symbols_and_terminator): Move :Main to first position
10074 in symbol array. Add faked one if it does not exist if there are
10075 other symbols. Don't add it if there are no symbols at all. Move
10076 out test for value of :Main from symbol loop. Rename table
10077 fakemain to maintable and variable mainsym to fakemain.
10078
10079 2002-02-15 Richard Henderson <rth@redhat.com>
10080
10081 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10082 section with no got matches any got. Simplify error generaion.
10083
10084 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10085
10086 Support arbitrary length fill patterns.
10087 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10088 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10089 Call default_data_link_order.
10090 (default_fill_link_order): Delete.
10091 (default_data_link_order): New function.
10092 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10093 of bfd_fill_link_order with bfd_data_link_order.
10094 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10095 * elf64-mips.c (mips_elf64_final_link): Likewise.
10096
10097 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10098 Correct value returned in "end" for "0x<non-hex>".
10099
10100 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10101
10102 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10103 (scan): Test against 'mach' field in info structure.
10104
10105 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10106
10107 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10108
10109 2002-02-14 Matt Fredette <fredette@netbsd.org>
10110
10111 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10112 EF_M68000.
10113
10114 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10115
10116 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10117 non-zero physical addresses when adjusting the LMAs of new
10118 sections.
10119
10120 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10121
10122 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10123 from _bfd_elf_hppa_gen_reloc_type.
10124 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10125 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10126 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10127 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10128
10129 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10130
10131 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10132 loading its contents if there's nothing to do in it.
10133
10134 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10135
10136 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10137 64k boundary.
10138
10139 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10140 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10141 (ppc64_elf_finish_dynamic_sections): Set values for them.
10142
10143 2002-02-11 Michael Snyder <msnyder@redhat.com>
10144
10145 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10146 * elf.c (elfcore_grok_pstatus): Add prototype.
10147 (elfcore_grok_lwpstatus): Add prototype.
10148 (elfcore_write_lwpstatus): New function.
10149 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10150
10151 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10152
10153 * elf32-sh.c: Added missing prototypes.
10154 * elf32-sh64.c: Likewise.
10155 (sh_elf_align_loads): Mark unused args as such.
10156 * elf64-sh64.c: Added missing prototypes.
10157 (struct elf_sh64_link_hash_entry): Fix typo.
10158 (sh_elf64_relocate_section): Fix info argument passed to
10159 _bfd_elf_section_offset.
10160
10161 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10162
10163 * Makefile.am: "make dep-am".
10164 * Makefile.in: Regenerate.
10165 * aclocal.m4: Regenerate.
10166 * config.in: Regenerate.
10167 * configure: Regenerate.
10168
10169 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10170
10171 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10172 variable warnings.
10173 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10174 comparison warning.
10175 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10176 cast warnings for the common case.
10177
10178 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10179
10180 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10181 vectors.
10182 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10183 vectors.
10184
10185 2002-02-09 Richard Henderson <rth@redhat.com>
10186
10187 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10188 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10189 (elf64_alpha_relocate_section): Likewise.
10190 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10191 * bfd-in2.h, libbfd.h: Rebuild.
10192
10193 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10194
10195 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10196 that base-plus-offset reloc accounting is consistent.
10197 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10198 up to date for undefined symbols.
10199
10200 2002-02-08 Eric Christopher <echristo@redhat.com>
10201
10202 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10203
10204 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10205 sections for the O32 ABI.
10206
10207 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10208
10209 * elf32-arm.h: Fix formatting of _("...").
10210 * elf32-d10v.c: Likewise.
10211 * elf32-m68k.c: Likewise.
10212 * elf32-mips.c: Likewise.
10213
10214 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10215
10216 * coff-or32.c: Fix compile time warning messages.
10217
10218 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10219
10220 Contribute sh64-elf.
10221 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10222 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10223 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10224 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10225 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10226 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10227 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10228 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10229 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10230 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10231 New relocs.
10232 * libbfd.h, bfd-in2.h: Rebuilt.
10233 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10234 (sh_reloc_map): Map them.
10235 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10236 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10237 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10238 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10239 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10240 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10241 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10242 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10243 datalabel_got_offset.
10244 (sh_elf_link_hash_newfunc): Initialize it.
10245 (sh_elf_relocate_section): Augment the scope of
10246 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10247 GOT and GOTOFF handling to new SHmedia relocation types. Support
10248 GOT_BIAS.
10249 (sh_elf_check_relocs): Likewise.
10250 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10251 PLT entries using movi_shori_putval. Support GOT_BIAS.
10252 (sh_elf_finish_dynamic_sections): Likewise.
10253 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10254 relocation, it's now done by the caller.
10255 (GOT_BIAS): New.
10256 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10257 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10258 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10259 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10260 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10261 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10262 sh64_elf64_hash_table): New.
10263 (sh_elf64_howto_table): Introduce new relocs.
10264 (sh_elf64_info_to_howto): Accept new PIC relocs.
10265 (sh_elf64_relocate_section): Augment the scope of
10266 seen_stt_datalabel. Support new PIC relocs.
10267 (sh_elf64_check_relocs): Support new PIC relocs.
10268 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10269 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10270 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10271 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10272 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10273 movi_shori_putval, movi_3shori_putval,
10274 sh64_elf64_create_dynamic_sections,
10275 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10276 sh64_elf64_size_dynamic_sections,
10277 sh64_elf64_finish_dynamic_symbol,
10278 sh64_elf64_finish_dynamic_sections): New.
10279 (elf_backend_create_dynamic-sections,
10280 bfd_elf64_bfd_link_hash_table_create,
10281 elf_backend_adjust_dynamic_symbol,
10282 elf_backend_size_dynamic_sections,
10283 elf_backend_finish_dynamic_symbol,
10284 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10285 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10286 elf_backend_got_header_size, elf_backend_plt_header_size):
10287 Define.
10288 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10289 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10290 match official numbers and names; moved unmaching ones to the
10291 range 0xf2-0xff.
10292 * elf32-sh64.c, elf64-sh64.c: Likewise.
10293 2001-03-12 DJ Delorie <dj@redhat.com>
10294 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10295 sections.
10296 2001-03-12 DJ Delorie <dj@redhat.com>
10297 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10298 be aligned.
10299 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10300 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10301 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10302 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10303 .cranges section with SEC_SORT_ENTRIES set.
10304 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10305 incoming sorted .cranges section.
10306 (sh64_bfd_elf_copy_private_section_data): New.
10307 (sh64_elf_final_write_processing): Only sort .cranges and modify
10308 start address if called by linker.
10309 2001-01-08 Ben Elliston <bje@redhat.com>
10310 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10311 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10312 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10313 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10314 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10315 line. Add comments before all entries.
10316 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10317 comment.
10318 (sh_elf64_reloc): Correct head comment.
10319 (sh_elf64_relocate_section): Correct spacing.
10320 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10321 instead call reloc_dangerous callback.
10322 <case R_SH_SHMEDIA_CODE>: New case.
10323 (sh_elf64_gc_mark_hook): Correct spacing.
10324 (sh_elf64_check_relocs): Ditto.
10325 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10326 New case.
10327 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10328 functions.
10329 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10330 clarify describing comment. Add comments before all entries.
10331 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10332 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10333 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10334 Sort .cranges section in final link. Prepare to set bit 0 on
10335 entry address.
10336 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10337 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10338 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10339 .cranges section.
10340 (sh64_backend_section_from_shdr): New, to recognize
10341 SHT_SH5_CR_SORTED on incoming .cranges section.
10342 (elf_backend_section_from_shdr): Define.
10343 (sh64_elf_final_write_processing): Sort outgoing .cranges
10344 section. (New, temporarily disabled:) Set bit 0 on entry address
10345 according to ISA type.
10346 (sh64_find_section_for_address): New.
10347 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10348 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10349 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10350 bfd_malloc, not xmalloc.
10351 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10352 global.
10353 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10354 temporarily disabled) setting bit 0 on entry address.
10355 (elf_backend_final_write_processing): Define.
10356 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10357 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10358 be a proper relocation for PTA and PTB rather than a marker.
10359 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10360 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10361 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10362 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10363 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10364 Zero src_mask.
10365 * elf64-sh64.c: Ditto.
10366 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10367 * elf32-sh64.c: Include opcodes/sh64-opc.h
10368 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10369 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10370 parameters. No unused parameters. Caller changed.
10371 <case R_SH_PT_16>: New case.
10372 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10373 * Makefile.in: Regenerate.
10374 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10375 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10376 all code sections.
10377 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10378 (sh64_elf_merge_private_data): Ditto.
10379 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10380 to access stored section flags.
10381 (sh64_elf_final_write_processing): Return immediately unless
10382 called by linker. Use sh64_elf_section_data (cranges) to get size
10383 of linker-generated cranges entries.
10384 (sh64_elf_copy_private_data): Add missing "return true".
10385 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10386 (sh_elf64_merge_private_data): Ditto.
10387 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10388 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10389 elf64-sh64.c:sh64_elf_fake_sections.
10390 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10391 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10392 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10393 (sh64_elf_final_write_processing): New.
10394 (elf_backend_final_write_processing): Define.
10395 (sh64_elf_fake_sections): Get header flags from tdata field.
10396 (sh64_elf_copy_private_data): Do not call
10397 sh64_elf_copy_private_data_internal, just copy e_flags field.
10398 (sh64_elf_merge_private_data): Do not call
10399 sh64_elf_copy_private_data_internal.
10400 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10401 Remove EF_SH64_ABI64, let ELF size make difference.
10402 Remove SH64-specific BFD section flag.
10403 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10404 containing SHmedia through elf_section_data (asect)->tdata
10405 non-zero, not using a BFD section flag.
10406 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10407 (sh64_elf_merge_private_data): Similar.
10408 (elf_backend_section_flags): Don't define.
10409 (sh64_elf_backend_section_flags): Delete.
10410 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10411 not EF_SH64_ABI64.
10412 (sh_elf64_merge_private_data): Similar.
10413 * section.c (Section flags definitions): Don't define
10414 SEC_SH_ISA_SHMEDIA.
10415 (bfd-in2.h): Regenerate.
10416 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10417 Make DataLabel references work with partial linking.
10418 * elf32-sh64.c: Fix formatting.
10419 (sh64_elf_link_output_symbol_hook): New.
10420 (elf_backend_link_output_symbol_hook): Define to
10421 sh64_elf_link_output_symbol_hook.
10422 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10423 undefined if partial linking. Adjust sanity check.
10424 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10425 (elf_backend_link_output_symbol_hook): Define to
10426 sh64_elf64_link_output_symbol_hook.
10427 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10428 undefined if partial linking. Adjust sanity check.
10429 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10430 Implement semantics for inter-file DataLabel references.
10431 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10432 (sh64_elf64_add_symbol_hook): New.
10433 (sh_elf64_relocate_section): If passing an indirect symbol with
10434 st_type STT_DATALABEL on the way to a symbol with st_other
10435 STO_SH5_ISA32, do not bitor 1 to the relocation.
10436 (elf_backend_add_symbol_hook): Define to
10437 sh64_elf64_add_symbol_hook.
10438 * elf64-sh32.c: Tweak comments.
10439 (DATALABEL_SUFFIX): Define.
10440 (sh64_elf_add_symbol_hook): New.
10441 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10442 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10443 symbol with st_type STT_DATALABEL on the way to a symbol with
10444 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10445 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10446 Pass through STT_DATALABEL.
10447 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10448 (elf_backend_get_symbol_type): Define.
10449 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10450 (elf_backend_get_symbol_type): Define.
10451 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10452 * elf32-sh64.c: Tweak comments.
10453 (sh64_elf_copy_private_data_internal): Add prototype.
10454 (bfd_elf32_bfd_set_private_flags): Define.
10455 (sh64_elf_copy_private_data_internal): Compare machine name, not
10456 textual BFD target name, to check whether to copy section flag
10457 SHF_SH5_ISA32.
10458 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10459 Tweak section-contents-type-mismatch message.
10460 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10461 Validize reloc-types.
10462 * elf64-sh64.c: New file.
10463 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10464 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10465 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10466 Regenerate dependencies.
10467 * Makefile.in: Regenerate.
10468 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10469 bfd_elf64_sh64l_vec.
10470 * configure.in: Handle bfd_elf64_sh64_vec and
10471 bfd_elf64_sh64l_vec.
10472 * configure: Regenerate.
10473 * po/POTFILES.in: Regenerate.
10474 * po/bfd.pot: Regenerate.
10475 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10476 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10477 anything else but EF_SH64 and EF_SH64_ABI64.
10478 (sh64_elf_merge_private_data): Emit error for anything else but
10479 EF_SH64 and EF_SH64_ABI64.
10480 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10481 from targ_selvecs.
10482 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10483 bfd_elf32_sh64l_vec as a temporary measure.
10484 * configure: Regenerate.
10485 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10486 * cpu-sh.c (arch_info_struct): Include sh5 item
10487 unconditionalized.
10488 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10489 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10490 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10491 * elf32-sh64.c: Tweak comments.
10492 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10493 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10494 (sh64_elf_copy_private_data_internal): Wrap long line.
10495 (sh64_elf_merge_private_data): Rewrite to allow objects from
10496 SH64 subsets to be linked together.
10497 (INCLUDE_SHMEDIA): Define.
10498 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10499 Parenthesize plus-expression inside or-expression.
10500 <global symbol>: Ditto.
10501 (sh_elf_set_mach_from_flags): Remove code refusing
10502 deleted EF_SH64_32BIT_ABI flag.
10503 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10504 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10505 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10506 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10507 (sh_elf_relocate_section) <local symbol>: Or 1 in
10508 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10509 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10510 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10511 relocation.
10512 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10513 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10514 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10515 Regenerate dependencies.
10516 * Makefile.in: Regenerate.
10517 * archures.c: Add bfd_mach_sh5.
10518 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10519 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10520 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10521 * configure: Regenerate.
10522 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10523 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10524 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10525 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10526 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10527 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10528 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10529 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10530 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10531 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10532 in item for SH5.
10533 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10534 for SHmedia relocs.
10535 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10536 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10537 shmedia_prepare_reloc, goto final_link_relocate if it returns
10538 non-zero, else fail as before.
10539 (sh_elf_set_mach_from_flags): Provide function only if not defined
10540 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10541 (sh_elf_set_private_flags): Provide function only if not defined
10542 as a macro.
10543 (sh_elf_copy_private_data): Similar.
10544 (sh_elf_merge_private_data): Similar.
10545 * section.c (SEC_SH_ISA_SHMEDIA): New.
10546 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10547 * elf32-sh64.c: New file.
10548 * libbfd.h: Regenerate.
10549 * bfd-in2.h: Regenerate.
10550 * po/POTFILES.in: Regenerate.
10551 * po/bfd.pot: Regenerate.
10552 * bfd-in2.h: Regenerate.
10553 * libbfd.h: Regenerate.
10554
10555 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10556
10557 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10558 been included, not drag it in.
10559 * bfd-in2.h: Regenerate.
10560
10561 2002-02-06 H.J. Lu (hjl@gnu.org)
10562
10563 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10564 the mach and ISA fields if necessary.
10565
10566 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10567
10568 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10569 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10570 be sure exactly which architecture this represents.
10571
10572 2002-02-05 Nick Clifton <nickc@redhat.com>
10573
10574 * po/tr.po: Updated translation.
10575
10576 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10577
10578 From Jimi X <jimix@watson.ibm.com>
10579 * archures (bfd_mach_ppc64): Define.
10580 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10581 (bfd_powerpc_arch): Define.
10582 * bfd-in2.h: Regenerate.
10583 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10584 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10585 (bfd_powerpc_archs): Add default powerpc64 arch.
10586
10587 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10588
10589 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10590 against section syms in readonly sections. Don't do the global
10591 sym check if we find one.
10592 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10593 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10594 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10595 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10596 (elf_s390_grok_prstatus): Add missing prototype.
10597
10598 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10599
10600 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10601 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10602 Call bfd_get_section_by_name only once. Initialize
10603 bpodata->n_bpo_relocs_this_section.
10604 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10605 referring to DSOs.
10606 (bpo_reloc_request_sort_fn): Don't use difference of values as
10607 return-value.
10608
10609 2002-02-02 David O'Brien <obrien@FreeBSD>
10610
10611 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10612 version 4.5 and later the same as 5-CURRENT.
10613 * configure: Re-generate.
10614
10615 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10616
10617 * config.bfd (hppa*-*-netbsd*): New target.
10618
10619 2002-01-31 Philipp Thomas <pthomas@suse.de>
10620
10621 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10622 to front of message. Unify messages with elf32-arm.h. Use
10623 commas where neccessary.
10624 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10625 ERROR in messages. Unify messages with coff-arm.c. Correct
10626 VFP/FPA error message.
10627 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10628 APCS-32 for translation.
10629
10630 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10631
10632 Perform on-demand global register allocation from
10633 R_MMIX_BASE_PLUS_OFFSET relocs.
10634 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10635 bpo_reloc_request, struct bpo_greg_section_info): New.
10636 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10637 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10638 _bfd_mmix_check_all_relocs,
10639 _bfd_mmix_prepare_linker_allocated_gregs,
10640 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10641 (elf_mmix_howto_table): Correct src_mask for most relocs.
10642 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10643 case.
10644 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10645 case. Fix typo in comment. New label do_mmix_reloc.
10646 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10647 store first object file with a base-plus-offset reloc. Call
10648 mmix_elf_check_common_relocs for the part common with mmo.
10649 (mmix_elf_final_link): Write out linker-allocated register
10650 contents section.
10651 (elf_backend_gc_sweep_hook): Define.
10652 (bfd_elf64_bfd_relax_section): Define.
10653
10654 * mmo.c: Don't include <ctype.h>
10655 (mmo_init): Correct init-once logic.
10656
10657 2002-02-01 Tom Rix <trix@redhat.com>
10658
10659 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10660
10661 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10662
10663 * Makefile.am: Run "make dep-am"
10664 * Makefile.in: Regenerate.
10665
10666 2002-01-31 David O'Brien <obrien@FreeBSD>
10667
10668 * configure.in: Recognize the differences in core files from FreeBSD
10669 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10670 5-CURRENT.
10671 * configure: Regenerate.
10672
10673 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10674
10675 * coff-or32.c: New file.
10676 * cpu-or32.c: New file.
10677 * elf32-or32.c: New file.
10678 * archures.c: Add support for or32.
10679 * targets.c: Add support for or32.
10680 * bfd-in2.h: Regenerate.
10681 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10682 coff_write_object_contents): Add support for or32.
10683 * config.bfd: Add target.
10684 * configure.in: Add support for or32.
10685 * configure: Regenerate.
10686 * Makefile.am: Add support for or32.
10687 * Makefile.in: Regenerate.
10688 * po/SRC-POTFILES.in: Add or32 files.
10689 * po/bfd.pot: Regenerate.
10690
10691 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10692 Don Lindsay <lindsayd@cisco.com>
10693
10694 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10695 false' with a return of a bfd_reloc_ error code.
10696
10697 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10698
10699 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10700 unexport unreferenced symbols when --export-dynamic. Call
10701 _bfd_elf_strtab_delref when unexporting.
10702
10703 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10704
10705 * bfd-in.h: Include <stdbool.h> if it is available.
10706 * bfd-in2.h: Regenerated.
10707
10708 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10709
10710 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10711 not go via the plt.
10712
10713 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10714
10715 * archures.c: Tidy up formatting of embedded comments.
10716 * bfd.c: Tidy up formatting of embedded comments.
10717 * bfd-in.h: Fix formatting of comments.
10718 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10719 * section.c: Tidy up formatting of embedded comments.
10720 * syms.c: Tidy up formatting of embedded comments.
10721 * targets.c: Tidy up formatting of embedded comments.
10722
10723 * bfd-in2.h: Regenerate.
10724
10725 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10726
10727 * vms-tir.c (cmd_name): New function.
10728 (tir_cmd_name): New function.
10729 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10730 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10731 Fix formatting.
10732
10733 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10734 translation.
10735 (pe_print_pdata): Rearrange message to aid in translation.
10736
10737 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10738 translation.
10739
10740 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10741
10742 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10743
10744 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10745 message to aid in translation.
10746
10747 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10748 to aid in translation.
10749
10750 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10751
10752 2002-01-30 Philipp Thomas <pthomas@suse.de>
10753
10754 * coff-arm.c, elf32-elf.h: Unify messages.
10755
10756 2002-01-30 Nick Clifton <nickc@redhat.com>
10757
10758 * po/sv.po: Updated translation.
10759
10760 2002-01-30 Philipp Thomas <pthomas@suse.de>
10761
10762 * dwarf2.c (read_abbrev): Use full section name in error message.
10763 (decode_line_info): Likewise.
10764
10765 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10766 message.
10767
10768 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10769
10770 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10771 descriptor symbols for undefined function code syms. Clear
10772 ELF_LINK_NON_ELF so that they can stay weak.
10773
10774 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10775 Mitch Lichtenberg <mpl@broadcom.com>
10776
10777 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10778 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10779 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10780 generation.
10781 * bfd-in2.h: Regenerate.
10782
10783 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10784
10785 * elf32-mips.c: Add additional comments about HI16 relocation
10786 processing.
10787 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10788 pc-relative relocations. (Reverts change made on 2001-10-31.)
10789 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10790 for pc-relative relocations.
10791 (mips_elf_calculate_relocation): Add a comment about a kludge
10792 in the R_MIPS_GNU_REL_HI16 handling.
10793 (_bfd_mips_elf_relocate_section): Implement that kludge;
10794 adjust pc-relative HI16 relocation for difference in HI16 and
10795 LO16 addresses, since it can't easily be done in
10796 mips_elf_calculate_relocation.
10797
10798 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10799
10800 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10801 relocations with PC32 relocations for undefined or weak symbols.
10802 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10803 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10804
10805 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10806
10807 * elfcore.h (elf_core_file_p): Improve comment for last change.
10808
10809 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10810
10811 * configure: Regenerated.
10812
10813 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10814
10815 * elfcore.h (elf_core_file_p): Set the machine architecture
10816 before processing the program headers.
10817
10818 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10819
10820 * configure.in <64-bit configuration>: If using gcc, check and
10821 emit error for egcs-1.1.2.
10822 * configure: Regenerate.
10823
10824 2002-01-26 Egor Duda <deo@logos-m.ru>
10825
10826 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10827 as possible to avoid stack corruption.
10828
10829 2002-01-26 Richard Henderson <rth@redhat.com>
10830
10831 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10832 for non-allocated sections.
10833
10834 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10835
10836 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10837 prstat.pr_reg even if it is a struct.
10838
10839 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10840
10841 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10842
10843 2002-01-25 Philipp Thomas <pthomas@suse.de>
10844
10845 * coffgen.c (coff_print_symbol): Don't mark info message
10846 for translation.
10847
10848 2002-01-25 Nick Clifton <nickc@redhat.com>
10849
10850 * po/fr.po: Updated translation.
10851 * po/es.po: Updated translation.
10852
10853 2002-01-25 Philipp Thomas <pthomas@suse.de>
10854
10855 * coff-alpha.c (alpha_relocate_section): Unify warning message
10856 for GP relative relocations without GP defined.
10857 * coff-mips.c (mips_relocate_section): Likewise.
10858
10859 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10860
10861 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10862 unsigned overflow when new_offset < old_offset.
10863
10864 2002-01-24 Philipp Thomas <pthomas@suse.de>
10865
10866 * bfd.c (_bfd_abort): Fix typo.
10867
10868 2002-01-23 Richard Henderson <rth@redhat.com>
10869
10870 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10871 plt entries for undefweak symbols.
10872
10873 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10874
10875 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10876 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10877 (bfd_elf32_h8300_vec): Ditto.
10878
10879 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10880
10881 * elf64-ppc.c: Remove stale part of ABI comment.
10882 (NO_OPD_RELOCS): Define.
10883 (ppc64_elf_check_relocs): Use it.
10884 (ppc64_elf_relocate_section): Here too.
10885 (build_one_stub): Don't point function syms at the stub. Instead,
10886 hijack plt.offset.
10887 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10888 really go to the stub. Make all dynamic relocs in opd against
10889 locals.
10890 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10891 plt.offset.
10892
10893 2002-01-22 Richard Henderson <rth@redhat.com>
10894
10895 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10896
10897 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10898
10899 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10900 TOC_BASE_OFF adjustment.
10901
10902 * Makefile.am: Run "make dep-am".
10903 * Makefile.in: Regenerate.
10904 * po/SRC-POTFILES.in: Regenerate.
10905
10906 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10907
10908 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10909 host defines.
10910
10911 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10912
10913 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10914 Check for and emit error if sgot is NULL at this point.
10915
10916 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10917
10918 * config.bfd (ia64*-*-netbsd*): New target.
10919
10920 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10921
10922 * som.c (som_write_space_strings): Comment typo fix.
10923
10924 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10925
10926 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10927 is_func_descriptor fields.
10928 (link_hash_newfunc): Init them.
10929 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10930 dot are candidates for plt entries. When processing .opd relocs,
10931 set function descriptor strings to point inside function code
10932 string, and set new ppc_link_hash_entry fields.
10933 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10934 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10935 function descriptors. It's now done in..
10936 (func_desc_adjust): New.
10937 (ppc64_elf_func_desc_adjust): New.
10938 (define elf_backend_always_size_sections): Define.
10939 (ppc64_elf_hide_symbol): New.
10940 (define elf_backend_hide_symbol): Define.
10941 (allocate_dynrelocs): Remove code looking up function descriptors
10942 as that has been done earlier.
10943 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10944 table.
10945 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10946 up function descriptor.
10947 (build_one_stub): Look up the function code sym. Check for
10948 invalid plt offsets.
10949 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10950 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10951
10952 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10953 boolean param.
10954 (_bfd_elf_link_hash_hide_symbol): Likewise.
10955 * elflink.h (elf_link_add_object_symbols): Adjust call to
10956 elf_backend_hide_symbol.
10957 (elf_fix_symbol_flags): Likewise.
10958 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10959 than bfd_alloc.
10960 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10961 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10962 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10963 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10964 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10965 and adjust to suit.
10966 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10967 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10968 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10969
10970 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10971
10972 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10973 dynamic function descriptor symbol, not the associated function
10974 symbol.
10975
10976 2002-01-17 Eric Christopher <echristo@redhat.com>
10977
10978 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10979
10980 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10981
10982 * po/bfd.pot: Regenerate.
10983 * po/fr.po: Regenerate.
10984
10985 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10986
10987 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10988 Remove "Elf_Internal_Shdr *" param.
10989 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10990 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10991 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10992 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10993 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10994 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10995 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10996 function to override special sections. Remove hdr arg from
10997 backend call, and don't loop.
10998
10999 2002-01-16 Eric Christopher <echristo@redhat.com>
11000
11001 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
11002 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
11003 relocations requiring gp0 and gp.
11004
11005 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
11006
11007 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
11008 EF_ARM_VFP_FLOAT.
11009 (elf32_arm_print_private_bfd_data): Likewise.
11010
11011 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
11012
11013 * po/tr.po: Import new version.
11014
11015 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11016
11017 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
11018 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
11019 (ORI_R0_R0_0): Correct.
11020
11021 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11022
11023 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
11024 when plt_not_loaded.
11025 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
11026 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
11027 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
11028 (ppc64_elf_glink_code): Delete.
11029 (PPC64_ELF_GLINK_SIZE): Delete.
11030 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
11031 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
11032 ORI_R0_R0_0): Define.
11033 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
11034 (struct ppc_link_hash_table): Add sstub and plt_overflow.
11035 (ppc64_elf_link_hash_table_create): Init them.
11036 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
11037 Don't copy to shared lib.
11038 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11039 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11040 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11041 room for .stub and .glink code.
11042 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11043 DT_PPC64_GLINK.
11044 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11045 bfd_elf64_bfd_final_link.
11046 (bfd_elf64_bfd_final_link): Don't define.
11047 (ppc64_elf_size_stubs): New.
11048 (build_plt_stub): New.
11049 (build_one_stub): New.
11050 (ppc64_elf_build_stubs): New.
11051 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11052 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11053 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11054 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11055 case output sections not separate. Adjust DT_RELASZ to not
11056 include plt relocs. Set reserved got entry. Set got and plt
11057 entry size.
11058 (elf_backend_got_header_size): Set to 8.
11059 * elf64-ppc.h: New file.
11060
11061 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11062
11063 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11064 sections, use bfd_section_list_remove.
11065 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11066 * elflink.h (elf_link_add_object_symbols): When removing all
11067 sections, use bfd_section_list_clear.
11068
11069 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11070
11071 * po/sv.po: New file: Swedish translation.
11072 * configure.in (ALL_LINGUAS): Add sv.
11073 * configure: Regenerate.
11074
11075 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11076
11077 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11078 * elf.c (merge_sections_remove_hook): New function.
11079 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11080 _bfd_merge_sections.
11081 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11082 * libbfd.h: Rebuilt.
11083 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11084 Call remove_hook if a SEC_EXCLUDE section is encountered.
11085
11086 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11087
11088 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11089 (xstormy16_reloc_map): Initialise new field with correct howto
11090 table.
11091 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11092 howto entry.
11093
11094 2002-01-10 Michael Snyder <msnyder@redhat.com>
11095
11096 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11097 (elfcore_write_pstatus): Use long instead of pid_t;
11098 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11099
11100 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11101
11102 * elf.c: Update copyright years.
11103 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11104 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11105
11106 2002-01-08 Michael Snyder <msnyder@redhat.com>
11107
11108 Add capability to write corefile note sections, for gdb.
11109 * elf.c (elfcore_write_note): New function.
11110 (elfcore_write_prpsinfo): New function.
11111 (elfcore_write_prstatus): New function.
11112 (elfcore_write_pstatus): New function.
11113 (elfcore_write_prfpreg): New function.
11114 (elfcore_write_prxfpreg): New function.
11115 * elf-bfd.h: Add prototypes for above functions.
11116
11117 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11118
11119 * elf.c (elf_fake_sections): Propagate errors from
11120 elf_backend_fake_section.
11121
11122 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11123
11124 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11125 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11126 (elf32-sh-nbsd.lo): New rule.
11127 * Makefile.in: Regenerate.
11128 * config.bfd (sh*le-*-netbsdelf*): New target.
11129 (sh*-*-netbsdelf*): New target.
11130 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11131 (bfd_elf32_shnbsd_vec): New vector.
11132 (bfd_elf32_shlnbsd_vec): New vector.
11133 * configure: Regenerate.
11134 * elf32-sh-nbsd.c: New file.
11135 * targets.c: Update copyright years.
11136 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11137 bfd_elf32_shnbsd_vec.
11138
11139 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11140
11141 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11142
11143 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11144
11145 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11146 of a symbol in a section that will be deleted.
11147
11148 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11149
11150 * po/es.po: New file: Spanish translation.
11151 * configure.in (ALL_LINGUAS): Add es.
11152 * configure: Regenerate.
11153
11154 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11155
11156 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11157 argument so we can handle HP-UX specially.
11158 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11159 (elfNN_hpux_backend_section_from_bfd_section): New for support
11160 of SHN_IA_64_ANSI_COMMON.
11161 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11162 (is_unwind_section_name): Add special HP-UX support.
11163 (elfNN_ia64_section_from_shdr): Add support for more sections.
11164 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11165 add support for more sections.
11166 (elfNN_ia64_additional_program_headers): Modify
11167 is_unwind_section_name call.
11168 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11169 only one unwind section in segment.
11170
11171 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11172
11173 * syms.c (_bfd_generic_make_empty_symbol): New function.
11174 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11175 _bfd_generic_make_empty_symbol.
11176 * libbfd.h: Regenerate.
11177 * bfd-in2.h: Regenerate.
11178 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11179 (hppabsd_core_get_symtab_upper_bound): Don't define.
11180 (hppabsd_core_get_symtab): Likewise.
11181 (hppabsd_core_print_symbol): Likewise.
11182 (hppabsd_core_get_symbol_info): Likewise.
11183 (hppabsd_core_bfd_is_local_label_name): Likewise.
11184 (hppabsd_core_get_lineno): Likewise.
11185 (hppabsd_core_find_nearest_line): Likewise.
11186 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11187 (hppabsd_core_read_minisymbols): Likewise.
11188 (hppabsd_core_minisymbol_to_symbol): Likewise.
11189 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11190 Formatting fixes.
11191 * hpux-core.c: Similarly.
11192 * irix-core.c: Similarly.
11193 * osf-core.c: Similarly.
11194 * sco5-core.c: Similarly.
11195 * binary.c (binary_make_empty_symbol): Remove function, define as
11196 _bfd_generic_make_empty_symbol.
11197 * ihex.c (ihex_make_empty_symbol): Likewise.
11198 * mmo.c (mmo_make_empty_symbol): Likewise.
11199 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11200 * srec.c (srec_make_empty_symbol): Likewise.
11201 * versados.c (versados_make_empty_symbol): Likewise.
11202 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11203 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11204 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11205 rather than _bfd_vms_make_empty_symbol.
11206 * vms-misc.c (new_symbol): Likewise.
11207
11208 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11209
11210 * section.c (bfd_section_init): Remove unnecessary initialisations.
11211 (bfd_section_list_clear): New function.
11212 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11213 (_bfd_strip_section_from_output): Use them.
11214 * coffcode.h (coff_set_alignment_hook): Likewise.
11215 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11216 * elf64-mips.c (mips_elf64_final_link): Likewise.
11217 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11218 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11219 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11220 * bfd-in2.h: Regenerate.
11221
11222 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11223 rather than doing our own section handling. Clean up after errors
11224 with bfd_release and bfd_section_list_clear. Handle unexpected
11225 flags.
11226 * aoutf1.h (sunos4_core_file_p): Likewise.
11227 * aix386-core.c (aix386_core_file_p): Likewise.
11228 * cisco-core.c (cisco_core_file_validate): Likewise.
11229 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11230 * trad-core.c (trad_unix_core_file_p): Likewise.
11231
11232 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11233 with bfd_release and bfd_section_list_clear.
11234 * hpux-core.c (hpux_core_core_file_p): Likewise.
11235 * irix-core.c (irix_core_core_file_p): Likewise.
11236 * lynx-core.c (lynx_core_file_p): Likewise.
11237 * osf-core.c (osf_core_core_file_p): Likewise.
11238 * rs6000-core.c (rs6000coff_core_p): Likewise.
11239 * sco5-core.c (sco5_core_file_p): Likewise.
11240
11241 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11242 sign extension adjustments without conditionals.
11243
11244 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11245
11246 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11247 CIE at .eh_frame start is removed due to no FDEs referencing it.
11248
11249 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11250
11251 * config.bfd (x86_64-*-netbsd*): New target.
11252 * configure.in (x86_64-*-netbsd*): Set COREFILE
11253 to netbsd-core.lo.
11254 * configure: Regenerated.
11255
11256 2002-01-03 Tom Rix <trix@redhat.com>
11257
11258 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11259 for recent bfd_make_section_anyway change.
11260
11261 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11262
11263 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11264 R_ARM_THM_PC11 reloc.
11265
11266 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11267
11268 * configure.in (LINGUAS): Add ja.
11269 * configure: Regenerate.
11270 * po/ja.po: Import from translation project's web site.
11271
11272 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11273
11274 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11275 messages to ease translation into other languages.
11276
11277 For older changes see ChangeLog-0001
11278 \f
11279 Local Variables:
11280 mode: change-log
11281 left-margin: 8
11282 fill-column: 74
11283 version-control: never
11284 End:
This page took 0.270803 seconds and 4 git commands to generate.