daily update
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-12-12 Nick Clifton <nickc@redhat.com>
2
3 * po/ro.po: Updated translation.
4
5 2003-12-12 Alan Modra <amodra@bigpond.net.au>
6
7 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Check for
8 NULL dyn_h.
9
10 2003-12-11 Nick Clifton <nickc@redhat.com>
11
12 * elf.c (INCLUDE_SECTION_IN_SEGMENT): Skip PT_GNU_STACK segments.
13
14 2003-12-08 Richard Sandiford <rsandifo@redhat.com>
15
16 * elfxx-mips.h, elfxx-mips.c, cpu-mips.c: Convert prototypes.
17 Remove casts that were only needed for K&R compatibility.
18
19 2003-12-08 Alan Modra <amodra@bigpond.net.au>
20
21 * elf-bfd.h (struct elf_backend_data): Remove "bfd *" and add
22 "elflink_hash_entry *" param to elf_backend_link_output_symbol_hook.
23 Add "elflink_hash_entry *" param to elf_backend_output_arch_syms.
24 * elflink.h (elf_link_output_sym): Add "elflink_hash_entry *" param,
25 and pass to output_symbol_hook.
26 (elf_bfd_final_link): Adjust elf_link_output_sym calls.
27 (elf_link_output_extsym): Likewise.
28 (elf_link_input_bfd): Likewise.
29 * elf32-sh64.c (sh64_elf_link_output_symbol_hook): Adjust.
30 * elf32-v850.c (v850_elf_link_output_symbol_hook): Likewise.
31 * elf64-mmix.c (mmix_elf_link_output_symbol_hook): Likewise.
32 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Likewise.
33 * elfxx-mips.c (_bfd_mips_elf_link_output_symbol_hook): Likewise.
34 * elfxx-mips.h (_bfd_mips_elf_link_output_symbol_hook): Likewise.
35 * elf64-sparc.c (sparc64_elf_output_arch_syms): Likewise.
36 * elf64-hppa.c (elf64_hppa_link_output_symbol_hook): Likewise.
37 Validate dynh->h against h.
38 * elf64-ppc.c (struct ppc_link_hash_entry): Add adjust_done bitfield.
39 (link_hash_newfunc): Init it.
40 (adjust_opd_syms): New function.
41 (ppc64_elf_edit_opd): Set adjust_done when global .opd sym adjusted.
42 Set opd.adjust for all .opd relocs. Call adjust_opd_syms.
43 (ppc64_elf_tls_optimize): Adjust possible .opd sym values here.
44 (ppc64_elf_relocate_section): Also adjust syms not a multiple of 24.
45 (ppc64_elf_output_symbol_hook): New function.
46 (elf_backend_link_output_symbol_hook): Define.
47
48 2003-12-07 Richard Sandiford <rsandifo@redhat.com>
49
50 * elf32-mips.c, elfn32-mips.c, elf64-mips.c: Convert prototypes.
51 Remove casts that were only needed for K&R compatibility.
52
53 2003-12-05 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
54
55 * coff-arm.c (aoutarm_std_reloc_howto [ARM_WINCE]): Set
56 partial_inplace for these relocs to FALSE for comptability with
57 the MS linker.
58 Remap ARM_26D relocation from 5 to 0. This fixes "bad fixup" error
59 generated by MS linker, and brings the relocation in line the MS
60 PE documentation.
61
62 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
63
64 * elf32-ppc.c (ppc_elf_relax_section): Don't check relax_finalizing.
65
66 2003-12-04 H.J. Lu <hongjiu.lu@intel.com>
67
68 * elfxx-ia64.c (elfNN_ia64_relax_section): Use the
69 need_relax_finalize field in link_info instead of
70 relax_finalizing to check if the relax finalize pass is being
71 done.
72
73 2003-12-04 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
74
75 * coff-arm.c (coff_arm_relocate_section, bfd_arm_process_before_allocation):
76 Change ARM26* to ARM_26* in comments to match definitions.
77 (coff_arm_adjust_symndx): Replace hard-coded constants with
78 appropriate definitions (ARM_26*).
79
80 2003-12-04 Alan Modra <amodra@bigpond.net.au>
81
82 * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
83 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
84 (mn10300_elf_relax_section): Likewise.
85 * nlm32-alpha.c (ONES): Define.
86 (nlm32_alpha_howto_table): Use it to avoid warnings.
87
88 2003-12-04 Alan Modra <amodra@bigpond.net.au>
89
90 * elf32-i386.c (elf_i386_object_p): Delete.
91 (elf_backend_object_p): Don't define.
92 * elf32-s390.c (elf_s390_object_p): No need to alloc tdata here.
93 * elf32-sh.c (sh_elf_object_p): Likewise.
94 * elf32-sparc.c (elf32_sparc_object_p): Likewise.
95 * elf64-alpha.c (elf64_alpha_object_p): Likewise.
96 * elf64-s390.c (elf_s390_object_p): Likewise.
97 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Likewise.
98
99 2003-12-03 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
100
101 * archures.c (bfd_mach_m32r2): Add new machine type.
102 * bfd-in2.h: Regenerate.
103 * cpu-m32r.c : Add new machine type.
104 * elf32-m32r.c (m32r_elf_object_p, m32r_elf_final_write_processing,
105 m32r_elf_merge_private_bfd_data): Add support for new machine
106 type.
107
108 2003-12-03 Dave Airlie <airlied@linux.ie>
109
110 * config.bfd: Add vax-linux-gnu target.
111 * configure.in: Likewise.
112 * configure: Regenerate.
113
114 2003-12-03 Alan Modra <amodra@bigpond.net.au>
115
116 * ecoff.c (ecoff_link_add_archive_symbols): Update for renamed
117 bfd_link_hash_entry field "next" -> "und_next".
118 * linker.c (_bfd_link_hash_newfunc): Likewise.
119 (bfd_link_add_undef): Likewise.
120 (_bfd_generic_link_add_archive_symbols): Likewise.
121 (_bfd_generic_link_add_one_symbol): Likewise.
122 * xcofflink.c (xcoff_link_add_symbols): Likewise.
123
124 2003-12-02 Nick Clifton <nickc@redhat.com>
125
126 * configure.in (ALL_LINGUAS): Add ro.
127 * po/ro.po: New Romanian translation.
128
129 2003-12-02 Alan Modra <amodra@bigpond.net.au>
130
131 * Makefile.am: Run "make dep-am".
132 * Makefile.in: Regenerate.
133
134 2003-12-01 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
135
136 * coffcode.h (coff_compute_section_file_positions): Set page_size
137 to 1 instead of 0 in the case file alignment value is zero.
138
139 2003-12-01 Kazu Hirata <kazu@cs.umass.edu>
140
141 * coff-rs6000.c: Remove ARGSUSED and VARARGS.
142 * coff64-rs6000.c: Likewise.
143 * coffcode.h: Likewise.
144 * elf32-vax.c: Likewise.
145 * hash.c: Likewise.
146 * hppabsd-core.c: Likewise.
147 * hpux-core.c: Likewise.
148 * ihex.c: Likewise.
149 * netbsd-core.c: Likewise.
150 * osf-core.c: Likewise.
151 * pdp11.c: Likewise.
152 * ptrace-core.c: Likewise.
153 * sco5-core.c: Likewise.
154 * section.c: Likewise.
155 * sunos.c: Likewise.
156 * trad-core.c: Likewise.
157
158 2003-12-01 Alan Modra <amodra@bigpond.net.au>
159
160 * elf-bfd.h (is_elf_hash_table): Take hash tab rather than info arg.
161 * elf.c (_bfd_elf_merge_sections): Adjust to suit.
162 (_bfd_elf_link_just_syms): Likewise.
163 (bfd_elf_get_needed_list): Likewise.
164 (bfd_elf_get_runpath_list): Likewise.
165 (_bfd_elf_link_hash_copy_indirect): Remove unneeded parens.
166 * elf32-hppa.c (elf32_hppa_setup_section_lists): Don't check hash tab
167 creator flavour.
168 (elf32_hppa_set_gp): Look up output sections rather than using htab.
169 * elf32-i960.c: Comment fix. Formatting.
170 * elf32-m32r.c (m32r_elf_add_symbol_hook): Use is_elf_hash_table
171 rather than testing creator flavour.
172 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
173 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
174 * elflink.c (_bfd_elf_link_create_dynamic_sections): Adjust for
175 is_elf_hash_table change. Remove redundant test.
176 (bfd_elf_record_link_assignment): Use is_elf_hash_table rather than
177 testing creator flavour.
178 (elf_link_record_local_dynamic_symbol): Adjust for is_elf_hash_table.
179 (_bfd_elf_fix_symbol_flags): Likewise.
180 (_bfd_elf_adjust_dynamic_symbol): Likewise.
181 * elflink.h (elf_link_add_object_symbols): Likewise. Remove redundant
182 checks. Use is_elf_hash_table rather than testing creator flavour.
183 Use hash_table throughout in place of info->hash.
184 (elf_add_dynamic_entry): Adjust for is_elf_hash_table change.
185 (NAME(bfd_elf,size_dynamic_sections)): Likewise. Remove redundant
186 check.
187 (elf_bfd_final_link): Adjust for is_elf_hash_table change.
188 (elf_link_check_versioned_symbol): Use is_elf_hash_table rather than
189 testing creator flavour.
190 (elf_gc_sections): Add is_elf_hash_table check.
191 (elf_gc_common_finalize_got_offsets): Likewise.
192 (elf_bfd_discard_info): Adjust for is_elf_hash_table change. Remove
193 redundant check.
194 * elfxx-ia64.c (elfNN_ia64_relax_section): Use is_elf_hash_table
195 rather than testing creator flavour.
196
197 2003-11-28 Christian Groessler <chris@groessler.org>
198
199 * cpu-z8k.c: Convert to ISO C90.
200 * coff-z8k.c: Likewise.
201
202 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
203
204 * elf-bfd.h (elf_backend_data::elf_backend_modify_segment_map):
205 Add link info argument.
206 * elf32-i370.c (elf_backend_modify_segment_map): Likewise.
207 * elf32-ppc.c (ppc_elf_modify_segment_map): Likewise.
208 * elf32-xtensa.c (elf_xtensa_modify_segment_map): Likewise.
209 * elf64-hppa.c (elf64_hppa_modify_segment_map): Likewise.
210 * elfxx-ia64.c (elfNN_ia64_modify_segment_map): Likewise.
211 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Likewise.
212 * elfxx-mips.h (_bfd_mips_elf_modify_segment_map): Likewise.
213 * elf.c (assign_file_positions_except_relocs,
214 assign_file_positions_for_segments): Likewise. Adjust calls.
215
216 2003-11-27 Mark Kettenis <kettenis@gnu.org>
217
218 * elf.c (elfcore_grok_netbsd_procinfo): Make a pseudosection out
219 of the note.
220
221 2003-11-26 Daniel Jacobowitz <drow@mvista.com>
222 Richard Sandiford <rsandifo@redhat.com>
223
224 * elfxx-mips.c (mips_elf_set_global_got_offset): Don't set no_fn_stub.
225 (mips_elf_set_no_stub): New function.
226 (mips_elf_multi_got): Call it.
227 (_bfd_mips_elf_finish_dynamic_symbol): If a relocation is needed for
228 a secondary GOT entry, create an R_MIPS_32 or R_MIPS_64 relocation and
229 use mips_elf_create_dynamic_relocation to deal with any compatibility
230 issues. Store the adjusted addend in the GOT slot.
231
232 2003-11-25 Mattias EngdegÄrd <mattias@virtutech.se>
233
234 * stabs.c (_bfd_link_section_stabs): Skip N_EXCL stabs when
235 procesing N_BINCL stabs.
236
237 2003-11-25 Alan Modra <amodra@bigpond.net.au>
238
239 * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
240 ppc_stub_plt_call to symbols defined in shared libs.
241
242 2003-11-22 Jakub Jelinek <jakub@redhat.com>
243
244 * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
245 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy it.
246 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
247 (elf_i386_check_relocs): Set it.
248 (elf_i386_finish_dynamic_symbol): If it is not set,
249 clear st_value of SHN_UNDEF symbol.
250
251 2003-11-20 Jim Blandy <jimb@redhat.com>
252
253 * cpu-powerpc.c (powerpc_compatible): Any ISA in the PowerPC
254 family is a superset of <bfd_arch_rs6000,bfd_mach_rs6k>.
255
256 2003-11-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
257
258 * elf32-s390.c (elf_s390_relocate_section): Don't recalculate symbol
259 section for reloc output and subtract the output section's address
260 from the addend when converting a relocation into one against a
261 section symbol.
262 * elf64-s390.c (elf_s390_relocate_section): Likewise.
263
264 2003-11-18 James E Wilson <wilson@specifixinc.com>
265
266 * elfxx-ia64.c (get_fptr): For fptr_rel, use dynobj not abfd.
267 (elfNN_ia64_size_dynamic_sections): When stripping sections, check
268 for ia64_info->rel_fptr_sec.
269
270 2003-11-18 Alan Modra <amodra@bigpond.net.au>
271
272 * elf64-ppc.c (toc_adjusting_stub_needed): Exit early if section
273 size is zero.
274
275 2003-11-17 Daniel Jacobowitz <drow@mvista.com>
276
277 * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
278 ELF_LINK_HASH_NEEDS_PLT. Fix formatting.
279 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
280 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
281 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
282 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
283 * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
284 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
285 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
286 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
287 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
288 * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
289 (elf_backend_copy_indirect_symbol): Don't define.
290
291 2003-11-14 Daniel Jacobowitz <drow@mvista.com>
292
293 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
294 GOT entries.
295
296 2003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
297
298 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
299 to R_390_RELATIVE. Convert the other relocations against local
300 symbols to relocations against the start of the section.
301 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
302 to R_390_RELATIVE. Convert the other relocations against local
303 symbols to relocations against the start of the section.
304
305 2003-11-11 Nick Clifton <nickc@redhat.com>
306
307 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
308 info->executable not info->shared to decide if a .interp section
309 should be present.
310 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
311 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
312 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
313 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
314 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
315 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
316 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
317 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
318 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
319 * elflink.h (size_dynamic_sections): Likewise.
320
321 2003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
322
323 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
324 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
325 found initialise the tls data directory entry.
326
327 2003-11-07 Alan Modra <amodra@bigpond.net.au>
328
329 * elf32-ppc.c (ppc_elf_install_value): Delete.
330 (shared_stub_entry, stub_entry): Make them arrays of ints.
331 Remove initial branch.
332 (ppc_elf_relax_section): Write one branch around all trampolines
333 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
334 branch range check. Only use shared_stub_entry when shared.
335 Test that branches can reach stubs. Write trampolines out at
336 end so that just one realloc is used. Handle little-endian
337 mode. Move relevant code from ppc_elf_install_value to here.
338 (ppc_elf_relocate_section): Move code handling RELAX32 from
339 ppc_elf_install_value to here.
340
341 2003-11-06 Alan Modra <amodra@bigpond.net.au>
342
343 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
344 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
345 cases.
346 (shared_stub_entry): Correct opcode.
347 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
348 (ppc_elf_relocate_section): Handle them.
349
350 2003-11-05 Alan Modra <amodra@bigpond.net.au>
351
352 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
353 updated section in case of merged section.
354 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
355 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
356 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
357 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
358 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
359 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
360 * elf32-cris.c (cris_elf_relocate_section): Likewise.
361 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
362 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
363 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
364 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
365 * elf32-i370.c (i370_elf_relocate_section): Likewise.
366 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
367 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
368 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
369 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
370 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
371 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
372 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
373 * elf32-s390.c (elf_s390_relocate_section): Likewise.
374 * elf32-sh.c (sh_elf_relocate_section): Likewise.
375 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
376 * elf32-v850.c (v850_elf_relocate_section) Likewise.
377 * elf32-vax.c (elf_vax_relocate_section): Likewise.
378 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
379 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
380 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
381 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
382 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
383 * elf64-s390.c (elf_s390_relocate_section): Likewise.
384 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
385 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
386 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
387 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
388
389 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
390 section for reloc output.
391 * elf32-i370.c (i370_elf_relocate_section): Likewise.
392 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
393 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
394 * elf32-vax.c (elf_vax_relocate_section): Likewise.
395 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
396 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
397
398 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
399 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
400 return value.
401 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
402 sec->id.
403
404 2003-11-05 Alan Modra <amodra@bigpond.net.au>
405
406 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
407 (elf32_d10v_relocate_section): Use them to handle -r reloc
408 adjustments, and in place of _bfd_elf_rela_local_sym.
409
410 * cpu-iq2000.c (arch_info_struct): Warning fix.
411
412 2003-11-05 Alan Modra <amodra@bigpond.net.au>
413
414 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
415 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
416 weakdefs.
417 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
418 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
419 NON_GOT_REF.
420 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
421 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
422 non-default visibility.
423 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
424 SYMBOL_CALLS_LOCAL.
425
426 2003-11-04 Alan Modra <amodra@bigpond.net.au>
427
428 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
429 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
430 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
431 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
432 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
433 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
434 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
435
436 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
437 "dereferencing type-punned pointer" warnings.
438
439 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
440 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
441 * bfd-in2.h: Regenerate.
442 * binary.c (binary_set_section_contents): Ditto.
443 * bout.c (b_out_set_section_contents): Ditto.
444 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
445 * coffcode.h (coff_set_section_contents): Ditto.
446 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
447 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
448 * elf.c (_bfd_elf_set_section_contents): Ditto.
449 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
450 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
451 * i386msdos.c (msdos_set_section_contents): Ditto.
452 * ieee.c (ieee_set_section_contents): Ditto.
453 * ihex.c (ihex_set_section_contents): Ditto.
454 * libaout.h (NAME(aout,set_section_contents)): Ditto.
455 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
456 (_bfd_generic_set_section_contents): Ditto.
457 * libbfd.h: Regenerate.
458 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
459 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
460 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
461 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
462 * mmo.c (mmo_set_section_contents): Ditto.
463 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
464 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
465 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
466 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
467 * nlmcode.h (nlm_set_section_contents): Ditto.
468 * oasys.c (oasys_set_section_contents): Ditto.
469 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
470 * ppcboot.c (ppcboot_set_section_contents): Ditto.
471 * srec.c (srec_set_section_contents): Ditto.
472 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
473 * tekhex.c (tekhex_set_section_contents): Ditto.
474 (move_section_contents): Ditto.
475 * versados.c (versados_set_section_contents): Ditto.
476 * vms-misc.c (_bfd_save_vms_section): Ditto.
477 * vms.c (vms_set_section_contents): Ditto.
478 * vms.h (_bfd_save_vms_section): Ditto.
479
480 2003-11-04 Alan Modra <amodra@bigpond.net.au>
481
482 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
483 rather than htab.
484 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
485 relbrlt size.
486 (ppc64_elf_build_stubs): Allocate space for relbrlt.
487
488 2003-11-04 Alan Modra <amodra@bigpond.net.au>
489
490 * bfd-in.h (_bfd_elf_tls_setup): Declare.
491 * bfd-in2.h: Regenerate.
492 * elf-bfd.h (struct elf_link_tls_segment): Delete.
493 (struct elf_link_hash_table): Add tls_sec and tls_size.
494 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
495 * elflink.c (_bfd_elf_tls_setup): New function.
496 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
497 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
498 saving tls segment info, round segment size up.
499 (elf_link_output_extsym): Adjust code using tls segment info.
500 (elf_link_input_bfd): Likewise.
501 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
502 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
503 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
504 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
505 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
506 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
507 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
508 (elfNN_ia64_dtprel_base): Likewise.
509 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
510 (alpha_get_tprel_base): Likewise.
511 (struct alpha_relax_info): Remove tls_segment.
512 (elf64_alpha_relax_got_load): Adjust invocation of
513 alpha_get_dtprel_base and alpha_get_tprel_base.
514 (elf64_alpha_relax_tls_get_addr): Likewise.
515 (elf64_alpha_relax_section): Likewise.
516 (elf64_alpha_relocate_section): Likewise.
517 (elf64_alpha_relax_find_tls_segment): Delete.
518 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
519 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
520 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
521 * elf32-ppc.h (ppc_elf_tls_setup): Update.
522 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
523 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
524 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
525 (ppc64_elf_relocate_section): Likewise.
526 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
527
528 2003-11-03 Daniel Jacobowitz <drow@mvista.com>
529
530 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
531 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
532 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
533 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
534 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
535 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
536 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
537 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
538 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
539 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
540 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
541 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
542 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
543 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
544 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
545 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
546 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
547 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
548 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
549 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
550 * elfxx-target.h (elf_backend_plt_header_size): Don't define
551 or include in target initializer.
552
553 2003-11-03 Andrew Cagney <cagney@redhat.com>
554
555 * section.c (bfd_set_section_contents): Make the "location" buffer
556 constant.
557 * bfd-in2.h: Re-generate.
558
559 2003-10-30 Andrew Cagney <cagney@redhat.com>
560
561 * syms.c: Replace "struct symbol_cache_entry" with "struct
562 bfd_symbol".
563 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
564 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
565 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
566 * bfd-in2.h: Re-generate.
567
568 2003-10-30 Jakub Jelinek <jakub@redhat.com>
569
570 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
571 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
572 fields.
573 (struct elfNN_ia64_local_hash_table): Remove.
574 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
575 to htab_t. Add loc_hash_memory field.
576 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
577 Removed.
578 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
579 functions.
580 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
581 loc_hash_table. Initialize loc_hash_memory.
582 (elfNN_ia64_hash_table_free): New function.
583 (elfNN_ia64_local_hash_lookup): Remove.
584 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
585 callback.
586 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
587 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
588 (bfd_elfNN_bfd_link_hash_table_free): Define.
589
590 2003-10-30 Alan Modra <amodra@bigpond.net.au>
591
592 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
593 symbol string in place.
594
595 2003-10-30 Jim Blandy <jimb@redhat.com>
596
597 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
598 object's mach field: all PowerPC machines are supersets of the
599 original rs6000, but not later rs6000 machines.
600
601 2003-10-30 Alan Modra <amodra@bigpond.net.au>
602
603 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
604 Add "val" and "sval" fields.
605 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
606 (read_attribute_value): Expand and adjust DW_* occurrences.
607 (scan_unit_for_functions, parse_comp_unit): Likewise.
608
609 2003-10-30 Phil Edwards <phil@codesourcery.com>
610
611 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
612 other common ELF triples.
613 (i[3-7]86-*-vxworks): Change to ELF format.
614 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
615 (sh-*-vxworks): New stanza.
616
617 2003-10-30 Lars Knoll <lars@trolltech.com>
618 Michael Matz <matz@suse.de>
619 Jakub Jelinek <jakub@redhat.com>
620 Alan Modra <amodra@bigpond.net.au>
621
622 * merge.c (struct sec_merge_sec_info): Update comment.
623 (struct sec_merge_hash_entry): Remove entsize.
624 (sec_merge_hash_lookup): Only adjust alignment when creating.
625 (sec_merge_emit): Remove register keyword.
626 (cmplengthentry, last4_eq, last_eq): Delete.
627 (strrevcmp, strrevcmp_align, is_suffix): New.
628 (merge_strings): Use them to implement fast suffix merging.
629 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
630 Make "len" signed.
631 (_bfd_elf_strtab_add): Lose on >2G strings.
632 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
633 (cmplengthentry, last4_eq): Delete.
634 (strrevcmp, is_suffix): New.
635 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
636
637 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
638
639 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
640 SEC_ALLOC.
641
642 2003-10-29 Philip Blundell <philb@gnu.org>
643
644 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
645 code sequence.
646 (PLT_HEADER_SIZE): New.
647 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
648 (struct elf32_arm_relocs_copied): ... this. Count both
649 pcrel and non-pcrel relocs. All uses updated.
650 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
651 sections and symbol/section mapping cache.
652 (create_got_section): New.
653 (elf32_arm_create_dynamic_sections): New.
654 (elf_backend_create_dynamic_sections): Use it.
655 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
656 (elf32_arm_check_relocs): Likewise.
657 (elf32_arm_adjust_dynamic_symbol): Likewise.
658 (elf32_arm_copy_indirect_symbol): New.
659 (elf32_arm_link_hash_table_create): Initialise new fields.
660 (elf32_arm_gc_sweep_hook): Implement.
661 (elf32_arm_discard_copies): Delete.
662 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
663 (elf32_arm_finish_dynamic_sections): Likewise.
664 (elf_backend_can_refcount): Define.
665 (elf_backend_copy_indirect_symbol): Likewise.
666 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
667
668 2003-10-29 Alan Modra <amodra@bigpond.net.au>
669
670 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
671 (elf_backend_grok_psinfo): Define.
672 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
673
674 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
675 sections with the same name.
676 (elfcore_grok_lwpstatus): Likewise.
677 (elfcore_grok_win32pstatus): Likewise.
678 (elfcore_grok_note): Likewise.
679 (elfcore_grok_nto_status): Likewise.
680 (elfcore_grok_nto_gregs): Likewise.
681
682 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
683
684 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
685 objects.
686
687 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
688
689 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
690
691 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
692
693 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
694 hash table for real symbols.
695
696 2003-10-23 Michael Snyder <msnyder@redhat.com>
697
698 * section.c (asection): Fix typo in comment.
699
700 2003-10-23 Alan Modra <amodra@bigpond.net.au>
701
702 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
703 reloc symbol index to it. Don't allow gd syms in shared libs
704 to be optimized.
705 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
706 (ppc64_elf_size_stubs): Likewise.
707 (ppc64_elf_relocate_section): Check that tls relocs are only used
708 with tls syms, and similarly for non-tls. Correct symbol used
709 when optimizing toc tls code.
710
711 2003-10-22 Nick Clifton <nickc@redhat.com>
712
713 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
714 processing an executable.
715
716 2003-10-22 Jakub Jelinek <jakub@redhat.com>
717
718 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
719 field changes.
720 (_bfd_elf_link_assign_sym_version): Likewise.
721 * elflink.h (size_dynamic_sections): Likewise.
722
723 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
724 Michael Snyder <msnyder@redhat.com>
725
726 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
727 bfd_mach_sh4a_nofpu): New machine types.
728 * bfd-in2.h: Rebuilt.
729 * cpu-sh.c (compatible): Remove unused function.
730 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
731 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
732 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
733
734 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
735
736 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
737 describing mismatched formats involving the Maverick FP type.
738
739 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
740
741 * binary.c (binary_object_p): Pass machine flag along with
742 architecture.
743
744 2003-10-21 Thorsten Brehm <brehm@gmx.net>
745
746 * archures.c (bfd_default_scan): Add support for mcf528x.
747 * ieee.c (ieee_write_processor): Likewise.
748
749 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
750 Bernardo Innocenti <bernie@develer.com>
751
752 * archures.c: Add MCF528x (MCFv4) support.
753 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
754 * bfd-in2.h: Regenerate.
755
756 2003-10-20 Andrew Cagney <cagney@redhat.com>
757
758 * targets.c: Replace "struct sec" with "struct bfd_section"
759 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
760 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
761 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
762 * aout-tic30.c, aout-target.h:
763 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
764
765 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
766
767 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
768 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
769 (struct _mmix_elf_section_data): New member pjs.
770 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
771 functions.
772 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
773 (mmix_reloc_map): Ditto.
774 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
775 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
776 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
777 unused.
778 (mmix_elf_check_relocs): Move early return to after
779 mmix_elf_check_common_relocs call.
780 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
781 (_bfd_mmix_before_linker_allocation): Rename from
782 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
783 Arrange to set the initial relaxable size of sections.
784 (_bfd_mmix_after_linker_allocation): Rename from
785 _bfd_mmix_finalize_linker_allocated_gregs.
786 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
787 (bfd_elf64_get_section_contents): Define.
788 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
789 * libbfd.h, bfd-in2.h: Regenerate.
790
791 * reloc.c (bfd_generic_relax_section): Default-set
792 section->_cooked_size here.
793 (bfd_generic_get_relocated_section_contents): Don't set it here.
794 Explain why.
795
796 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
797
798 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
799 output section has been discarded.
800
801 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
802
803 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
804 (h8300_reloc16_extra_cases): Likewise.
805 (h8300_bfd_link_add_symbols): Likewise.
806
807 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
808
809 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
810 (h8300sn_info_struct): Likewise.
811 (h8300hn_info_struct): Likewise.
812
813 2003-10-16 Pavel Roskin <proski@gnu.org>
814
815 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
816 for sections which lack size info.
817
818 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
819
820 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
821 mingw32.
822
823 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
824
825 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
826 undefined patterns with '*'.
827
828 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
829
830 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
831 use the last CIE from a different section.
832 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
833 size of the output section.
834
835 2003-10-07 Roland McGrath <roland@redhat.com>
836
837 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
838 new section from p_align header field.
839
840 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
841
842 * elf32-xtensa.c (xtensa_read_table_entries): The external size
843 of entry is 8 bytes.
844
845 2003-10-15 Andrew Cagney <cagney@redhat.com>
846
847 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
848 with NAME##_canonicalize_symtab.
849 * libcoff-in.h (coff_canonicalize_symtab): Update.
850 * xsym.h (bfd_sym_canonicalize_symtab): Update.
851 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
852 * coffgen.c (coff_canonicalize_symtab): Update.
853 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
854 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
855 * ieee.c (ieee_vec): Update comment.
856 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
857 * mmo.c (mmo_canonicalize_symtab): Update.
858 * nlm-target.h (nlm_canonicalize_symtab): Update.
859 * nlmcode.h (nlm_canonicalize_symtab): Update.
860 * i386msdos.c (msdos_canonicalize_symtab): Update.
861 * hp300hpux.c (MY (canonicalize_symtab)): Update.
862 * oasys.c (oasys_canonicalize_symtab): Update.
863 * som.c (som_canonicalize_symtab): Update.
864 * pef.c (bfd_pef_canonicalize_symtab): Update.
865 * nlmcode.h (nlm_canonicalize_symtab): Update.
866 * xsym.c (bfd_sym_canonicalize_symtab): Update.
867 * vms.c (vms_canonicalize_symtab): Update.
868 * versados.c (versados_canonicalize_symtab): Update.
869 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
870 * ieee.c (ieee_canonicalize_symtab): Update.
871 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
872 * reloc.c: Update comment.
873 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
874 * coff64-rs6000.c (aix5coff64_vec): Update.
875 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
876 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
877 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
878 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
879 * hp300hpux.c (MY_canonicalize_symtab): Update.
880 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
881 * aout-tic30.c (MY_canonicalize_symtab): Update.
882 * aout-target.h (MY_canonicalize_symtab): Update.
883 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
884 * elf.c (_bfd_elf_canonicalize_symtab): Update.
885 * elfcode.h (elf_canonicalize_symtab): Update.
886 * ihex.c (ihex_canonicalize_symtab): Update.
887 * tekhex.c (tekhex_canonicalize_symtab): Update.
888 * binary.c (binary_canonicalize_symtab): Update.
889 * srec.c (srec_canonicalize_symtab): Update.
890
891 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
892
893 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
894
895 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
896
897 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
898 relocations.
899 (sh_elf_check_relocs): Likewise.
900
901 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
902 (sh64_elf_merge_symbol_attribute): New.
903 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
904 (sh64_elf64_merge_symbol_attribute): New.
905
906 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
907
908 * elf-bfd.h (struct elf_backend_data): New function pointer member
909 elf_backend_merge_symbol_attribute.
910 * elflink.h (elf_link_add_object_symbols): Adjust call to
911 elf_backend_merge_symbol_attribute if the backend defined it.
912 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
913 (elfNN_bed): Add that to the initializer.
914
915 2003-10-14 Bob Wilson <bob.wilson@acm.org>
916
917 * elf32-xtensa.c (get_is_linkonce_section): Delete.
918 (xtensa_is_property_section, xtensa_is_littable_section): Use
919 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
920 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
921 (xtensa_get_property_section_name): Check section name instead of
922 calling get_is_linkonce_section. Remove unused bfd parameter. Use
923 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
924 linkonce section names by appending ".xt.insn" or ".xt.lit".
925 (xtensa_read_table_entries): Remove bfd argument in call to
926 xtensa_get_property_section_name. Free section name when done.
927 (elf_xtensa_combine_prop_entries): Free leaking table.
928
929 2003-10-13 Richard Sandiford <rsandifo@redht.com>
930
931 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
932 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
933 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
934 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
935 that were needed.
936 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
937 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
938
939 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
940
941 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
942 (bfd_elf64_ia64_after_parse): Likewise.
943 * bfd-in2.h: Regenerated.
944
945 * elfxx-ia64.c (oor_ip): New.
946 (oor_branch_size): Likewise.
947 (bfd_elfNN_ia64_after_parse): Likewise.
948 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
949 equals sizeof (oor_ip).
950
951 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
952
953 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
954 renumbering of some relocation numbers.
955
956 2003-10-11 Alan Modra <amodra@bigpond.net.au>
957
958 * coff-sh.c: Move definition of MAP and guard more code with
959 COFF_IMAGE_WITH_PE.
960
961 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
962 * bfd-in2.h: Regenerate.
963
964 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
965
966 * Makefile.am: Run "make dep-am".
967 * Makefile.in: Regenerate.
968 * doc/Makefile.in: Likewise.
969
970 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
971
972 * cofflink.c: Include "safe-ctype.h".
973 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
974
975 2003-10-08 Dave Brolley <brolley@redhat.com>
976 On behalf of Michael Snyder <msnyder@redhat.com>
977
978 * archures.c: Add FRV fr550 machine.
979 * cpu-frv.c: Ditto.
980 * elf32-frv.c: Ditto.
981 * bfd-in2.h: Regenerate.
982
983 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
984
985 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
986 for non-SGI N64 ABI. Improve code consitency.
987
988 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
989
990 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
991 rightshift to 2.
992
993 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
994
995 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
996 parameter.
997 * cofflink.c (coff_link_add_symbols): Deal with split stab
998 sections.
999 * elflink.h (elf_link_add_object_symbols): Deal with split stab
1000 sections.
1001 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
1002 * libbfd.h: Regenerated.
1003
1004 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
1005 overflow, set reloc start position to after the count
1006 reloc. Subtract one from num relocs. Give error on 0xffff relocs
1007 and no overflow.
1008 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
1009 overflow.
1010 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
1011 0xffff.
1012
1013 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
1014
1015 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
1016 last CIE/FDE if needed.
1017
1018 2003-10-06 Nick Clifton <nickc@redhat.com>
1019
1020 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
1021 BFD64 is enabled.
1022
1023 2003-10-06 Matt Thomas <matt@3am-software.com>
1024
1025 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
1026
1027 2003-10-06 Robert Millan <robertmh@gnu.org>
1028
1029 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
1030 * config.bfd: Likewise.
1031 * configure: Regenerate.
1032
1033 2003-10-04 Christian Groessler <chris@groessler.org>
1034
1035 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
1036 and R_CALLR.
1037
1038 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1039
1040 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
1041 * elf32-m68hc11.c: Likewise.
1042 * elf32-m68hc12.c: Likewise.
1043 * elf32-m68hc1x.h: Likewise.
1044
1045 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
1046
1047 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
1048 of flags between HC12 and HCS12.
1049
1050 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
1051
1052 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
1053 which become empty after merging.
1054
1055 2003-09-30 Jakub Jelinek <jakub@redhat.com>
1056
1057 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
1058 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
1059
1060 2003-09-30 Chris Demetriou <cgd@broadcom.com>
1061
1062 * archures.c (bfd_mach_mipsisa64r2): New define.
1063 * bfd-in2.h: Regenerate.
1064 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
1065 * cpu-mips.c (I_mipsisa64r2): New enum value.
1066 (arch_info_struct): Add entry for I_mipsisa64r2.
1067 * elfxx-mips.c (_bfd_elf_mips_mach)
1068 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
1069 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
1070 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
1071
1072 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
1073
1074 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
1075 Handle SHN_IA_64_ANSI_COMMON.
1076 (elf_backend_section_from_bfd_section): Defined.
1077
1078 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
1079
1080 * elflink.c (elf_link_read_relocs_from_section): Add an argument
1081 of a pointer to section. Check bad symbol index.
1082 (_bfd_elf_link_read_relocs): Modify calls to
1083 elf_link_read_relocs_from_section.
1084
1085 2003-09-23 DJ Delorie <dj@redhat.com>
1086
1087 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
1088 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
1089 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
1090 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
1091 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
1092 R_SH_PSHA, R_SH_PSHL added.
1093 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
1094 (sh_elf_relocate_section): Support new relocs.
1095
1096 2003-09-23 Bob Wilson <bob.wilson@acm.org>
1097
1098 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
1099 dynamic relocation offsets.
1100
1101 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1102
1103 * simple.c (bfd_simple_get_relocated_section_contents): Free the
1104 hash table using _bfd_generic_link_hash_table_free.
1105
1106 2003-09-23 Alan Modra <amodra@bigpond.net.au>
1107
1108 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
1109 type of prefix_length and suffix_length to int. Rename "attributes"
1110 to "attr". Comment.
1111 (_bfd_elf_get_sec_type_attr): Update prototype.
1112 * elf.c (get_special_section): Rewrite.
1113 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
1114 attr and type pointers.
1115 (_bfd_elf_new_section_hook): Adjust for above.
1116 (special_sections): Merge suffix with prefix. Set
1117 prefix_length for all entries. Set suffix_length appropriately.
1118 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
1119 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
1120 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
1121 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
1122 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
1123 * elf32-v850.c (v850_elf_special_sections): Likewise.
1124 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
1125 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
1126 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
1127 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
1128 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
1129 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
1130 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
1131 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
1132
1133 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
1134
1135 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
1136 ->got if the section already exists.
1137
1138 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
1139
1140 * dwarf2.c (decode_line_info): Cope with an initially empty
1141 filename table.
1142
1143 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1144
1145 * acinclude.m4: Include ../config/accross.m4.
1146 * aclocal.m4: Regenerated.
1147
1148 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
1149 or long long.
1150 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
1151 (host64): Remove if HOST_64BIT_TYPE is set to long.
1152
1153 * configure.in (HOST_64BIT_TYPE): Set according to the size of
1154 long and long long.
1155 (HOST_U_64BIT_TYPE): Likewise.
1156 (host64): Likewise.
1157 * configure: Regenerated.
1158
1159 2003-09-19 Alan Modra <amodra@bigpond.net.au>
1160
1161 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
1162 since some ABIs round up the size of the struct.
1163
1164 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
1165
1166 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
1167 the old symbol is undefined and the new symbol is defined.
1168
1169 2003-09-18 Andreas Schwab <schwab@suse.de>
1170
1171 * simple.c (bfd_simple_get_relocated_section_contents): Use
1172 _bfd_generic_link_hash_table_create instead of
1173 bfd_link_hash_table_create.
1174
1175 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
1176
1177 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
1178 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
1179
1180 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
1181 Randolph Chung <randolph@tausq.org>
1182
1183 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
1184 hppa_link_hash_newfunc, hppa_build_one_stub,
1185 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
1186 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
1187 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
1188 for generating import stubs for calls to statically linked PIC
1189 functions.
1190 (hppa_type_of_stub): Don't generate an import stub for calls to
1191 statically linked pic functions. Generate import stubs for calls
1192 in a shared object, to functions not in a regular file, and to
1193 defined weak functions. Add new argument INFO.
1194 (hppa_build_one_stub): Don't undef ADDIL_DP.
1195 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
1196 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
1197 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
1198 non-shared link. Convert instructions that use the the linkage table
1199 pointer, or a facsimile thereof, to use the global data pointer when
1200 the reloc has been changed.
1201
1202 2003-09-08 Joel Brobecker <brobecker@gnat.com>
1203
1204 * archures.c: Add new machine names for hppa.
1205 * bfd-in2.h: Regenerate.
1206 * cpu-hppa.c: Use the new machine names.
1207
1208 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1209
1210 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
1211 all_local_syms member.
1212 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
1213 to get the local symbols.
1214
1215 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
1216
1217 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
1218 (elf_backend_special_sections): Define.a
1219
1220 PR savannah/4950:
1221 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
1222 section is read-only.
1223
1224 2003-09-04 Nick Clifton <nickc@redhat.com>
1225
1226 * archures.c (bfd_mach_v850e1): Define.
1227 * bfd-in2.h: Regenerate.
1228 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
1229 (arch_info_struct): Include an entry for bfd_mach_v850e1.
1230 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
1231 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
1232 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
1233 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
1234 linked with v850e binaries. Mark the output as v850e.
1235
1236 2003-09-03 Nick Clifton <nickc@redhat.com>
1237
1238 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
1239 symbols that are used in relocs.
1240
1241 2003-08-30 Robert Millan <robertmh@gnu.org>
1242
1243 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
1244 * config.bfd: Likewise.
1245 * configure: Regenerate.
1246
1247 2003-08-31 Christian Groessler <chris@groessler.org>
1248
1249 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
1250 instead of returning bfd_reloc_continue.
1251
1252 2003-08-31 Andreas Jaeger <aj@suse.de>
1253
1254 * merge.c: Update to ISO C90.
1255
1256 2003-08-27 Ian Lance Taylor <ian@airs.com>
1257
1258 * configure.in: Check for strtoull.
1259 * bfd.c (bfd_scan_vma): Use strtoull when available.
1260 * configure, config.in: Regenerate.
1261
1262 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
1263 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
1264 __GNUC__ when deciding whether to use long long for
1265 BFD_HOST_64_BIT.
1266 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
1267
1268 2003-08-27 Christian Groessler <chris@groessler.org>
1269
1270 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
1271 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
1272 functions.
1273 (elf32_i860_howto_table): Insert the new functions as
1274 'special_function's in the proper reloc type entries.
1275
1276 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
1277
1278 * elf32-frv.c (elf32_frv_relocate_section): Use
1279 _bfd_elf_rela_local_sym.
1280
1281 2003-08-26 Michael Snyder <msnyder@redhat.com>
1282
1283 * cpu-frv.c: Remove unused enum.
1284
1285 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1286
1287 * reloc.c: Fix documentation for MIPS ELF relocations.
1288 libbfd.h: Regenerate.
1289 bfd-in2.h: Regenerate.
1290
1291 2003-08-24 Jason Eckhardt <jle@rice.edu>
1292
1293 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
1294
1295 2003-08-24 Jason Eckhardt <jle@rice.edu>
1296
1297 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1298 shift by 2 before storing the relocated value.
1299
1300 2003-08-23 Jason Eckhardt <jle@rice.edu>
1301
1302 * coff-i860.c (coff_i860_reloc_nyi): New function.
1303 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1304 LOWn, SPLITn, and BRADDR.
1305 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1306 before trying to access the entry.
1307 (coff_i860_rtype_to_howto): Likewise.
1308 (coff_i860_reloc_type_lookup): New function.
1309 (i860_reloc_processing): New function.
1310 (coff_bfd_reloc_type_lookup): Define macro.
1311 (RELOC_PROCESSING): Define macro.
1312 Minor formatting adjustments.
1313
1314 2003-08-23 Alan Modra <amodra@bigpond.net.au>
1315
1316 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1317
1318 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1319
1320 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1321 .got section at 8 bytes.
1322
1323 2003-08-21 Nick Clifton <nickc@redhat.com>
1324
1325 * cofflink.c: Update to ISO C90 and tidy up formatting.
1326
1327 2003-08-21 Randolph Chung <tausq@debian.org>
1328
1329 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1330 can have OSABI=Linux or OSABI=SysV. Check for both.
1331 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1332
1333 2003-08-21 Nick Clifton <nickc@redhat.com>
1334
1335 * po/sv.po: Updated Swedish translation.
1336
1337 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
1338
1339 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1340
1341 2003-08-20 Nick Clifton <nickc@redhat.com>
1342
1343 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1344 replace some duplicated code in most elfxx-xxxx.c files. This
1345 version uses the new fields in bfd_link_info.
1346
1347 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1348 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1349 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1350 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1351 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1352 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1353 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1354 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1355 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1356 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1357 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1358 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1359 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1360 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1361 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1362 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1363 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1364 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1365 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1366
1367 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
1368 elf_hppa_remark_useless_dynamic_symbols,
1369 elf_hppa_relocate_section): Use the new fields in
1370 bfd_link_info structure.
1371 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1372 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1373 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1374 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1375 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1376 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1377
1378 * elflink.h (elf_link_output_extsym): Fix test for reporting
1379 undefined symbols in shared libraries. Remove redundant test
1380 of shlib_undefined when reporting references to forced local
1381 symbols.
1382
1383 2003-08-18 Andreas Schwab <schwab@suse.de>
1384
1385 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1386 executables.
1387
1388 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1389
1390 * simple.c (bfd_simple_get_relocated_section_contents): Move
1391 reloc_done hack to before first bfd_section_size call. Change all
1392 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1393
1394 2003-08-16 Alan Modra <amodra@bigpond.net.au>
1395
1396 * elf64-ppc.c: Don't include elf/ppc.h.
1397
1398 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
1399
1400 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1401 code to work with 64-bit bfds.
1402
1403 2003-08-14 Alan Modra <amodra@bigpond.net.au>
1404
1405 * dep-in.sed: Remove libintl.h.
1406 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1407 (POTFILES.in): Remove target.
1408 * Makefile.in: Regenerate.
1409
1410 2003-08-12 Alan Modra <amodra@bigpond.net.au>
1411
1412 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1413 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1414 use the function sym from the previous reloc.
1415
1416 2003-08-11 Jakub Jelinek <jakub@redhat.com>
1417
1418 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1419 fatal if -pie.
1420 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1421 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1422 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1423 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1424 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1425 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1426 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1427 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1428 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1429 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1430 on undefined symbols if -pie.
1431 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1432
1433 2003-08-11 Alan Modra <amodra@bigpond.net.au>
1434
1435 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1436 branch to __libc_start_main.
1437
1438 2003-08-08 Dmitry Diky <diwil@mail.ru>
1439
1440 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1441 gcc order.
1442 * cpu-msp430.c: Likewise.
1443 * elf32-msp430.c: Likewise.
1444 * bfd-in2.h: Regenerate.
1445
1446 2003-08-07 Alan Modra <amodra@bigpond.net.au>
1447
1448 * elfxx-target.h: Remove PTR cast.
1449 * targets.c (bfd_target): Make backend_data const void *.
1450 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1451 * elf-m10300.c: Likewise.
1452 * elf.c: Likewise.
1453 * elf32-hppa.c: Likewise.
1454 * elf32-i386.c: Likewise.
1455 * elf32-m68hc1x.c: Likewise.
1456 * elf32-ppc.c: Likewise.
1457 * elf32-s390.c: Likewise.
1458 * elf32-sh.c: Likewise.
1459 * elf32-sh64.c: Likewise.
1460 * elf32-sparc.c: Likewise.
1461 * elf32-xtensa.c: Likewise.
1462 * elf64-mips.c: Likewise.
1463 * elf64-ppc.c: Likewise.
1464 * elf64-s390.c: Likewise.
1465 * elf64-sh64.c: Likewise.
1466 * elf64-sparc.c: Likewise.
1467 * elf64-x86-64.c: Likewise.
1468 * elfcode.h: Likewise.
1469 * elfcore.h: Likewise.
1470 * elflink.c: Likewise.
1471 * elflink.h: Likewise.
1472 * elfxx-ia64.c: Likewise.
1473 * elfxx-mips.c: Likewise.
1474 * elfxx-mips.h: Likewise.
1475 * elf.c (prep_headers): Remove useless check for null backend_data.
1476 * bfd-in2.h: Regenerate.
1477
1478 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1479 (NAME): Use ## rather than CONCAT4 macro.
1480 * elfcode.h: Remove one remaining PARAMS macro.
1481 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1482 * elf-strtab.c: Likewise.
1483 * elf-hppa.h: Likewise.
1484 * elf32-hppa.h: Likewise.
1485 * elf32-hppa.c: Likewise.
1486 (elf32_hppa_add_symbol_hook): Delete.
1487 (elf_backend_add_symbol_hook): Don't define.
1488 * libhppa.h: Convert to C90. Replace INLINE with inline.
1489
1490 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1491
1492 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1493 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1494 function descriptors, but warn.
1495 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1496 stub syms so that we can avoid a stub sym if we already have a
1497 plt sym. Do not redefine an existing symbol.
1498 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1499 glink.
1500
1501 2003-08-06 Nick Clifton <nickc@redhat.com>
1502
1503 * po/fr.po: Updated French translation.
1504
1505 2003-08-06 Alan Modra <amodra@bigpond.net.au>
1506
1507 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1508 SEC_LINKER_CREATED.
1509
1510 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
1511
1512 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1513 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1514
1515 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1516
1517 * coffcode.h (coff_slurp_line_table): Return with a warning
1518 message if the line number table could not be read.
1519
1520 2003-08-04 Nick Clifton <nickc@redhat.com>
1521
1522 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1523 to messages produced for .gnu.warning.SYMBOL sections.
1524
1525 2003-08-04 Alan Modra <amodra@bigpond.net.au>
1526
1527 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1528 * elfcore.h: Likewise.
1529 * elflink.c: Likewise.
1530 * elflink.h: Likewise.
1531 * elf.c (sym_is_global): Remove INLINE.
1532 (align_file_position): Replace INLINE with inline.
1533 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1534 (elf_file_p): Replace INLINE with inline.
1535
1536 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1537
1538 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1539
1540 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1541
1542 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1543
1544 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1545
1546 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1547 ElfNN_External_Rela instead of Elf64_External_Rela.
1548
1549 2003-08-01 Nick Clifton <nickc@redhat.com>
1550
1551 * config.bfd: Add code to catch obsolete configurations and warn
1552 about them unless --enable-obsolete is used. Use this to mark
1553 vax-vms port as obsolete.
1554
1555 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1556
1557 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1558 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1559 Formatting.
1560 * elfxx-target.h: Remove PARAMS macro. Formatting.
1561
1562 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1563
1564 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1565 * elf64-ppc.c (get_fdh): New function, split out from
1566 ppc64_elf_edit_opd.
1567 (ppc64_elf_check_relocs): Use get_fdh.
1568 (func_desc_adjust): Likewise. Tidy.
1569 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1570 exit. Use get_fdh. Account for superfluous dynamic relocs.
1571 (ppc64_elf_relocate_section): Warning fix.
1572
1573 2003-07-30 Jason Eckhardt <jle@rice.edu>
1574
1575 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1576
1577 2003-07-30 Jason Eckhardt <jle@rice.edu>
1578
1579 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1580
1581 2003-07-30 Randolph Chung <tausq@debian.org>
1582
1583 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1584 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1585
1586 2003-07-30 Alan Modra <amodra@bigpond.net.au>
1587
1588 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1589 Replace PTR with void *. Formatting.
1590 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1591 (make_mapping): Likewise.
1592
1593 2003-07-29 Alan Modra <amodra@bigpond.net.au>
1594
1595 * elf64-ppc.c (func_desc_adjust): Give linker created function
1596 descriptor symbols a size and type.
1597 (ppc64_elf_relocate_section): Correct lq insn test.
1598
1599 2003-07-28 Eric Christopher <echristo@redhat.com>
1600
1601 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1602 (ppc_elf_install_value): New function.
1603 (ppc_elf_sort_rela): Remove.
1604 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1605 and replace with out of range branch stubs.
1606 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1607
1608 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1609
1610 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1611 from input_bfd.
1612
1613 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1614
1615 * elf.c (special_sections): Set attributes for .got and .plt.
1616
1617 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1618
1619 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1620 on function descriptors.
1621 (ELIMINATE_COPY_RELOCS): Expand comment.
1622 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1623 Do include ".toc1".
1624
1625 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1626
1627 * elf.c (_bfd_elf_new_section_hook): Set the default section
1628 type to SHT_NULL.
1629 (elf_fake_sections): Set the section type based on asect->flags
1630 if it is SHT_NULL. Don't abort on processor specific section
1631 types.
1632
1633 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1634
1635 * bfd-in2.h: Regenerated.
1636
1637 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1638
1639 * elf-bfd.h (bfd_elf_special_section): New.
1640 (elf_backend_data): Add special_sections, a pointer to
1641 bfd_elf_special_section.
1642 (elf_section_type). New.
1643 (elf_section_flags): New.
1644 (_bfd_elf_get_sec_type_attr): New.
1645
1646 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1647 real section type/flags.
1648 (special_sections): New.
1649 (get_special_section): New.
1650 (_bfd_elf_get_sec_type_attr): New.
1651 (_bfd_elf_new_section_hook): Check special_section to set
1652 elf_section_type and elf_section_flags.
1653 (elf_fake_sections): Don't use section name to set ELF section
1654 data.
1655
1656 * elf32-m32r.c (m32r_elf_special_sections): New.
1657 (elf_backend_special_sections): Defined.
1658
1659 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1660 (elf_backend_special_sections): Defined.
1661
1662 * elf32-mcore.c (mcore_elf_special_sections): New.
1663 (elf_backend_special_sections): Defined.
1664
1665 * elf32-ppc.c (ppc_elf_special_sections): New.
1666 (elf_backend_special_sections): Defined.
1667
1668 * elf32-sh64.c (sh64_elf_special_sections): New.
1669 (elf_backend_special_sections): Defined.
1670
1671 * elf32-v850.c (v850_elf_special_sections): New.
1672 (elf_backend_special_sections): Defined.
1673
1674 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1675 (elf_backend_special_sections): Defined.
1676
1677 * elf64-alpha.c (elf64_alpha_special_sections): New.
1678 (elf_backend_special_sections): Defined.
1679
1680 * elf64-hppa.c (elf64_hppa_special_sections): New.
1681 (elf_backend_special_sections): Defined.
1682
1683 * elf64-ppc.c (ppc64_elf_special_sections): New.
1684 (elf_backend_special_sections): Defined.
1685
1686 * elf64-sh64.c (sh64_elf64_special_sections): New.
1687 (elf_backend_special_sections): Defined.
1688
1689 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1690 (elf_backend_special_sections): Defined.
1691
1692 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1693
1694 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1695 (elf_backend_special_sections): Defined.
1696
1697 * elfxx-target.h (elf_backend_special_sections): New. Default
1698 to NULL.
1699 (elfNN_bed): Initialize special_sections.
1700
1701 * section.c (bfd_abs_section): Remove const.
1702 (bfd_und_section): Likewise.
1703 (bfd_com_section): Likewise.
1704 (bfd_ind_section): Likewise.
1705
1706 2003-07-24 Nick Clifton <nickc@redhat.com>
1707
1708 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1709 sections are assigned the LOAD attribute.
1710
1711 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1712
1713 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1714 * elf32-sh64-com.c: Likewise.
1715 * elf32-sh64.c: Likewise.
1716 * elf32-sh64.h: Likewise.
1717 * elf64-sh64.c: Likewise.
1718
1719 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1720
1721 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1722 (allocate_dynrelocs): Likewise.
1723 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1724 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1725
1726 2003-07-24 Nick Clifton <nickc@redhat.com>
1727
1728 * po/fr.po: Updated French translation.
1729
1730 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1731
1732 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1733 near the beginning of the file. Swap order of arguments. Call
1734 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1735 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1736 (elf_xtensa_relocate_section): Likewise.
1737 (shrink_dynamic_reloc_sections): Likewise.
1738
1739 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1740
1741 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1742 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1743 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1744 first printing an error message.
1745 (elf_xtensa_finish_dynamic_sections): Likewise.
1746 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1747 discarding literal table entries.
1748 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1749 (elf_xtensa_do_asm_simplify): Likewise.
1750
1751 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1752
1753 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1754 we have a local symbol in common section.
1755
1756 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1757
1758 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1759 weak symbols.
1760
1761 2003-07-22 Nick Clifton <nickc@redhat.com>
1762
1763 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1764 expected RS6000 storage classes.
1765
1766 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1767
1768 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1769 output_bfd unused to silence gcc.
1770
1771 2003-07-21 Nick Clifton <nickc@redhat.com>
1772
1773 * po/sv.po: Updated Swedish translation.
1774
1775 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1776
1777 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1778 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1779 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1780 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1781 now done in _bfd_elf_symbol_refs_local_p.
1782 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1783 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1784 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1785
1786 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1787
1788 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1789
1790 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1791
1792 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1793 (SYMBOL_CALLS_LOCAL): Likewise.
1794
1795 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1796 immediately if symbol isn't defined locally.
1797
1798 2003-07-18 Richard Henderson <rth@redhat.com>
1799
1800 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1801 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1802 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1803 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1804 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1805 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1806 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1807 Update all callers to provide the relocation being resolved.
1808
1809 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1810
1811 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1812 targ_cflags.
1813
1814 2003-07-17 Nick Clifton <nickc@redhat.com>
1815
1816 * po/es.po: New Spanish translation.
1817 * po/sv.po: New Swedish translation.
1818 * po/opcodes.pot: Regenerate.
1819
1820 2003-07-16 Richard Henderson <rth@redhat.com>
1821
1822 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1823 * elfxx-ia64.c, targets.c: Likewise.
1824
1825 2003-07-16 Richard Henderson <rth@redhat.com>
1826
1827 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1828 for symbols defined locally plus -Bsymbolic. Tidy logic.
1829
1830 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1831
1832 * archures.c (bfd_mach_mips7000): New.
1833 * bfd-in2.h: Regenerated.
1834 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1835 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1836 (mips_mach_extensions): Add an entry for it.
1837
1838 2003-07-14 Nick Clifton <nickc@redhat.com>
1839
1840 * po/tr.po: Update with latest version.
1841 * po/SRC-POTFILES.in: Regenerate.
1842 * po/bfd.pot: Regenerate.
1843 * Makfile.in: Regenerate.
1844 * configure: Regenerate.
1845
1846 2003-07-12 Jeff Baker <jbaker@qnx.com>
1847
1848 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1849 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1850 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1851 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1852
1853 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1854
1855 * coffcode.h (coff_set_section_contents): Set the
1856 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1857
1858 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1859
1860 * bfd-in.h (bfd_h8300_pad_address): Declare.
1861 * bfd-in2.h: Regenerate.
1862 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1863 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1864 addresses before checking whether they can be relaxed.
1865 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1866 Don't complain about overflows in general 8-bit relocations.
1867 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1868 Fix handling of R_H8_DIR24A8.
1869
1870 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1871
1872 * elf32-h8300.c: Convert function prototypes and definitions
1873 to C90 syntax.
1874 * coff-h8300.c: Likewise.
1875 * cpu-h8300.c: Likewise.
1876
1877 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1878
1879 * po/SRC-POTFILES.in: Regenerate.
1880 * po/bfd.pot: Likewise.
1881
1882 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1883
1884 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1885 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1886 .xt.lit.plt section.
1887 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1888 and allocate memory for it.
1889 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1890 section to the .got.loc section.
1891 (elf_xtensa_finish_dynamic_sections): Fix up call to
1892 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1893 the address of .got.loc.
1894 (relax_property_section): Shrink .got.loc to match changes in any
1895 literal table section.
1896 (xtensa_is_property_section): Change to match
1897 xtensa_get_property_section_name.
1898 (xtensa_is_littable_section): New.
1899
1900 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1901
1902 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1903 -1LL.
1904
1905 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1906
1907 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1908 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1909 Run "make dep-am".
1910 * Makefile.in: Regenerate.
1911
1912 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1913
1914 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1915 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1916 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1917 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1918 * elf32-am33lin.c: Rename global functions.
1919 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1920 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1921 * configure.in (bfd_elf32_am33lin_vec): Added.
1922 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1923 (elf32-am33lin.lo): List dependencies.
1924 * aclocal.m4, configure, Makefile.in: Rebuilt.
1925 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1926 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1927 ELF_ARCH was not defined before.
1928 (elf_symbol_leading_char): Define if not defined.
1929 * elf32-am33lin.c: Override the definitions above.
1930 * targets.c (bfd_elf32_am33lin_vec): New.
1931
1932 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1933
1934 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1935 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1936 pcrel_relocs_copied.
1937 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1938 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1939 ld-linux.so.2 to ld.so.1.
1940 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1941 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1942 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1943 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1944 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1945 .rela.* section contents with bfd_zalloc.
1946 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1947 * elf-m10300.c: Added declarations for functions missing them.
1948 Merge some shared-library changes from the i386 back-end. Use
1949 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1950 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1951 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1952 members of elf_link_hash_entry. Adjusted references.
1953 (mn10300_elf_final_link_relocate): dynobj was already loaded
1954 into a local variable, use it.
1955 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1956 * elf-m10300.c: Add missing function prototypes.
1957 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1958 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1959 relocation for dynamic relocations.
1960 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1961 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1962 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1963 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1964 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1965 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1966 adress is already known at the time we compute relaxations.
1967 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1968 and PLT32 to narrower relocations.
1969 * libbfd.h, bfd-in2.h: Rebuilt.
1970 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1971 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1972 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1973 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1974 BFD_RELOC_MN10300_RELATIVE): New relocs.
1975 * libbfd.h, bfd-in2.h: Rebuilt.
1976 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1977 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1978 fields.
1979 (elf_mn10300_howto): Defined new relocation types.
1980 (mn10300_reloc_map): Map them.
1981 (_bfd_mn10300_elf_create_got_section): New fn.
1982 (mn10300_elf_check_relocs): Handle PIC relocs.
1983 (mn10300_elf_final_link_relocate): Likewise.
1984 (mn10300_elf_relocate_section): Handle DSOs.
1985 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1986 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1987 elf_mn10300_pic_plt_entry): New.
1988 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1989 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1990 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1991 elf_mn10300_plt_reloc_offset: New macros.
1992 (ELF_DYNAMIC_INTERPRETER): Likewise.
1993 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1994 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1995 (_bfd_mn10300_elf_discard_copies): Likewise.
1996 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1997 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1998 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1999 (elf_backend_can_gc_sections,
2000 elf_backend_create_dynamic_sections,
2001 elf_backend_adjust_dynamic_sections,
2002 elf_backend_size_dynamic_sections,
2003 elf_backend_finish_dynamic_symbol,
2004 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2005 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2006 elf_backend_got_header_size, elf_backend_plt_header_size): New
2007 macros.
2008
2009 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
2010
2011 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
2012 * elf-m10300.c (compute_function_info): Account for AM33
2013 registers in `movm' when computing stack space for `call' when
2014 linking for AM33/2.0 link.
2015 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
2016 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
2017 * bfd-in2.h: Rebuilt.
2018 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
2019 * elf-m10300.c: Updated.
2020 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
2021 * archures.c (bfd_mach_am332): Defined.
2022 * bfd-in2.h: Rebuilt.
2023 * cpu-m10300.c (bfd_am332_arch): Defined.
2024 (bfd_am33_arch): Chained with am33-2.
2025 * elf-m10300.c (elf_mn10300_mach): Handle am332.
2026 (_bfd_mn10300_elf_final_write_processing): Likewise.
2027
2028 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
2029
2030 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
2031
2032 2003-07-10 Alan Modra <amodra@bigpond.net.au>
2033
2034 * elf64-ppc.c (bfd_elf64_mkobject): Define.
2035 (struct ppc64_elf_obj_tdata): New.
2036 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
2037 (ppc64_elf_mkobject): New function.
2038 (struct got_entry): Add "owner". Move "tls_type".
2039 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
2040 (ppc64_elf_init_stub_bfd): New function.
2041 (create_got_section): Create header .got in dynobj. Create .got
2042 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
2043 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
2044 Look for dynobj .got, and test it.
2045 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
2046 (update_local_sym_info): Likewise.
2047 (ppc64_elf_check_relocs): Likewise.
2048 (ppc64_elf_gc_sweep_hook): Likewise.
2049 (ppc64_elf_tls_optimize): Likewise.
2050 (allocate_dynrelocs): Likewise.
2051 (ppc64_elf_size_dynamic_sections): Likewise.
2052 (ppc64_elf_relocate_section): Likewise.
2053 (ppc64_elf_next_toc_section): Update comment.
2054 (toc_adjusting_stub_needed): Remove unneeded cast.
2055 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
2056 testing section flags.
2057 (ppc64_elf_build_stubs): Likewise.
2058 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
2059 (ppc64_elf_finish_dynamic_sections): Write out got sections.
2060 (func_desc_adjust): Copy over dynamic info for undef weaks.
2061 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
2062 (ppc64_elf_size_stubs): Update prototype.
2063 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
2064 input sections rather than scanning dynobj.
2065
2066 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2067
2068 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
2069 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
2070 (mips_elf_create_msym_section): Delete.
2071 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
2072 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
2073 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
2074 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
2075 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
2076 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
2077 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
2078
2079 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2080
2081 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
2082 symbols protected.
2083
2084 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2085
2086 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
2087 of relocations whose offset is -2.
2088
2089 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2090
2091 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
2092 forced-local symbols like other locals. Don't create relocations
2093 against STN_UNDEF in irix objects.
2094
2095 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2096
2097 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
2098 compatible objects, add the values of defined external symbols
2099 to the addend.
2100
2101 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
2102
2103 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
2104 initialize a GOT entry to the symbol's st_value.
2105
2106 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2107
2108 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
2109 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
2110 (ppc_elf_tdata): Define.
2111 (elf_local_ptr_offsets): Adjust.
2112 (ppc_elf_mkobject): New function.
2113 (bfd_elf32_mkobject): Define.
2114
2115 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
2116 * elfcore.h (elf_core_file_p): Likewise.
2117 * section.c (bfd_section_init): Remove prototype.
2118
2119 2003-07-08 Alan Modra <amodra@bigpond.net.au>
2120
2121 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
2122 field.
2123 (enum elf_linker_section_enum): Delete.
2124 (struct elf_linker_section): Delete.
2125 (struct elf_linker_section_pointers): Delete.
2126 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
2127 Make linker_section_pointers a void**.
2128 (elf_local_ptr_offsets, elf_linker_section): Don't define.
2129 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
2130 of old item in elf-bfd.h.
2131 (struct elf_linker_section): Likewise.
2132 (struct elf_linker_section_pointers): Likewise.
2133 (elf_local_ptr_offsets): Define.
2134 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
2135 (ppc_elf_link_hash_newfunc): Init it.
2136 (struct ppc_elf_link_hash_table): Add sbss.
2137 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
2138 individual fields.
2139 (elf_create_linker_section): Fold into..
2140 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
2141 Make rela section here if shared.
2142 (elf_find_pointer_linker_section): Pass lsect rather than enum.
2143 (elf_create_pointer_linker_section): Adjust. zalloc rather than
2144 clearing in a loop.
2145 (elf_finish_pointer_linker_section): Adjust. Don't make rela
2146 section here.
2147 (ppc_elf_check_relocs): Adjust.
2148 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
2149 creating .sbss by hand.
2150 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
2151
2152 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2153
2154 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
2155 complain_overflow_bitfield.
2156 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
2157 complain_overflow_bitfield.
2158
2159 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2160
2161 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
2162 true even if -pie.
2163
2164 2003-07-04 Jakub Jelinek <jakub@redhat.com>
2165
2166 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
2167 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
2168 !info->executable.
2169 (get_fptr): For -pie create .opd as writable section and create
2170 .rela.opd as well.
2171 (elfNN_ia64_check_relocs): Change info->shared into
2172 !info->executable.
2173 (allocate_fptr): Likewise.
2174 (allocate_dynrel_entries): Account for a relative reloc for -pie
2175 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
2176 for undefweak symbol. Account for an IPLT reloc in .rela.opd
2177 section if -pie.
2178 (set_got_entry): Don't create a relative reloc if -pie
2179 want_ltoff_fptr for undefweak symbol.
2180 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
2181 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
2182 @fptr().
2183
2184 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
2185 even if -pie.
2186 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2187 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2188 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2189 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2190 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2191 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2192 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2193 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2194 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2195
2196 2003-07-04 Paul Clarke <paulc@senet.com.au>
2197
2198 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
2199 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
2200 <R_H8_DIR32A16>: Fix type of relocation.
2201
2202 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2203
2204 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
2205 sections were created already. Remove unnecessary tests of
2206 the previous change.
2207
2208 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2209
2210 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
2211 bfd_make_section for existing sections.
2212
2213 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2214
2215 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
2216 create_got_section if we already have done so.
2217 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2218 (sh_elf_check_relocs): Likewise.
2219 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
2220 htab->root.dynobj instead.
2221 (sh_elf_check_relocs): Likewise.
2222 (sh_elf_finish_dynamic_sections): Likewise.
2223
2224 * section.c (bfd_make_section): Return NULL for existing section.
2225
2226 2003-07-04 Alan Modra <amodra@bigpond.net.au>
2227
2228 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
2229 ppc_elf_create_got if we've already done so.
2230
2231 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
2232 (_bfd_elf_find_pointer_linker_section): Likewise.
2233 (bfd_elf32_create_pointer_linker_section): Likewise.
2234 (bfd_elf32_finish_pointer_linker_section): Likewise.
2235 (bfd_elf64_create_pointer_linker_section): Likewise.
2236 (bfd_elf64_finish_pointer_linker_section): Likewise.
2237 (_bfd_elf_make_linker_section_rela): Likewise.
2238 * elfcode.h (elf_create_pointer_linker_section): Don't define.
2239 (elf_finish_pointer_linker_section): Likewise.
2240 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
2241 (_bfd_elf_create_linker_section): Move this function..
2242 (_bfd_elf_find_pointer_linker_section): ..and this..
2243 * elflink.h (elf_create_pointer_linker_section): ..and this..
2244 (elf_finish_pointer_linker_section): ..and this..
2245 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
2246 calls.
2247 (elf_create_linker_section): Convert to C90, tidy.
2248 (elf_find_pointer_linker_section): Likewise.
2249 (elf_create_pointer_linker_section): Likewise.
2250 (elf_finish_pointer_linker_section): Likewise.
2251 * elf32-i370.c: Delete #if 0 code.
2252
2253 2003-07-02 Alan Modra <amodra@bigpond.net.au>
2254
2255 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
2256 _restf* to be satisfied by shared libs, and always force them local.
2257 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
2258 Correct test for "bl".
2259 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
2260 primary opcode 31.
2261
2262 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
2263
2264 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
2265 (s390_tls_reloc): New function.
2266 (elf_howto_table): Add long displacement relocations R_390_20,
2267 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
2268 (elf_s390_reloc_type_lookup): Likewise.
2269 (elf_s390_check_relocs): Likewise.
2270 (elf_s390_gc_sweep_hook): Likewise.
2271 (elf_s390_relocate_section): Likewise.
2272 * elf64-s390.c: Same changes as for elf32-s390.c.
2273 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
2274 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
2275 BFD_RELOC_390_TLS_GOTIE20.
2276 * bfd-in2.h: Regenerate.
2277 * libbfd.h: Likewise.
2278
2279 2003-06-30 Alan Modra <amodra@bigpond.net.au>
2280
2281 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
2282 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
2283
2284 2003-06-29 Alan Modra <amodra@bigpond.net.au>
2285
2286 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
2287 Replace PTR with void *. Formatting.
2288 * archive64.c: Likewise.
2289 * archures.c: Likewise.
2290 * bfd-in.h: Likewise.
2291 * bfd.c: Likewise.
2292 * bfdio.c: Likewise.
2293 * bfdwin.c: Likewise.
2294 * cache.c: Likewise.
2295 * corefile.c: Likewise.
2296 * format.c: Likewise.
2297 * init.c: Likewise.
2298 * libbfd-in.h: Likewise.
2299 * libbfd.c: Likewise.
2300 * linker.c: Likewise.
2301 * opncls.c: Likewise.
2302 * reloc.c: Likewise.
2303 * section.c: Likewise.
2304 * simple.c: Likewise.
2305 * syms.c: Likewise.
2306 * targets.c: Likewise.
2307 * bfd-in2.h: Regenerate.
2308 * libbfd.h: Regenerate.
2309
2310 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2311 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2312 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2313 (bfd_getb64): Rewrite without parens.
2314 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2315 * cache.c (insert, snip): Remove INLINE.
2316 * linker.c (bfd_link_add_undef): Likewise.
2317
2318 2003-06-29 Andreas Jaeger <aj@suse.de>
2319
2320 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2321 unnecessary prototypes. Replace PTR with void *.
2322 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2323 trim plt entries. Move undefweak non-default visibility test ...
2324 (allocate_dynrelocs): ... from here.
2325 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2326 Change all callers.
2327 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2328 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2329 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2330 dynreloc and .got relocs.
2331 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2332 for .got relocs.
2333
2334 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2335
2336 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2337
2338 2003-06-27 Nick Clifton <nickc@redhat.com>
2339
2340 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2341 bfd_add_gnu_debuglink_section and only create the section, do not
2342 fill in its contents.
2343 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2344 contents of a .gnu-debuglink section.
2345 * bfd-in2.h: Regenerate.
2346
2347 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2348
2349 * elfxx-mips.c: Revert .got alignment to 2**4.
2350
2351 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2352
2353 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2354
2355 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2356
2357 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2358 relocation header setup.
2359
2360 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2361
2362 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2363 (ppc_elf_reloc_type_lookup): Modify comment.
2364 (ppc_elf_info_to_howto): Ditto.
2365 (ppc_elf_relocate_section): Ditto.
2366 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2367
2368 2003-06-25 Alan Modra <amodra@bigpond.net.au>
2369
2370 * aout-ns32k.c: Correct spelling of "relocatable".
2371 * aoutx.h: Likewise.
2372 * bfd-in.h: Likewise.
2373 * bfd.c: Likewise.
2374 * bout.c: Likewise.
2375 * coff-a29k.c: Likewise.
2376 * coff-alpha.c: Likewise.
2377 * coff-arm.c: Likewise.
2378 * coff-i386.c: Likewise.
2379 * coff-i860.c: Likewise.
2380 * coff-i960.c: Likewise.
2381 * coff-m68k.c: Likewise.
2382 * coff-m88k.c: Likewise.
2383 * coff-mcore.c: Likewise.
2384 * coff-mips.c: Likewise.
2385 * coff-or32.c: Likewise.
2386 * coff-ppc.c: Likewise.
2387 * coff-rs6000.c: Likewise.
2388 * coff-sh.c: Likewise.
2389 * coff-tic80.c: Likewise.
2390 * coff64-rs6000.c: Likewise.
2391 * cofflink.c: Likewise.
2392 * cpu-ns32k.c: Likewise.
2393 * ecoff.c: Likewise.
2394 * ecofflink.c: Likewise.
2395 * elf-bfd.h: Likewise.
2396 * elf-eh-frame.c: Likewise.
2397 * elf-hppa.h: Likewise.
2398 * elf-m10200.c: Likewise.
2399 * elf-m10300.c: Likewise.
2400 * elf.c: Likewise.
2401 * elf32-arm.h: Likewise.
2402 * elf32-avr.c: Likewise.
2403 * elf32-cris.c: Likewise.
2404 * elf32-d10v.c: Likewise.
2405 * elf32-dlx.c: Likewise.
2406 * elf32-fr30.c: Likewise.
2407 * elf32-frv.c: Likewise.
2408 * elf32-h8300.c: Likewise.
2409 * elf32-hppa.c: Likewise.
2410 * elf32-i370.c: Likewise.
2411 * elf32-i386.c: Likewise.
2412 * elf32-i860.c: Likewise.
2413 * elf32-i960.c: Likewise.
2414 * elf32-ip2k.c: Likewise.
2415 * elf32-iq2000.c: Likewise.
2416 * elf32-m32r.c: Likewise.
2417 * elf32-m68hc11.c: Likewise.
2418 * elf32-m68hc1x.c: Likewise.
2419 * elf32-m68k.c: Likewise.
2420 * elf32-mcore.c: Likewise.
2421 * elf32-mips.c: Likewise.
2422 * elf32-msp430.c: Likewise.
2423 * elf32-openrisc.c: Likewise.
2424 * elf32-ppc.c: Likewise.
2425 * elf32-s390.c: Likewise.
2426 * elf32-sh.c: Likewise.
2427 * elf32-sh64.c: Likewise.
2428 * elf32-sparc.c: Likewise.
2429 * elf32-v850.c: Likewise.
2430 * elf32-vax.c: Likewise.
2431 * elf32-xstormy16.c: Likewise.
2432 * elf32-xtensa.c: Likewise.
2433 * elf64-alpha.c: Likewise.
2434 * elf64-hppa.c: Likewise.
2435 * elf64-mips.c: Likewise.
2436 * elf64-mmix.c: Likewise.
2437 * elf64-ppc.c: Likewise.
2438 * elf64-s390.c: Likewise.
2439 * elf64-sh64.c: Likewise.
2440 * elf64-sparc.c: Likewise.
2441 * elf64-x86-64.c: Likewise.
2442 * elfcode.h: Likewise.
2443 * elflink.h: Likewise.
2444 * elfn32-mips.c: Likewise.
2445 * elfxx-ia64.c: Likewise.
2446 * elfxx-mips.c: Likewise.
2447 * i386linux.c: Likewise.
2448 * ieee.c: Likewise.
2449 * libcoff-in.h: Likewise.
2450 * linker.c: Likewise.
2451 * m68klinux.c: Likewise.
2452 * pdp11.c: Likewise.
2453 * pe-mips.c: Likewise.
2454 * peXXigen.c: Likewise.
2455 * reloc.c: Likewise.
2456 * reloc16.c: Likewise.
2457 * sparclinux.c: Likewise.
2458 * sunos.c: Likewise.
2459 * syms.c: Likewise.
2460 * versados.c: Likewise.
2461 * vms.c: Likewise.
2462 * xcofflink.c: Likewise.
2463 * bfd-in2.h: Regenerate.
2464 * libcoff.h: Regenerate.
2465 * libbfd.h: Regenerate.
2466
2467 2003-06-24 Alan Modra <amodra@bigpond.net.au>
2468
2469 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2470 local sym errors.
2471
2472 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2473 prototypes and casts. Replace PTR with void *. Formatting.
2474 * elf32-ppc.c: Likewise. Break long strings too.
2475 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2476 (ppc_elf_unhandled_reloc): Internationalize error message.
2477 * elf32-ppc.h: Remove PARAMS.
2478
2479 2003-06-23 Mark Mitchell <mark@codesourcery.com>
2480
2481 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2482 APUinfo slots.
2483 (ppc_elf_final_write_processing): Likewise.
2484
2485 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2486
2487 * elflink.h (elf_link_input_bfd): Check raw size when using
2488 kept_section to preserve debug information discarded by
2489 linkonce.
2490
2491 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2492
2493 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2494 (ppc64_elf_setup_section_lists): Set it.
2495 (ppc64_elf_relocate_section): Check sym section id against top_id.
2496 (ppc_build_one_stub): Comment on top_id.
2497
2498 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2499
2500 * config.bfd: Add tic4x-*-rtems*.
2501
2502 2003-06-20 Alan Modra <amodra@bigpond.net.au>
2503
2504 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2505 prototypes and casts. Replace PTR with void *. Format copyright.
2506 Mention ABI links.
2507 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2508 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2509 (ppc_type_of_stub): Make r_type an enum.
2510 (ppc64_elf_size_stubs): Likewise.
2511 * elf64-ppc.h: Remove PARAMS macro.
2512
2513 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2514
2515 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2516 elf hash tab fields.
2517
2518 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2519 (ppc64_elf_info_to_howto): Likewise.
2520 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2521 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2522
2523 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2524
2525 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2526 reloc overflow on discarded eh_frame entries.
2527
2528 2003-06-19 Alan Modra <amodra@bigpond.net.au>
2529
2530 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2531 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2532 Return error condition.
2533 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2534 that have has_gp_reloc set.
2535 (struct ppc_link_hash_table): Add stub_count.
2536 (ppc_build_one_stub): Increment it.
2537 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2538 individual fields.
2539 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2540
2541 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2542
2543 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2544 size calculation from addend. Round size up.
2545
2546 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
2547
2548 * elf32-cris.c (cris_elf_relocate_section) <case
2549 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2550 symbol from a normal object or an undefined weak symbol.
2551
2552 2003-06-18 Alan Modra <amodra@bigpond.net.au>
2553
2554 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2555 R_PPC64_TOC relocs.
2556
2557 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2558
2559 * section.c (struct sec): Put back kept_section.
2560 (STD_SECTION): Put back kept_section initialization.
2561 * bfd-in2.h: Regenerate.
2562
2563 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2564 sections for relocateable output. Use kept_section to preserve
2565 debug information discarded by linkonce.
2566
2567 2003-06-17 Roland McGrath <roland@redhat.com>
2568
2569 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2570 segment-relative relocation between different segments.
2571
2572 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2573
2574 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2575 optimizations earlier.
2576
2577 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2578 Restore previous input_list type.
2579 (ppc64_elf_link_hash_table_create): Undo last change.
2580 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2581 per output section, but don't bother with bfd_abs_section marker.
2582 (ppc64_elf_next_input_section): Adjust for multiple input section
2583 lists.
2584 (group_sections): Likewise.
2585
2586 2003-06-17 Jakub Jelinek <jakub@redhat.com>
2587
2588 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2589 *r_offset == r_addend for RELATIVE relocs against .got.
2590
2591 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2592
2593 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2594
2595 2003-06-17 Nick Clifton <nickc@redhat.com>
2596
2597 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
2598 in the vtable_entries_used array to allow for the accessing
2599 the largest element.
2600
2601 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2602
2603 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2604 input_list.
2605 (ppc64_elf_link_hash_table_create): Init input_list here.
2606 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2607 per output section. Set toc_off for abs and other standard sections.
2608 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2609 (ppc64_elf_next_input_section): Adjust for single input section list.
2610 Don't set toc_curr from input bfds that haven't set elf_gp.
2611 (group_sections): Adjust for single input section list.
2612
2613 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2614
2615 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2616
2617 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2618 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2619 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2620 got section for RELATIVE relocs. Fix wrong comment. Change condition
2621 under which dynamic relocs update the section contents.
2622
2623 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2624
2625 * config.bfd: Add i386-netbsd-gnu target.
2626
2627 2003-06-12 Nick Clifton <nickc@redhat.com>
2628
2629 * opncls.c (calc_crc32): Rename to
2630 bfd_calc_gnu_debuglink_crc32 and export.
2631 (GNU_DEBUGLINK): Define and use to replace occurrences of
2632 hard-coded ".gnu_debuglink" in the code.
2633 (get_debug_link_info): Prevent aborts by replacing call to
2634 xmalloc with a call to malloc.
2635 (find_separate_debug_file): Prevent aborts by replacing calls
2636 to xmalloc and xstrdup with calls to malloc and strdup.
2637 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2638 section to a bfd.
2639 * bfd-in2.h: Regenerate.
2640
2641 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2642
2643 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2644 New target (was i[3-7]86-*-openbsd* before).
2645 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2646 (vax-*-openbsd*): New target.
2647
2648 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2649
2650 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2651 for n32, too.
2652 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2653 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2654 (mips_elf_create_got_section): Likewise.
2655 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2656
2657 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2658
2659 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2660 (elf_mips_howto_table_rel): Use it.
2661 (gprel32_with_gp): Move prototype.
2662 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2663 Use mips_elf_generic_reloc.
2664 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2665 Code cleanup.
2666 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2667 zero addend.
2668 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2669 as in the other *_gprel*_reloc functions.
2670 (gprel32_with_gp): Handle partial_inplace properly.
2671 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2672 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2673 Do addend handling directly instead of calling
2674 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2675 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2676 of zero addend. Handle partial_inplace properly.
2677 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2678 addend.
2679 (mips_elf64_gprel16_reloc): Likewise.
2680 (mips_elf64_literal_reloc): Likewise.
2681 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2682 logic as in the other *_gprel*_reloc functions. Handle
2683 partial_inplace properly.
2684 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2685 addend. Handle partial_inplace properly.
2686 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2687 of calling _bfd_mips_elf_gprel16_with_gp.
2688 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2689 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2690 of zero addend.
2691 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2692 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2693 of calling _bfd_mips_elf_gprel16_with_gp.
2694 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2695 partial_inplace properly. Fix wrong addend handling. Fix overflow
2696 check.
2697 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2698 exported.
2699 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2700 (_bfd_mips_elf_relocate_section): Likewise.
2701 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2702 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2703 (_bfd_mips_elf_sign_extend): New prototype.
2704
2705 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2706
2707 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2708 New target (was sparc-*-openbsd* before).
2709 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2710
2711 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2712 * configure: Regenerate.
2713
2714 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2715
2716 * po/Make-in (DESTDIR): New.
2717 (install-data-yes): Support $(DESTDIR).
2718 (uninstall): Likewise.
2719
2720 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2721
2722 * Makefile.am (config.status): Depend on version.h.
2723 Run "make dep-am".
2724 * Makefile.in: Regenerate.
2725 * po/SRC-POTFILES.in: Regenerate.
2726
2727 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2728 Gary Hade <garyhade@us.ibm.com>
2729
2730 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2731
2732 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2733
2734 * archures.c (bfd_mach_h8300sxn): New architecture.
2735 * bfd-in2.h: Regenerate.
2736 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2737 (h8300sxn_info_struct): New.
2738 (h8300sx_info_struct): Link to it.
2739 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2740 (elf32_h8_final_write_processing): Likewise.
2741
2742 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2743
2744 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2745 elfxx-target.h so that we can use elf_backend_got_header_size.
2746 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2747 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2748 associated macros.
2749 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2750 dst_mask.
2751 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2752 ppc_stub_plt_branch_r2off.
2753 (struct ppc_stub_hash_entry): Reorganize.
2754 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2755 toc_curr, toc_off and emit_stub_syms.
2756 (ppc64_elf_link_hash_table_create): Init them.
2757 (ppc_stub_name): Correct string size.
2758 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2759 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2760 used.
2761 (ppc_type_of_stub): Tweak root.type test.
2762 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2763 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2764 ppc_stub_plt_branch_r2off.
2765 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2766 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2767 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2768 Initialize elf_gp and toc_curr.
2769 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2770 (ppc64_elf_next_input_section): Set toc_off.
2771 (group_sections): Ensure groups have the same TOC.
2772 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2773 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2774 Build new glink stub.
2775 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2776 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2777 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2778 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2779 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2780 (STD_SECTION): Update.
2781 * ecoff.c (bfd_debug_section): Update comment.
2782 * bfd-in2.h: Regenerate.
2783
2784 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2785
2786 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2787 NULL function pointers.
2788
2789 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2790
2791 * simple.c (bfd_simple_get_relocated_section_contents): Call
2792 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2793
2794 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2795
2796 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2797 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2798 swaptables.
2799 * coff-tic4x.c: Ditto
2800 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2801 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2802 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2803 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2804 swap tables.
2805 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2806 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2807 * coff-apollo.c: Ditto
2808 * coff-arm.c: Ditto
2809 * coff-h8300.c: Ditto
2810 * coff-h8500.c: Ditto
2811 * coff-i960.c: Ditto
2812 * coff-m68k.c: Ditto
2813 * coff-m88k.c: Ditto
2814 * coff-mcore.c: Ditto
2815 * coff-sh.c: Ditto
2816 * coff-sparc.c: Ditto
2817 * coff-tic80.c: Ditto
2818 * coff-we32k.c: Ditto
2819 * coff-z8k.c: Ditto
2820 * coff-w65.c: Ditto
2821
2822 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2823
2824 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2825 initialization bug
2826
2827 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2828
2829 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2830 (bfd_section_from_phdr): Likewise.
2831 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2832 (get_program_header_size): Count with PT_GNU_STACK.
2833 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2834 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2835
2836 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2837
2838 * elflink.h (elf_link_input_bfd): Call linker error_handler
2839 for discarded definitions.
2840
2841 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2842
2843 * syms.c (decode_section_type): Return 'n' if section flags are
2844 SEC_HAS_CONTENTS && SEC_READONLY.
2845
2846 2003-06-03 Nick Clifton <nickc@redhat.com>
2847
2848 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2849 R_V850_ABS32. Add entry for R_V850_REL32.
2850 (v850_elf_reloc_map): Likewise.
2851 (v850_elf_check_relocs): Likewise.
2852 (v850_elf_perform_relocation): Likewise.
2853 (v850_elf_final_link_relocate): Likewise. Include computation
2854 to make R_V850_REl32 pc-relative.
2855
2856 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2857
2858 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2859 and DT_DEBUG dynamic tag even for position independent executables.
2860 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2861
2862 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2863
2864 * config.bfd: Move obsolete entries out of the range of the
2865 targmatch sed script.
2866
2867 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2868
2869 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2870
2871 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2872
2873 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2874 plt entries, not just 8191.
2875
2876 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2877
2878 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2879 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2880
2881 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2882 Jakub Jelinek <jakub@redhat.com>
2883
2884 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2885 instead of info->shared where appropriate.
2886 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2887 * elflink.c (_bfd_elf_create_got_section): Likewise.
2888 (_bfd_elf_link_create_dynamic_sections): Likewise.
2889 (_bfd_elf_link_assign_sym_version): Likewise.
2890 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2891 and DT_DEBUG dynamic tag even for position independent executables.
2892 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2893 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2894 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2895 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2896 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2897 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2898 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2899 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2900 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2901
2902 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2903
2904 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2905 signalled thread.
2906 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2907
2908 2003-05-29 Nick Clifton <nickc@redhat.com>
2909
2910 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2911 Tidy up formatting.
2912 * Makefile.am: Add dependency on safe-ctype.h.
2913 * Makefile.in: Regenerate.
2914
2915 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2916
2917 * elfxx-mips.c: Don't force symbols local unconditionally.
2918
2919 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2920
2921 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2922 undefined_symbol call.
2923
2924 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2925
2926 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2927 (mips_elf_link_hash_table): Likewise.
2928
2929 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2930
2931 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2932 R_MIPS_GNU_REL16_S2 support.
2933 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2934 (mips_elf64_rtype_to_howto): Use it.
2935 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2936 R_MIPS_GNU_REL16_S2 support.
2937 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2938 (mips_elf_n32_rtype_to_howto): Use it.
2939
2940 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2941
2942 * som.h: Define PA_2_0 before including a.out.h
2943
2944 2003-05-07 Eric Christopher <echristo@redhat.com>
2945 Alexandre Oliva <aoliva@redhat.com>
2946
2947 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2948 pic tests, change to warning.
2949 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2950
2951 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2952
2953 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2954 well as shle-...-netbsdelf. Remove duplicate entry.
2955
2956 2003-05-21 Nick Clifton <nickc@redhat.com>
2957
2958 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2959 for X_STORMY16_REL_12 reloc.
2960
2961 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2962 the type of the hash table in the bfd_link_info structure.
2963 (bfd_elf_get_runpath_list): Likewise.
2964
2965 2003-05-19 Roland McGrath <roland@redhat.com>
2966
2967 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2968 * bfd-in.h: Declare it.
2969 * bfd-in2.h: Regenerated.
2970 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2971 * elf-bfd.h (struct elf_backend_data): New function pointer member
2972 elf_backend_bfd_from_remote_memory.
2973 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2974 Declare them.
2975 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2976 (elfNN_bed): Add that to the initializer.
2977
2978 2003-05-15 Roland McGrath <roland@redhat.com>
2979
2980 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2981
2982 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2983
2984 * elflink.h (elf_link_output_extsym): Only issue error about !=
2985 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2986
2987 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2988
2989 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2990 when removing the old definition for symbols with non-default
2991 visibility.
2992
2993 2003-05-18 Jason Eckhardt <jle@rice.edu>
2994
2995 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2996
2997 2003-05-17 Andreas Schwab <schwab@suse.de>
2998
2999 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
3000 elf_section_data during processing of pc-relative and absolute
3001 relocations.
3002 (elf_m68k_relocate_section): Use the cached reloc section instead
3003 of computing it again. Fix handling of visibility. Don't modify
3004 addend when copying over a relocation into the output.
3005
3006 2003-05-17 Alan Modra <amodra@bigpond.net.au>
3007
3008 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3009 to trim plt entries. Move undefweak non-default visibility test..
3010 (allocate_dynrelocs): ..from here.
3011 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
3012 dynamic_sections_created here. Update comment. Move undefweak
3013 non-default visibility test..
3014 (allocate_dynrelocs): ..from here. Fix comment.
3015 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
3016 to trim plt entries. Move undefweak non-default visibility test..
3017 (allocate_dynrelocs): ..from here. Fix comment.
3018 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
3019 STV_DEFAULT rather than comparing with zero.
3020 * elflink.c (_bfd_elf_merge_symbol): Likewise.
3021 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
3022
3023 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3024
3025 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
3026 pointers.
3027 (_bfd_set_gp_value): Likewise.
3028
3029 2003-05-16 Michael Snyder <msnyder@redhat.com>
3030 From Bernd Schmidt <bernds@redhat.com>
3031 * archures.c (bfd_mach_h8300sx): New.
3032 * bfd-in2.h: Regenerate.
3033 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
3034 (h8300sx_info_struct): New.
3035 (h8300s_info_struct): Link to it.
3036 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
3037 (elf32_h8_final_write_processing): Likewise.
3038 (elf32_h8_relax_section): Likewise.
3039
3040 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
3041
3042 * config.bfd: Accept i[3-7]86 variants.
3043 * configure.host: Likewise.
3044 * configure.in: Likewise.
3045 * configure: Regenerate.
3046
3047 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3048
3049 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
3050 symbol.
3051
3052 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
3053
3054 * elflink.h (elf_link_check_versioned_symbol): Also allow
3055 the base version.
3056
3057 2003-05-15 Alan Modra <amodra@bigpond.net.au>
3058 H.J. Lu <hongjiu.lu@intel.com>
3059
3060 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
3061 (elf_i386_relocate_section): Likewise.
3062 * elf32-ppc.c (allocate_dynrelocs): Likewise.
3063 (ppc_elf_relocate_section): Likewise.
3064 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3065 (ppc64_elf_relocate_section): Likewise.
3066
3067 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3068
3069 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
3070
3071 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
3072
3073 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
3074 processor capability, allow merge of HC12 and HCS12 in some cases.
3075 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
3076 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
3077 (bfd_m68hc12_arch): Link it.
3078 (scan_mach): New function.
3079
3080 2003-05-13 Andrew Haley <aph@redhat.com>
3081
3082 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
3083
3084 2003-05-13 Alan Modra <amodra@bigpond.net.au>
3085 H.J. Lu <hongjiu.lu@intel.com>
3086
3087 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
3088 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
3089 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
3090 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
3091 (ppc_elf_relocate_section): Likewise.
3092 * elf64-ppc.c (allocate_dynrelocs): Likewise.
3093 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
3094 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
3095 relocs need no other types.
3096 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
3097 dynreloc check.
3098 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
3099 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
3100 .got relocs.
3101
3102 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3103
3104 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
3105 copy ELF_LINK_NON_GOT_REF from weakdef.
3106 (allocate_dynrelocs): For undef weak syms with non-default
3107 visibility, a) don't allocate plt entries, b) don't allocate
3108 .got relocs, c) discard dyn rel space
3109 (sh_elf_relocate_section): d) don't generate .got relocs, e)
3110 don't generate dynamic relocs.
3111 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
3112 for weakdefs when symbol already adjusted.
3113
3114 2003-05-12 Nick Clifton <nickc@redhat.com>
3115
3116 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
3117 overflow detection for R_XSTORMY16_16 reloc.
3118
3119 2003-05-12 Paul Clarke <paulc@senet.com.au>
3120
3121 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
3122
3123 2003-05-11 Jason Eckhardt <jle@rice.edu>
3124
3125 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
3126 adjust upper bits.
3127 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
3128 proper place.
3129 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
3130 proper place.
3131
3132 2003-05-11 Andreas Schwab <schwab@suse.de>
3133
3134 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
3135 complicated tests for unresolvable relocs with a simple direct
3136 scheme using "unresolved_reloc" var. Report some detail on
3137 bfd_reloc_outofrange and similar errors.
3138
3139 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3140
3141 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
3142 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
3143 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3144 * elf64-s390.c: Likewise.
3145
3146 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3147
3148 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
3149 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
3150 ELF_LINK_NON_GOT_REF from weakdef.
3151 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
3152 already been adjusted before treating it specially.
3153 * el64-s390.c: Likwise.
3154
3155 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3156
3157 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
3158 non-default visibility, a) don't make them dynamic, b) discard
3159 space for dynamic relocs.
3160 (elf_s390_relocate_section): Initialize the GOT entries and skip
3161 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
3162 symbols with non-default visibility.
3163 * elf64-s390.c: Likewise.
3164
3165 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3166
3167 * cpu-arm.c (arm_check_note): Warning fix.
3168 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
3169 to keep relocs if edited.
3170 (iq2000_elf_print_private_bfd_data): Return TRUE.
3171 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
3172 ELF64_R_SYM.
3173 (elfNN_ia64_relax_ldxmov): Warning fix.
3174 * xtensa-isa.c (xtensa_add_isa): Warning fix.
3175 * xtensa-modules.c (get_num_opcodes): Warning fix.
3176
3177 2003-05-09 Andrey Petrov <petrov@netbsd.org>
3178
3179 * elf.c (elf_fake_sections): Use correct cast for sh_name.
3180
3181 2003-05-09 Alan Modra <amodra@bigpond.net.au>
3182
3183 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
3184 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
3185 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
3186 (bfd_elf_record_link_assignment): Move from elflink.h.
3187 (_bfd_elf_merge_symbol): Likewise.
3188 (_bfd_elf_add_default_symbol): Likewise.
3189 (_bfd_elf_export_symbol): Likewise.
3190 (_bfd_elf_link_find_version_dependencies): Likewise.
3191 (_bfd_elf_link_assign_sym_version): Likewise.
3192 (_bfd_elf_link_read_relocs): Likewise.
3193 (_bfd_elf_link_size_reloc_section): Likewise.
3194 (_bfd_elf_fix_symbol_flags): Likewise.
3195 (_bfd_elf_adjust_dynamic_symbol): Likewise.
3196 (_bfd_elf_link_sec_merge_syms): Likewise.
3197 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
3198 and bed->s->sizeof_rela.
3199 (_bfd_elf_link_output_relocs): Likewise.
3200 * elf-bfd.h (struct elf_size_info): Rename file_align to
3201 log_file_align.
3202 (struct elf_info_failed): Move from elflink.h.
3203 (struct elf_assign_sym_version_info): Likewise.
3204 (struct elf_find_verdep_info): Likewise.
3205 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
3206 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
3207 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
3208 _bfd_elf_link_assign_sym_version,
3209 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
3210 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
3211 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
3212 _bfd_elf_link_sec_merge_syms): Declare.
3213 (bfd_elf32_link_create_dynamic_sections): Don't declare.
3214 (_bfd_elf32_link_read_relocs): Likewise.
3215 (bfd_elf64_link_create_dynamic_sections): Likewise.
3216 (_bfd_elf64_link_read_relocs): Likewise.
3217 * elflink.h: Move lots o' stuff elsewhere.
3218 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
3219 (bfd_elf64_record_link_assignment): Likewise.
3220 (bfd_elf_record_link_assignment): Declare.
3221 * bfd-in2.h: Regenerate.
3222 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
3223 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
3224 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
3225 (assign_file_positions_for_segments): Likewise.
3226 (assign_file_positions_except_relocs): Likewise.
3227 (swap_out_syms, elfcore_write_note): Likewise.
3228 * elf-m10200.c: Adjust for changed function names.
3229 * elf-m10300.c: Likewise.
3230 * elf32-arm.h: Likewise.
3231 * elf32-h8300.c: Likewise.
3232 * elf32-hppa.c: Likewise.
3233 * elf32-ip2k.c: Likewise.
3234 * elf32-m32r.c: Likewise.
3235 * elf32-m68hc11.c: Likewise.
3236 * elf32-m68hc1x.c: Likewise.
3237 * elf32-m68k.c: Likewise.
3238 * elf32-mips.c: Likewise.
3239 * elf32-ppc.c: Likewise.
3240 * elf32-sh.c: Likewise.
3241 * elf32-v850.c: Likewise.
3242 * elf32-xtensa.c: Likewise.
3243 * elf64-alpha.c: Likewise.
3244 * elf64-hppa.c: Likewise.
3245 * elf64-mmix.c: Likewise.
3246 * elf64-ppc.c: Likewise.
3247 * elf64-sh64.c: Likewise.
3248 * elfxx-ia64.c: Likewise.
3249 * elfxx-mips.c: Likewise.
3250 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
3251 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
3252 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3253 * elf64-mips.c (mips_elf64_size_info): Likewise.
3254 * elf64-s390.c (s390_elf64_size_info): Likewise.
3255 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3256
3257 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
3258
3259 * elflink.h (elf_add_default_symbol): After skipping the
3260 unversioned symbol, go to non-default one.
3261
3262 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3263
3264 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
3265 want_plt field.
3266 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
3267 for symbols with non-default visibility.
3268
3269 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
3270
3271 * elflink.h (elf_link_check_versioned_symbol): Also handle the
3272 case that a DSO references a hidden symbol which may be
3273 satisfied by a versioned symbol in another DSO.
3274 (elf_link_output_extsym): Check versioned definition for hidden
3275 symbol referenced by a DSO.
3276
3277 2003-05-07 Nick Clifton <nickc@redhat.com>
3278
3279 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
3280 R_XSTORMY16_16 reloc to ignore overflows.
3281
3282 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
3283
3284 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
3285 error message for mixing different-endian files. Check for ABI
3286 compatibility of input files with the selected emulation.
3287
3288 2003-05-05 Alan Modra <amodra@bigpond.net.au>
3289
3290 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3291 non-default visibility, a) don't make them dynamic, b) discard
3292 space for dynamic relocs.
3293 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3294
3295 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3296 non-default visibility, a) don't allocate plt entries, b) don't
3297 allocate .got relocs, c) discard dyn rel space,
3298 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3299 don't generate dynamic relocs.
3300 * elf64-ppc.c (allocate_dynrelocs): As above.
3301 (ppc64_elf_relocate_section): As above.
3302
3303 2003-05-05 Andreas Jaeger <aj@suse.de>
3304
3305 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3306 relocation entries for weak undefined symbols with non-default
3307 visibility.
3308 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3309 skip R_386_32/R_386_PC32 for weak undefined symbols with
3310 non-default visibility.
3311
3312 2003-05-04 H.J. Lu <hjl@gnu.org>
3313
3314 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3315 relocation entries for weak undefined symbols with non-default
3316 visibility.
3317 (elf_i386_relocate_section): Initialize the GOT entries and
3318 skip R_386_32/R_386_PC32 for weak undefined symbols with
3319 non-default visibility.
3320
3321 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3322 descriptors for weak undefined symbols with non-default
3323 visibility.
3324 (allocate_dynrel_entries): Don't allocate relocation entries
3325 for symbols resolved to 0.
3326 (set_got_entry): Don't install dynamic relocation for weak
3327 undefined symbols with non-default visibility.
3328 (set_pltoff_entry): Likewise.
3329
3330 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3331 with non-default visibility.
3332 (elf_link_output_extsym): Don't make weak undefined symbols
3333 with non-default visibility dynamic.
3334
3335 2003-05-04 H.J. Lu <hjl@gnu.org>
3336
3337 * elflink.h (elf_merge_symbol): Correctly handle weak definition.
3338
3339 2003-05-04 H.J. Lu <hjl@gnu.org>
3340
3341 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3342 symbol dynamic. Check indirection when removing the old
3343 definition for symbols with non-default visibility.
3344 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3345
3346 2003-05-02 Nick Clifton <nickc@redhat.com>
3347
3348 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3349 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3350 unsigned overflow.
3351
3352 2003-05-02 Andreas Jaeger <aj@suse.de>
3353
3354 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3355 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3356 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3357 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3358 ELF_LINK_NON_GOT_REF from weakdef.
3359
3360 2003-05-02 Charles Lepple <clepple@ghz.cc>
3361 Nick Clifton <nickc@redhat.com>
3362
3363 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3364 * aclocal.m4: Regenerate.
3365 * configure: Regenerate.
3366 * Makefile.in: Regenerate.
3367
3368 2003-05-01 Alan Modra <amodra@bigpond.net.au>
3369
3370 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3371 weakdef sym has already been adjusted before treating it specially.
3372 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3373 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3374 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3375 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
3376
3377 2003-04-28 H.J. Lu <hjl@gnu.org>
3378
3379 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3380 the relax finalize pass.
3381
3382 * section.c (struct sec): Add need_finalize_relax and remove
3383 flag11.
3384 (STD_SECTION): Update struct sec initializer.
3385 * bfd-in2.h: Regenerated.
3386
3387 2003-04-28 H.J. Lu <hjl@gnu.org>
3388
3389 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3390 to copy any information related to dynamic linking when we flip
3391 the indirection.
3392
3393 2003-04-27 H.J. Lu <hjl@gnu.org>
3394
3395 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3396 (ELF_LINK_DYNAMIC_WEAK): New.
3397
3398 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3399 a symbol should be skipped. Ignore definitions in dynamic
3400 objects for symbols with non-default visibility.
3401 (elf_add_default_symbol): Adjusted.
3402 (elf_link_add_object_symbols): Check if a symbol should be
3403 skipped. Don't merge the visibility field with the one from
3404 a dynamic object.
3405 (elf_link_check_versioned_symbol): Use undef_bfd.
3406 (elf_link_output_extsym): Warn if a forced local symbol is
3407 referenced from dynamic objects. Make non-weak undefined symbol
3408 with non-default visibility a fatal error.
3409
3410 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
3411
3412 * configure.in: Bump version on HEAD to 2.14.90.
3413 * configure: Regenerated.
3414
3415 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3416
3417 PR savannah/3331:
3418 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3419 when we couldn't relax something.
3420
3421 2003-04-25 Alan Modra <amodra@bigpond.net.au>
3422
3423 * elflink.h (elf_merge_symbol): When we find a regular definition
3424 for an indirect symbol, flip the indirection so that the old
3425 direct symbol now points to the new definition.
3426
3427 2003-04-24 Roland McGrath <roland@redhat.com>
3428
3429 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3430
3431 2003-04-24 Alan Modra <amodra@bigpond.net.au>
3432
3433 * elf32-ppc.c: Formatting and comment fixes.
3434 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3435 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3436
3437 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
3438
3439 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3440 * bfd-in2.h: Rebuilt.
3441 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
3442 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
3443 & H8300SNMAGIC.
3444 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3445 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3446 (h8300sn_info_struct, h8300hn_info_struct): New.
3447 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3448 (elf32_h8_final_write_processing): Likewise.
3449
3450 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3451
3452 * elf32-sh.c (tpoff): New.
3453 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3454 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3455 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
3456 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
3457 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
3458 (dtpoff_base): Fix wrong indentation.
3459 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3460 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3461 R_SH_TLS_TPOFF32 relocations.
3462
3463 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3464
3465 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3466 * cpu-sh.c: Likewise.
3467 * elf32-sh.c: Likewise.
3468 * reloc.c (bfd_reloc_code_real): Likewise.
3469 * elf32-sh64-com.c: Change comment to refer to SuperH.
3470 * elf32-sh64.c: Likewise.
3471 * elf64-sh64.c: Likewise.
3472 * bfd-in2.h (enum bfd_architecture): Regenerate.
3473
3474 2003-04-23 Alan Modra <amodra@bigpond.net.au>
3475
3476 From Julien LEMOINE <speedblue@debian.org>
3477 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3478 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3479
3480 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3481
3482 * archures.c: Replace references to Mitsubishi M32R with references
3483 to Renesas M32R.
3484 * relocs.c: Likewise.
3485 * bfd-in2.h: Regenerate.
3486
3487 2003-04-21 Richard Henderson <rth@redhat.com>
3488
3489 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3490 executable when a symbol is defined both regular and dynamic.
3491
3492 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3493
3494 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3495 (elf32-m68hc1x.lo): Update dependencies
3496 * configure.in: Add elf32-m68hc1x.lo.
3497 * configure: Rebuild.
3498 * Makefile.in: Rebuild.
3499
3500 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3501
3502 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3503 (m68hc11_elf_hash_table_create): New function.
3504 (elf32_m68hc11_link_hash_table_free): New function.
3505 (stub_hash_newfunc): New function.
3506 (m68hc11_add_stub): New function.
3507 (elf32_m68hc11_add_symbol_hook): New function.
3508 (elf32_m68hc11_setup_section_lists): New function.
3509 (elf32_m68hc11_next_input_section): New function.
3510 (elf32_m68hc11_size_stubs): New function.
3511 (elf32_m68hc11_build_stubs): New function.
3512 (m68hc11_get_relocation_value): New function.
3513 (elf32_m68hc11_relocate_section): Call the above to redirect
3514 some relocations to the trampoline code.
3515 (m68hc11_elf_export_one_stub): New function.
3516 (m68hc11_elf_set_symbol): New function.
3517 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3518 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3519 is not yet initialized.
3520
3521 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3522 (elf32_m68hc11_stub_hash_entry): New struct.
3523 (m68hc11_page_info): Add trampoline handler address.
3524 (m68hc11_elf_link_hash_table): Add stubs generation members.
3525 (elf32_m68hc11_add_symbol_hook): Declare.
3526 (elf32_m68hc11_setup_section_lists): Declare.
3527 (elf32_m68hc11_size_stubs): Declare.
3528 (elf32_m68hc11_build_stubs): Declare.
3529
3530 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3531 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3532 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3533 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3534 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3535 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3536 (bfd_elf32_bfd_link_hash_table_create): Define.
3537 (elf_backend_add_symbol_hook): Define.
3538 (m68hc11_elf_bfd_link_hash_table_create): New function.
3539 (m68hc11_elf_build_one_stub): New function.
3540 (m68hc11_elf_size_one_stub): New function.
3541 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3542 (bfd_elf32_bfd_link_hash_table_create): Define.
3543
3544 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3545 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3546 (m68hc12_phys_addr): Ditto.
3547 (m68hc12_phys_page): Ditto.
3548 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3549 (elf32_m68hc11_gc_mark_hook): Likewise.
3550 (elf32_m68hc11_gc_sweep_hook): Likewise.
3551 (elf32_m68hc11_check_relocs): Likewise.
3552 (elf32_m68hc11_relocate_section): Likewise.
3553 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3554 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3555 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3556 (m68hc12_elf_build_one_stub): New function.
3557 (m68hc12_elf_size_one_stub): New function.
3558 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3559 (elf_backend_add_symbol_hook): Define.
3560 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3561
3562 2003-04-18 Nick Clifton <nickc@redhat.com>
3563
3564 * format.c (bfd_check_format_matches): Only check associated
3565 vector if the matching_vector has been created.
3566
3567 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
3568
3569 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3570 2003-04-09's change.
3571
3572 2003-04-15 Brian Ford <ford@vss.fsi.com>
3573
3574 * peicode.h (coff_swap_scnhdr_in): If a section holds
3575 uninitialized data and is from an object file or from an
3576 executable image that has not initialized the s_size field, or if
3577 the physical size is padded, use the virtual size (stored in
3578 s_paddr) instead.
3579
3580 2003-04-15 H.J. Lu <hjl@gnu.org>
3581
3582 * elflink.h (elf_link_add_object_symbols): Properly report
3583 filename for alignment reduction.
3584
3585 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3586
3587 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3588 * reloc.c: Likewise.
3589 * coff-h8300.c: Likewise.
3590 * coff-h8500.c: Likewise.
3591 * coff-sh.c: Likewise.
3592 * cpu-h8300.c: Likewise.
3593 * cpu-sh.c: Likewise.
3594 * elf32-h8300.c: Likewise.
3595 * elf32-sh.c: Likewise.
3596 * elf32-sh64-com.c: Likewise.
3597 * elf32-sh64.c: Likewise.
3598 * elf64-sh64.c: Likewise.
3599 * bfd-in2.h: Regenerate.
3600
3601 2003-04-14 H.J. Lu <hjl@gnu.org>
3602
3603 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3604 alignment for common symbols. Warn reducing alignment for
3605 common symbols. Report old filename when symbol size changes.
3606
3607 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3608
3609 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3610 occurrences of the same test changed in the previous patch.
3611 Optimize.
3612
3613 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3614
3615 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3616 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3617 GOT_DISP/addend only if the symbol got a global GOT entry.
3618
3619 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3620
3621 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3622 GOT_PAGE/GOT_OFST referencing overridable symbol to
3623 GOT_DISP/addend.
3624 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3625 global symbol as GOT_DISP.
3626
3627 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3628
3629 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3630 next relocation on an undefined symbol.
3631
3632 2003-04-09 Richard Henderson <rth@redhat.com>
3633
3634 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3635 Ignore relocations against r_symndx == 0.
3636
3637 2003-04-09 H.J. Lu <hjl@gnu.org>
3638
3639 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3640 FALSE for undefined symbols.
3641 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3642
3643 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3644
3645 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3646 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3647 addr_size.
3648
3649 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3650
3651 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3652 pointer size from ABI, not arch_bits_per_address.
3653
3654 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3655
3656 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3657 constants for n32 ABI.
3658
3659 2003-04-06 Andrew Cagney <cagney@redhat.com>
3660
3661 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3662 free that leads to GDB vs BFD memory corruption.
3663
3664 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3665
3666 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3667 symbols that mark the end of the section.
3668 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3669 converting to a relative branch so that the offset is computed after
3670 the relaxation; also relocate a jsr into a bsr if possible but don't
3671 relax them if they are to a far symbol as we need to call the
3672 trampoline code.
3673 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3674
3675 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3676
3677 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3678 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3679 * bfd-in2.h: Regenerate
3680 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3681 * cpu-tic4x.c: Ditto
3682
3683 2003-04-03 Nick Clifton <nickc@redhat.com>
3684
3685 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3686 differently for object files and executables.
3687 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3688 for object files or for executables who have not already
3689 initialised the field.
3690 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3691 the PE format bfd is an executable.
3692
3693 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3694
3695 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3696 here as it's too early to reliably determine locality.
3697 (ppc_elf_gc_sweep_hook): Likewise.
3698 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3699
3700 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3701
3702 * xtensa-modules.c: Remove comment indicating that this is a
3703 generated file.
3704
3705 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3706
3707 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3708
3709 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3710
3711 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3712 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3713 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3714 xtensa-modules.lo.
3715 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3716 xtensa-modules.c.
3717 (cpu-xtensa.lo): New target.
3718 (elf32-xtensa.lo): Likewise.
3719 (xtensa-isa.lo): Likewise.
3720 (xtensa-modules.lo): Likewise.
3721 * Makefile.in: Regenerate.
3722 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3723 (bfd_archures_list): Add bfd_xtensa_arch.
3724 * config.bfd: Handle xtensa-*-*.
3725 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3726 * configure: Regenerate.
3727 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3728 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3729 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3730 (bfd_elf32_xtensa_le_vec): Likewise.
3731 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3732 * cpu-xtensa.c: New file.
3733 * elf32-xtensa.c: Likewise.
3734 * xtensa-isa.c: Likewise.
3735 * xtensa-modules.c: Likewise.
3736 * libbfd.h: Regenerate.
3737 * bfd-in2.h: Likewise.
3738
3739 2003-04-01 Nick Clifton <nickc@redhat.com>
3740
3741 * archures.c (bfd_mach_arm_unknown): Define.
3742 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3743 bfd_arm_get_mach_from_notes): Prototype.
3744 * bfd-in2.h: Regenerate.
3745 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3746 bfd_arm_merge_machines.
3747 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3748 * coffcode.h (coff_set_arch_mach_hook): Call
3749 bfd_arm_get_mach_from_notes.
3750 * coffgen.c (coff_real_object_p): Revert previous delta.
3751 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3752 .note section.
3753 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3754 binaries compiled for different architectures..
3755 (bfd_arm_update_notes): New function: Update an ARM note section.
3756 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3757 number from an ARM note section.
3758 * elf32-arm.h (elf32_arm_object_p): Use
3759 bfd_arm_get_mach_from_notes.
3760 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3761 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3762
3763 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3764
3765 * dwarf2.c (read_attribute_value): Correct typo in comment.
3766
3767 2003-04-01 Nick Clifton <nickc@redhat.com>
3768
3769 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3770 instead of concat().
3771 (decode_line_info): Only free filename if it is not NULL.
3772 (add_line_info): Make a copy of the filename when storing it into
3773 the info structure.
3774
3775 2003-03-31 Andreas Schwab <schwab@suse.de>
3776 Daniel Jacobowitz <drow@mvista.com>
3777
3778 * simple.c (bfd_simple_get_relocated_section_contents): Add
3779 parameter symbol_table. Optionally use it instead of the symbol
3780 table from the bfd. Save and restore output offsets and output
3781 sections around bfd_get_relocated_section_contents. Fix a memory
3782 leak.
3783 (simple_save_output_info, simple_restore_output_info): New
3784 functions.
3785 * bfd-in2.h: Regenerate.
3786 * dwarf2.c (read_abbrevs): Use
3787 bfd_simple_get_relocated_section_contents instead of
3788 bfd_get_section_contents.
3789 (decode_line_info): Likewise.
3790 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3791 find_rela_addend.
3792 (find_rela_addend): Remove.
3793 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3794 debugging sections.
3795 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3796 not bfd_zalloc.
3797
3798 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3799
3800 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3801 bfd_alloc.
3802 * dwarf2.c (concat_filename): Always allocate space for the
3803 returned filename.
3804 (decode_line_info): Free the allocated filename returned by
3805 concat_filename.
3806 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3807 * elf.c (copy_private_bfd_data): Likewise.
3808 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3809 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3810 * format.c (bfd_check_format_matches): Likewise.
3811 * linker.c (bfd_generic_final_link): Likewise.
3812 * opncls.c (find_separate_debug_info): Likewise.
3813 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3814
3815 2003-03-28 H.J. Lu <hjl@gnu.org>
3816
3817 * elflink.h (elf_link_add_object_symbols): Correctly combine
3818 visibilities.
3819
3820 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3821
3822 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3823 to -1 before recomputing got offsets.
3824
3825 2003-03-26 Andreas Schwab <schwab@suse.de>
3826
3827 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3828 (elf_m68k_relocate_section): Use it to correctly handle symbols
3829 forced to be local.
3830 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3831 entries for symbols that are forced to be local.
3832
3833 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3834
3835 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3836 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3837 * elfn32-mips.c, elf64-mips.c: Use it.
3838
3839 2003-03-25 Stan Cox <scox@redhat.com>
3840 Nick Clifton <nickc@redhat.com>
3841
3842 Contribute support for Intel's iWMMXt chip - an ARM variant:
3843
3844 * archures.c: Add bfd_mach_arm_iWMMXt.
3845 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3846 * bfd-in2.h: Regenerate.
3847 * libbfd.h: Regenerate.
3848 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3849 object files to be linked with XScale ones.
3850 (coff_arm_final_link_postscript): Update note section.
3851 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3852 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3853 after identifying a coff binary.
3854 * cpu-arm.c (processors): Add iWMMXt.
3855 (arch_inf): Likewise.
3856 * elf32-arm.h (arm_object_p): Handle note section.
3857 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3858 be linked with XScale ones.
3859 (elf32_arm_section_flags): New function: Set flags on note section.
3860 (elf32_arm_final_write_processing): Handle note section.
3861
3862 2003-03-21 DJ Delorie <dj@redhat.com>
3863
3864 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3865 _bfd_elf_rela_local_sym.
3866
3867 2003-03-20 H.J. Lu <hjl@gnu.org>
3868
3869 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3870 non-ELF outputs.
3871
3872 2003-03-20 Nick Clifton <nickc@redhat.com>
3873
3874 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3875 $idata5 in case bfd_coff_final_link is not called.
3876
3877 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3878
3879 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3880 field.
3881 (canon_reloc_count): Define.
3882 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3883 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3884 reloc_count.
3885 (sparc64_elf_canonicalize_reloc): New routine.
3886 (bfd_elf64_canonicalize_reloc): Define.
3887
3888 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3889
3890 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3891 againt mergeable sections. Take r_addend into account when caching
3892 trampolines.
3893
3894 2003-03-18 Richard Henderson <rth@redhat.com>
3895
3896 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3897 local symbols that have no dyninfo.
3898
3899 2003-03-14 Gene Smith <gene.smith@siemens.com>
3900
3901 * ieee.c (ieee_write_expression): Handle the case where symbol is
3902 NULL.
3903 General formatting improvements.
3904
3905 2003-03-13 Nick Clifton <nickc@redhat.com>
3906
3907 * configure.in (LINGUAS): Add zh_CN.
3908 * configure: Regenerate.
3909 * po/zh_CN.po: New file.
3910
3911 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3912
3913 * aout-cris.c (BYTES_IN_WORD): Don't define.
3914 aout-encap.c: Likewise.
3915 aout-ns32k.c: Likewise.
3916 aout-tic30.c: Likewise.
3917 hp300bsd.c: Likewise.
3918 i386aout.c: Likewise.
3919 i386dynix.c: Likewise.
3920 i386linux.c: Likewise.
3921 i386lynx.c: Likewise.
3922 i386mach3.c: Likewise.
3923 m68k4knetbsd.c: Likewise.
3924 m68klinux.c: Likewise.
3925 m68klynx.c: Likewise.
3926 m68knetbsd.c: Likewise.
3927 m88kmach3.c: Likewise.
3928 mipsbsd.c: Likewise.
3929 newsos3.c: Likewise.
3930 sparclinux.c: Likewise.
3931 sparclynx.c: Likewise.
3932 sparcnetbsd.c: Likewise.
3933 vaxbsd.c: Likewise. Fix comment formatting.
3934
3935 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3936
3937 * Reverted 2003-03-02's patch.
3938
3939 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3940 overridable.
3941 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3942 mips_elf64_get_dynamic_reloc_upper_bound,
3943 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3944 (bfd_elf64_get_canonicalize_reloc,
3945 bfd_elf64_get_dynamic_reloc_upper_bound,
3946 bfd_elf64_canonicalize_dynamic_reloc): Define.
3947 (mips_elf64_slurp_reloc_table): Support dynamic.
3948 (mips_elf64_slurp_one_reloc_table): Adjust.
3949
3950 2003-03-12 Nick Clifton <nickc@redhat.com>
3951
3952 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3953 'index' to 'offset' in test for zero value.
3954
3955 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3956
3957 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3958 dynamic relocations pointing to local or section symbols, use the
3959 NULL symbol instead. Document the choice to not emit an
3960 additional R_MIPS_64 relocation.
3961
3962 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3963
3964 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3965 zero index dynamic tls relocs generated for the GOT. Tidy code.
3966 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3967 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3968
3969 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3970
3971 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3972 a tls_get_addr call.
3973
3974 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3975 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3976 ELF_LINK_NON_GOT_REF from weakdef.
3977 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3978 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3979 ELF_LINK_NON_GOT_REF from weakdef.
3980 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3981 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3982 ELF_LINK_NON_GOT_REF from weakdef.
3983
3984 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3985 Andrew Haley <aph@redhat.com>
3986
3987 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3988 output is relocateable.
3989
3990 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3991
3992 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3993 R_COMMENT.
3994
3995 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3996
3997 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3998 error messages.
3999 (ELIMINATE_COPY_RELOCS): Define to zero.
4000 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
4001 TLSLD relocs. Report reloc types on a number of errors. Optimize
4002 LOCAL24PC check for non-local syms. Don't capitalize error messages.
4003 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
4004 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
4005 calculating TLSLD relocs. Report reloc types on a number of errors.
4006 Don't capitalize error messages.
4007
4008 2003-03-03 H.J. Lu <hjl@gnu.org>
4009
4010 * elfxx-ia64.c (USE_BRL): Removed.
4011 (oor_ip): Removed.
4012
4013 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
4014
4015 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
4016 relocation (no special function), and make it non-partial_inplace.
4017 (sh_elf_relax_section): When creating a bsr, use a consistent value
4018 no matter if the symbol is extern or not; set addend to -4.
4019 Don't swap load / non-load instructions for SH4.
4020 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
4021 rather than if the symbol is external to determine if adjusting the
4022 offset makes sense. Adjust the addend too if appropriate.
4023 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
4024 relocation.
4025
4026 2003-03-03 Nick Clifton <nickc@redhat.com>
4027
4028 * po/da.po: Installed latest translation.
4029
4030 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4031
4032 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
4033 R_MIPS_PC16 to rightshift 2.
4034 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
4035 (bfd_elf32_bfd_reloc_type_lookup): Support
4036 BFD_RELOC_MIPSEMB_16_PCREL_S2.
4037 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
4038 R_MIPS_PC16 to rightshift 2.
4039 (mips_elf64_howto_table_rela): Likewise.
4040 (mips_reloc_map): Map to rightshifted BFD reloc.
4041 * elfn32-mips.c: The same as in elf64-mips.c.
4042 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
4043 (mips_elf_calculate_relocation): Handle rightshifted addends for
4044 R_MIPS_PC16.
4045 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
4046 MIPS Embedded PIC. Remove superfluous empty COMMENT.
4047 * libbfd.h: Regenerate.
4048 * bfd-in2.h: Regenerate.
4049
4050 2003-02-28 Richard Henderson <rth@redhat.com>
4051
4052 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
4053 for ltoff22x relaxation.
4054
4055 2003-03-01 Alan Modra <amodra@bigpond.net.au>
4056
4057 * bfd-in.h (_bfd): Don't define.
4058 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
4059 * syms.c: Likewise.
4060 * bfd-in2.h: Regenerate.
4061
4062 2003-02-27 Richard Henderson <rth@redhat.com>
4063
4064 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
4065 (elfNN_ia64_check_relocs): Set it.
4066 (allocate_global_data_got): Check it.
4067 (allocate_local_got): Likewise.
4068 (allocate_dynrel_entries): Likewise.
4069 (elfNN_ia64_relax_ldxmov): New.
4070 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
4071 (elfNN_ia64_choose_gp): Split out from ...
4072 (elfNN_ia64_final_link): ... here.
4073
4074 2003-02-27 Andrew Cagney <cagney@redhat.com>
4075
4076 * bfd.c (struct bfd): Rename "struct _bfd".
4077 * bfd-in.h: Update copyright.
4078 (struct bfd): Rename "struct _bfd".
4079 (_bfd): Define for backward compatibility.
4080 * bfd-in2.h: Regenerate.
4081
4082 2003-02-25 Alan Modra <amodra@bigpond.net.au>
4083
4084 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
4085 and rel_hdr2 when initially counting input relocs rather than after
4086 creating output reloc sections.
4087 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
4088 sizes.
4089
4090 * Makefile.am: Run "make dep-am".
4091 * Makefile.in: Regenerate.
4092
4093 2003-02-24 Kris Warkentin <kewarken@qnx.com>
4094
4095 * elf.c (elfcore_read_notes): Add check for QNX style core file.
4096 (elfcore_grog_nto_note): New function.
4097 (elfcore_grog_nto_gregs): New function.
4098 (elfcore_grog_nto_status): New function.
4099
4100 2003-02-24 Alan Modra <amodra@bigpond.net.au>
4101
4102 * elflink.c (_bfd_elf_create_got_section): Check existing .got
4103 section flags before concluding that we've already been called.
4104 Don't use register keyword.
4105 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
4106 (_bfd_elf_create_linker_section): Formatting.
4107
4108 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
4109
4110 * coff-h8300.c: Fix typo: intial -> initial.
4111 * coff-ppc.c: Likewise.
4112
4113 2003-02-20 Alan Modra <amodra@bigpond.net.au>
4114
4115 * elf32-ppc.c: Formatting.
4116 (allocate_dynrelocs): LD and GD relocs against the same sym need
4117 separate GOT entries.
4118 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
4119 entries per symbol.
4120
4121 2003-02-19 Alan Modra <amodra@bigpond.net.au>
4122
4123 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
4124 removal. Localize vars. Remove unnecessary dynobj test.
4125 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
4126 of INFO.
4127 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4128 and optimize.
4129 (elf_i386_relocate_section): Likewise.
4130 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
4131 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
4132 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
4133 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
4134 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
4135 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
4136 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
4137 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
4138 Formatting.
4139
4140 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
4141 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
4142 test.
4143 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
4144 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4145 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4146 and optimize. Use ELIMINATE_COPY_RELOCS.
4147 (ppc64_elf_relocate_section): Likewise.
4148
4149 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
4150 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
4151 (ELIMINATE_COPY_RELOCS): Define.
4152 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
4153 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
4154 (MUST_BE_DYN_RELOC): Define.
4155 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
4156 and optimize. Trim dyn_relocs.
4157 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
4158 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
4159 track of pc_rel dyn relocs.
4160 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
4161 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
4162 allocate_dynrelocs. Don't recalculate "sec".
4163
4164 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4165
4166 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
4167 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
4168 on invalid LD relocs.
4169 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
4170 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
4171 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
4172
4173 * elf32-ppc.h: New file.
4174 * elf32-ppc.c: Include elf32-ppc.h.
4175 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
4176 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
4177 Add "tls_mask" field.
4178 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
4179 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
4180 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
4181 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
4182 Make use of htab shortcuts throughout file.
4183 (ppc_elf_link_hash_newfunc): Init tls_mask field.
4184 (ppc_elf_link_hash_table_create): Init new fields.
4185 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
4186 (ppc_elf_howto_raw): Add tls relocs.
4187 (ppc_elf_reloc_type_lookup): Handle them.
4188 (ppc_elf_unhandled_reloc): New function.
4189 (ppc_elf_create_got): Stash got section pointer in hash table,
4190 return status. Make .rela.got too.
4191 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
4192 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
4193 NON_GOT_REF set. Don't allocate space in .plt here..
4194 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
4195 not allocating plt entries unnecessarily. Allocate got entries here.
4196 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
4197 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
4198 "info" during allocate_dynrelocs hash traversal. Use htab section
4199 shortcuts rather than searching for named sections. Get rid of
4200 "plt" and "strip" booleans.
4201 (update_local_sym_info, bad_shared_reloc): New functions.
4202 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
4203 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
4204 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
4205 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
4206 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
4207 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
4208 relocs that might use a plt entry. Set NON_GOT_REF too.
4209 Enumerate all do-nothing relocs.
4210 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
4211 tls relocs and all plt relocs.
4212 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
4213 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
4214 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
4215 shortcuts.
4216 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
4217 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
4218 entries and got relocs here. Warn on non-zero got reloc addend.
4219 Split out branch taken/not taken reloc code into a separate switch
4220 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
4221 Split out HA reloc adjustments to separate switch statement. Don't
4222 warn on reloc overflow if we've already warned about undefined.
4223 Don't rebuild sym name when reporting errors. Report all possible
4224 errors from _bfd_final_link_relocate.
4225 (bfd_elf32_bfd_final_link): Don't define.
4226
4227 2003-02-18 Alan Modra <amodra@bigpond.net.au>
4228
4229 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
4230 rebuild sym name when reporting errors.
4231
4232 2003-02-17 Nick Clifton <nickc@redhat.com>
4233
4234 * elflink.h (elf_link_output_extsym): Only check
4235 allow_shlib_undefined for shared libraries.
4236 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
4237 of allow_shlib_undefined.
4238 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4239 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4240 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4241 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4242 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4243 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4244 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4245 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4246 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
4247 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
4248 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4249 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4250 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4251 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4252 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
4253 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
4254
4255 2003-02-17 Nick Clifton <nickc@redhat.com>
4256
4257 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
4258 address field to use in the comparison.
4259 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
4260
4261 2003-02-14 Bob Wilson <bob.wilson@acm.org>
4262
4263 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
4264 backends when checking if the generic ELF target should be used.
4265
4266 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
4267 outside of functions, treat values as absolute addresses.
4268
4269 * bfd.c: Change embedded documentation to use consistent indentation
4270 and to split up long lines. Change informal style of description
4271 for functions lacking real documentation.
4272 * coffcode.h: Break up long lines in embedded documentation.
4273 * format.c: Likewise.
4274 * targets.c: Likewise.
4275 * libcoff.h: Regenerate.
4276 * bfd-in2.h: Regenerate.
4277
4278 2003-02-14 Alan Modra <amodra@bigpond.net.au>
4279
4280 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
4281 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
4282 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
4283 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
4284 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
4285 (group_sections): Don't share a stub section if stubs are for a large
4286 section. Adjust comment.
4287 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
4288 !stubs_always_before_branch.
4289 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4290 treat undefined and undefweak specially when processing dyn relocs.
4291
4292 2003-02-13 Jakub Jelinek <jakub@redhat.com>
4293
4294 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4295
4296 2003-02-13 Nick Clifton <nickc@redhat.com>
4297
4298 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4299 in computation of offset to insert into BL instruction.
4300
4301 2003-02-11 Uwe Stieber <uwe@wwws.de>
4302
4303 * config.bfd: Add support for kaOS as cross build target system.
4304
4305 2003-02-11 Alan Modra <amodra@bigpond.net.au>
4306
4307 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4308 .__tls_get_addr too.
4309 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4310
4311 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4312
4313 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4314 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4315 (sh_elf_link_hash_newfunc): Remove the initialization of
4316 tls_tpoff32 field.
4317 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4318 for which tls_tpoff32 flag is set.
4319 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4320 of the symbol includes the entry matched with the input_section
4321 and having tls_tpoff32 flag on. When linking statically, set
4322 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4323 is defined in this executable.
4324 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4325
4326 2003-02-10 Jakub Jelinek <jakub@redhat.com>
4327
4328 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4329 even if there is just non-empty .rela.plt.
4330
4331 2003-02-10 Nick Clifton <nickc@redhat.com>
4332
4333 * archures.c (bfd_mach_arm_ep9312): Define.
4334 * bfd-in2.h: Regenerate.
4335 * cpu-arm.c (processors[]): Add ep9312.
4336 (bfd_arm_arch): Add ep9312.
4337 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4338 messages and add test for Maverick floating point support.
4339 (elf32_arm_print_private_bfd_data): Handle
4340 EF_ARM_MAVERICK_FLOAT flag.
4341 (elf32_arm_object_p): New function.
4342 (elf_backend_object_p): Define.
4343
4344 2003-02-10 Alan Modra <amodra@bigpond.net.au>
4345
4346 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4347 variables, structure fields or function params to tls_mask or
4348 similar to better reflect usage.
4349 (struct got_entry): Comment.
4350 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
4351 (get_tls_mask): Rename from get_tls_type.
4352
4353 2003-02-09 Alan Modra <amodra@bigpond.net.au>
4354
4355 * elf64-ppc.c (TLS_GD_LD): Don't define..
4356 (TLS_GD): ..define this instead and update all uses.
4357 (TLS_TPRELGD): Define.
4358 (ppc64_elf_link_hash_table_create): Tweak initialization of
4359 init_refcount and init_offset.
4360 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4361 Mark second slot of GD or LD toc entries.
4362 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4363 from other tls types.
4364 (ppc64_elf_tls_setup): New function, split out from..
4365 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4366 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4367 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4368 return value to properly decide whether toc GD and LD entries can
4369 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4370 to determine GD or LD rather than looking at TLS_LD flag. Don't
4371 attempt to adjust got entry tls_type here..
4372 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4373 look for possible merges.
4374 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4375 optimization.
4376 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4377 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4378 Make use of return value from get_tls_type to properly detect GD and
4379 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4380 handle tls_get_addr removal when looking at REL24 relocs, do it when
4381 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4382 GD or LD.
4383 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4384
4385 2003-02-08 Alan Modra <amodra@bigpond.net.au>
4386
4387 * elf32-hppa.c (group_sections): Don't share a stub section if
4388 stubs are for a large section.
4389
4390 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4391 stubs if !stubs_always_before_branch.
4392
4393 2003-02-07 Nick Clifton <nickc@redhat.com>
4394
4395 * elf.c (swap_out_syms): Generate an error message if an
4396 equivalent output section cannot be found for a symbol.
4397
4398 2003-02-07 Jakub Jelinek <jakub@redhat.com>
4399
4400 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4401 local_got_entries is NULL.
4402
4403 2003-02-06 Andreas Schwab <schwab@suse.de>
4404
4405 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4406 (read_value): Add parameter is_signed, use signed extraction if
4407 the value is signed.
4408 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4409 encoding to read_value.
4410
4411 2003-02-06 Alan Modra <amodra@bigpond.net.au>
4412
4413 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4414 plt info when called to transfer weak sym info.
4415
4416 2003-02-05 Alan Modra <amodra@bigpond.net.au>
4417
4418 * reloc.c: Add PPC and PPC64 TLS relocs.
4419 * libbfd.h: Regenerate.
4420 * bfd-in2.h: Regenerate.
4421 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4422 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4423 against a 32 bit field.
4424 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4425 (_ppc64_elf_section_data): Add t_symndx and comments.
4426 (ppc64_elf_section_data): Use elf_section_data macro.
4427 (ppc64_elf_new_section_hook): American spelling.
4428 (struct got_entry, struct plt_entry): New.
4429 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4430 (struct ppc_stub_hash_entry): Add "addend" field.
4431 (struct ppc_link_hash_entry): Add "tls_type".
4432 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4433 TLS_EXPLICIT): Define.
4434 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4435 (link_hash_newfunc): Init new fields.
4436 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
4437 init_offset to NULL.
4438 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4439 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4440 there.
4441 (update_local_sym_info, update_plt_info): New functions.
4442 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4443 handling to use got.glist rather than got.refcount. Likewise for PLT.
4444 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4445 (func_desc_adjust): Adjust for new PLT list.
4446 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4447 (get_sym_h, get_tls_type): New functions.
4448 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4449 (ppc64_elf_tls_optimize): New function.
4450 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4451 TLS relocs.
4452 (ppc64_elf_size_dynamic_sections): Likewise.
4453 (ppc_type_of_stub): Adjust for new PLT list.
4454 (ppc_build_one_stub): Likewise.
4455 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4456 calls specially.
4457 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4458 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4459 init GOT entries that have a reloc. Generate GOT relocs here..
4460 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4461 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4462
4463 2003-02-04 Andreas Schwab <schwab@suse.de>
4464
4465 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4466 (elf_m68k_link_hash_traverse): Remove.
4467 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4468 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4469 reduce casting.
4470 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4471 casting.
4472 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4473 instead of elf_m68k_link_hash_traverse.
4474 (elf_m68k_discard_copies): Change first parameter to pointer to
4475 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4476 elf_m68k_link_hash_entry is needed.
4477
4478 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4479
4480 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4481 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4482 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4483 "plt" field.
4484 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4485 Add "init_offset" field.
4486 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4487 (elf_local_got_ents): Declare.
4488 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4489 and "plt".
4490 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4491 (_bfd_elf_link_hash_table_init): Set "init_offset".
4492 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4493 from init_offset.
4494 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4495
4496 * elf.c (bfd_elf_local_sym_name): Split out from..
4497 (group_signature): ..here.
4498 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4499
4500 2003-02-04 Alan Modra <amodra@bigpond.net.au>
4501
4502 * elf-bfd.h (enum elf_link_info_type): Remove.
4503 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4504 to struct sec. Remove linkonce_p field.
4505 (elf_linkonce_p): Delete.
4506 (elf_discarded_section): Update for sec_info_type change.
4507 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4508 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4509 (ELF_INFO_TYPE_NONE): Define.
4510 (ELF_INFO_TYPE_STABS): Define.
4511 (ELF_INFO_TYPE_MERGE): Define.
4512 (ELF_INFO_TYPE_EH_FRAME): Define.
4513 (ELF_INFO_TYPE_JUST_SYMS): Define.
4514 (STD_SECTION): Update struct sec initializer.
4515 * ecoff.c (bfd_debug_section): Likewise.
4516 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4517 * elflink.h: Likewise.
4518 * elf-eh-frame.c: Likewise.
4519 * elf64-alpha.c: Likewise.
4520 * elfxx-ia64.c: Likewise.
4521 * elfxx-mips.c: Likewise.
4522 * bfd-in2.h: Regenerate.
4523
4524 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4525 referring to used_by_bfd.
4526 * elf64-sparc.c (sec_do_relax): Likewise.
4527 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4528 * elfxx-mips.c (mips_elf_section_data): Likewise.
4529 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4530 (ieee_get_section_contents): Likewise.
4531 (ieee_new_section_hook): Formatting.
4532 (ieee_canonicalize_reloc): Remove commented out code.
4533 * mmo.c (mmo_section_data): Define. Use throughout file.
4534 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4535
4536 2003-01-31 Graydon Hoare <graydon@redhat.com>
4537
4538 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4539 * Makefile.in: Regenerate.
4540 * opncls.c (calc_crc32, get_debug_link_info,
4541 seperate_debug_file_exists, find_seperate_debug_file): New
4542 internal functions.
4543 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4544 contained inside a .gnu_debuglink section.
4545 * bfd-in2.h: Regenerate.
4546
4547 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
4548
4549 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4550 entry->abfd when it's NULL.
4551
4552 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4553
4554 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4555 _bfd_elf_section_offset returning -2 the same way as -1.
4556
4557 * elfxx-mips.c (mips_elf_multi_got): New function.
4558 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4559 addend into union along with address and link hash entry.
4560 (struct mips_got_info): Added bfd2got and next.
4561 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4562 (mips_elf_got_section, mips_elf_create_got_section): Use
4563 SEC_EXCLUDE bit to tell whether we really need the got
4564 section. Take boolean arguments to disregard an excluded
4565 section, or to create it as excluded. Adjust all callers.
4566 Use mips_elf_got_section all over.
4567 (mips_elf_local_got_index, mips_elf_got_page,
4568 mips_elf_got16_entry): Take input bfd as argument, and pass it
4569 on to mips_elf_create_local_got_entry.
4570 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4571 Take input bfd as argument, and manage entries in the
4572 appropriate GOT.
4573 (mips_elf_got_offset_from_index): Take input bfd as argument,
4574 and use it to adjust the GP offset of the bfd.
4575 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4576 unreferenced GOT entries of global symbols to the end.
4577 (mips_elf_record_global_got_symbol): Take input bfd as
4578 argument. Add entries to the master GOT hash table.
4579 (struct mips_elf_bfd2got_hash): New.
4580 (struct mips_elf_got_per_bfd_arg): New.
4581 (struct mips_elf_set_global_got_offset_arg): New.
4582 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4583 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4584 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4585 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4586 mips_elf_resolve_final_got_entry,
4587 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4588 mips_elf_got_for_ibfd): New functions.
4589 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4590 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4591 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4592 (mips_elf_got_entry_hash): Take new fields into account. Use
4593 mips_elf_hash_bfd_vma.
4594 (mips_elf_got_entry_eq): Take new fields into account.
4595 (mips_elf_create_got_section): Initialize new fields.
4596 (mips_elf_calculate_relocation): Pass input_bfd to functions
4597 that now take it. Adjust gp for the input_bfd.
4598 (mips_elf_allocate_dynamic_relocation,
4599 mips_elf_create_dynamic_relocation,
4600 _bfd_mips_elf_create_dynamic_sections): Use...
4601 (mips_elf_rel_dyn_section): New function. Borrow code from...
4602 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4603 now take it. Create the got section if needed, even if
4604 excluded, before recording a global got symbol. Move some
4605 code to...
4606 (mips_elf_record_local_got_symbol): New fn.
4607 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4608 Compute multi-got global entries offsets. Move GOT code to...
4609 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4610 if the GOT is too big.
4611 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4612 undefweak symbol to zero. Generate dynamic relocations for
4613 non-primary GOT entries for global symbols.
4614 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4615 case. Generate dynamic relocations for local got entries.
4616 Sort dynamic relocations on N64 too, using...
4617 (sort_dynamic_relocs_64): New fns.
4618 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4619 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4620
4621 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4622
4623 * bfd.c (struct _bfd): Added id field.
4624 * opncls.c (_bfd_id_counter): New static variable.
4625 (_bfd_new_bfd): Use it.
4626 * bfd-in2.h: Rebuilt.
4627
4628 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4629
4630 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4631
4632 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4633
4634 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4635 (elf32_sparc_rev32_howto): New variable.
4636 (sparc_reloc_map): Add TLS relocs.
4637 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4638 Handle REV32.
4639 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4640 New functions.
4641 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4642 struct elf32_sparc_link_hash_table):
4643 New structures.
4644 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4645 elf32_sparc_hash_table): Define.
4646 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4647 create_got_section, elf32_sparc_create_dynamic_sections,
4648 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4649 functions.
4650 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4651 reference counting.
4652 (elf32_sparc_gc_sweep_hook): Likewise.
4653 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4654 (elf32_sparc_size_dynamic_sections): Likewise.
4655 (elf32_sparc_relocate_section): Likewise.
4656 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4657 New functions.
4658 (elf32_sparc_object_p): Allocate backend private object data.
4659 (bfd_elf32_bfd_link_hash_table_create,
4660 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4661 elf_backend_can_refcount): Define.
4662 (elf_backend_create_dynamic_sections): Define to
4663 elf32_sparc_create_dynamic_sections.
4664 * reloc.c: Add SPARC TLS relocs.
4665 * bfd-in2.h, libbfd.h: Rebuilt.
4666 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4667 (sparc_reloc_map): Likewise.
4668
4669 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4670
4671 * bfd-in2.h: Regenerate.
4672 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4673 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4674 (elf_howto_table): Add TLS relocs.
4675 (elf_s390_reloc_type_lookup): Likewise.
4676 (elf_s390_link_hash_entry): Add tls_type.
4677 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4678 New macros.
4679 (elf_s390_link_hash_table): Add tls_ldm_got.
4680 (link_hash_newfunc): Initialize tls_type.
4681 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4682 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4683 (elf_s390_check_relocs): Support TLS relocs.
4684 (elf_s390_gc_sweep_hook): Likewise.
4685 (allocate_dynrelocs): Likewise.
4686 (elf_s390_size_dynamic_sections): Likewise.
4687 (elf_s390_relocate_section): Likewise.
4688 (elf_s390_finish_dynamic_symbol): Likewise.
4689 (bfd_elf32_mkobject): Define for TLS.
4690 * elf64-s390.c: Same changes as for elf32-s390.c.
4691 * libbfd.h: Regenerate.
4692 * reloc.c: Add s390 TLS relocations.
4693
4694 2003-01-24 Charles Lepple <clepple@ghz.cc>
4695
4696 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4697
4698 2003-01-23 Nick Clifton <nickc@redhat.com>
4699
4700 * Add sh2e support:
4701 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4702 * archures.c (bfd_mach_sh2e): Added.
4703 * bfd-in2.h: Rebuilt.
4704 * cpu-sh.c (arch_info_struct): Added SH2e.
4705 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4706
4707 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4708
4709 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4710 dynindx to an int. Rearrange for better packing.
4711 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4712 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4713 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4714 (struct _sh64_elf_section_data): New struct.
4715 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4716 * elf32-sh64-com.c: Include elf32-sh64.h.
4717 * elf32-sh64.c: Likewise.
4718 (sh64_elf_new_section_hook): New function.
4719 (bfd_elf32_new_section_hook): Define.
4720 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4721 (sh64_bfd_elf_copy_private_section_data): Likewise.
4722 (sh64_elf_final_write_processing): Likewise.
4723 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4724 (elf32_sparc_new_section_hook): New function.
4725 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4726 (sec_do_relax): Define.
4727 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4728 (elf32_sparc_relocate_section): Likewise.
4729 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4730 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4731 (mmix_elf_section_data): Define. Use throughout file.
4732 (mmix_elf_new_section_hook): New function.
4733 (bfd_elf64_new_section_hook): Define.
4734 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4735 (ppc64_elf_section_data): Define. Use throughout.
4736 (ppc64_elf_new_section_hook): New function.
4737 (bfd_elf64_new_section_hook): Define.
4738 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4739 (sparc64_elf_new_section_hook): New function.
4740 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4741 (sec_do_relax): Define.
4742 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4743 (sparc64_elf_relocate_section): Likewise.
4744 (bfd_elf64_new_section_hook): Define.
4745 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4746 * elfxx-mips.c (struct _mips_elf_section_data): New.
4747 (mips_elf_section_data): Define. Use throughout.
4748 (_bfd_mips_elf_new_section_hook): New function.
4749 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4750 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4751 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4752 * Makefile.am: Run "make dep-am".
4753 * Makefile.in: Regenerate.
4754
4755 2003-01-21 Richard Henderson <rth@redhat.com>
4756
4757 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4758 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4759 (elf64_alpha_adjust_dynamic_symbol): Set them.
4760 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4761 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4762 symbol index when relaxing LDM to TPREL.
4763 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4764 relocs, even if the target isn't locally defined.
4765 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4766 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4767 relocs vs symndx 0 to the tp base.
4768
4769 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4770
4771 * config.bfd: Handle i[3456]86-*-aros*.
4772
4773 2003-01-21 Andreas Schwab <schwab@suse.de>
4774
4775 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4776 (struct ppc_elf_link_hash_entry): Define.
4777 (ppc_elf_hash_entry): New function.
4778 (struct ppc_elf_link_hash_table): Define.
4779 (ppc_elf_hash_table): New function.
4780 (ppc_elf_link_hash_newfunc): New function.
4781 (ppc_elf_link_hash_table_create): New function.
4782 (ppc_elf_copy_indirect_symbol): New function.
4783 (allocate_dynrelocs): New function.
4784 (readonly_dynrelocs): New function.
4785 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4786 relocs and determine DT_TEXTREL.
4787 (ppc_elf_check_relocs): Don't do that here, just count the
4788 dynamic relocs.
4789 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4790 removed section.
4791 (bfd_elf32_bfd_link_hash_table_create): Define.
4792 (elf_backend_copy_indirect_symbol): Define.
4793
4794 2003-01-21 Richard Henderson <rth@redhat.com>
4795
4796 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4797 TPREL also get a reloc if shared. Remove SREL support.
4798 (elf64_alpha_emit_dynrel): New.
4799 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4800 and GOTTPREL relocs to local symbols against the tp base.
4801 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4802
4803 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4804 use count before clobbering r_type.
4805 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4806 ordering would mean dataflow inspection is necessary.
4807
4808 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4809
4810 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4811
4812 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4813
4814 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4815 elfxx-target.h and #undef it before #define'ing it.
4816 * elf32-i386.c: Likewise.
4817 * elf32-sh64.c: Likewise.
4818 * elf64-alpha.c: Likewise.
4819 * elf64-sh64.c: Likewise.
4820
4821 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4822
4823 * bfd-in2.h: Regenerate.
4824 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4825 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4826 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4827 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4828 R_390_PLTOFF32 and R_390_PLTOFF64.
4829 (elf_s390_reloc_type_lookup): Likewise.
4830 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4831 of GOTPLT references to a function.
4832 (link_hash_newfunc): Initialize gotplt_refcount.
4833 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4834 and creation of the got section out of the main switch. Add support
4835 for the gotoff, gotplt and pltoff relocations.
4836 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4837 and pltoff.
4838 (elf_s390_adjust_gotplt): New function.
4839 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4840 plt entries.
4841 (allocate_dynrelocs): Add comment.
4842 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4843 for gotoff, gotplt and pltoff relocations.
4844 * elf64-s390.c: Same changes as for elf32-s390.c.
4845 * libbfd.h: Regenerate.
4846 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4847 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4848 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4849 and BFD_RELOC_390_PLTOFF64.
4850
4851 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4852
4853 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4854 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4855
4856 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4857
4858 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4859 self_dtpmod_done and self_dtpmod_offset.
4860 (allocate_global_data_got): Only use one got entry for all
4861 dtpmod relocs against local symbols.
4862 (allocate_dynrel_entries): Only need .rela.got entry for
4863 dtpmod against global symbol.
4864 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4865 Reserve space in .rela.got for the local dtpmod entry.
4866 (set_got_entry): Initialize the common local dtpmod .got entry.
4867 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4868 and R_IA_64_DTPREL64MSB.
4869
4870 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4871
4872 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4873 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4874 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4875 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4876 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4877 relative relocs, not with absolute ones.
4878 * Makefile.am: Run "make dep-am".
4879 * Makefile.in: Regenerate.
4880 * po/SRC-POTFILES.in: Regenerate.
4881
4882 2003-01-15 Andreas Schwab <schwab@suse.de>
4883
4884 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4885 relocation against a non-allocated readonly section.
4886
4887 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4888
4889 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4890 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4891
4892 2002-01-08 Klee Dienes <kdienes@apple.com>
4893
4894 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4895 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4896 * Makefile.in: Regenerate.
4897
4898 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4899
4900 * elfn32-mips.c (prev_reloc_section): New.
4901 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4902 (SET_RELOC_ADDEND): Parenthesize macro argument.
4903
4904 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4905
4906 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4907 adjust addil instructions if the symbol has no section.
4908
4909 2003-01-07 DJ Delorie <dj@redhat.com>
4910
4911 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4912 partial_inplace.
4913
4914 2003-01-07 Andreas Schwab <schwab@suse.de>
4915
4916 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4917 PC relative relocations.
4918 (elf_m68k_discard_copies): Set it here instead.
4919
4920 2002-01-02 Ben Elliston <bje@redhat.com>
4921 Jeff Johnston <jjohnstn@redhat.com>
4922
4923 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4924 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4925 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4926 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4927 (cpu-iq2000.lo): New target.
4928 * Makefile.in: Regenerate.
4929 * config.bfd: Handle iq2000-*-elf.
4930 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4931 (bfd_archures_list): Add bfd_iq2000_arch.
4932 * configure.in: Handle bfd_elf32_iq2000_vec.
4933 * configure: Regenerate.
4934 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4935 and BFD_RELOC_IQ2000_UHI16.
4936 * targets.c (bfd_elf32_iq2000_vec): Declare.
4937 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4938 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4939 * cpu-iq2000.c: New file.
4940 * elf32-iq2000.c: Likewise.
4941 * libbfd.h: Regenerate.
4942 * bfd-in2.h: Likewise.
4943
4944 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4945
4946 * elfxx-mips.c: Include libiberty.h.
4947 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4948 (mips_set_isa_flags): New function, split out from...
4949 (_bfd_mips_elf_final_write_processing): ...here. Only call
4950 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4951 (mips_mach_extensions): New array.
4952 (mips_32bit_flags_p): New function.
4953 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4954 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4955 other is 64-bit. When adopting IBFD's architecture, adopt the
4956 bfd_mach as well as the flags.
4957
4958 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4959
4960 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4961 fix internal errors, fix bad code generation, fix incorrect stabs
4962 information, and improve ability to eliminate redundant page
4963 instructions. Added code to ip2k_final_link_relocate to self-verify
4964 the linker relaxation. Fix formatting problems.
4965
4966 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4967
4968 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4969 * archures.c (bfd_mach_mipsisa32r2): New define.
4970 * bfd-in2.h: Regenerate.
4971 * cpu-mips.c (I_mipsisa32r2): New enum value.
4972 (arch_info_struct): Add entry for I_mipsisa32r2.
4973 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4974 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4975 (_bfd_mips_elf_final_write_processing): Add
4976 bfd_mach_mipsisa32r2 case.
4977 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4978 binaries marked as using MIPS32 Release 2.
4979
4980 2002-12-30 Dmitry Diky <diwil@mail.ru>
4981
4982 * Makefile.am: Add msp430 target.
4983 * configure.in: Likewise.
4984 * Makefile.in: Regenerate.
4985 * configure: Regenerate.
4986 * archures.c: Add msp430 architecture vector.
4987 * config.bfd: Likewise.
4988 * reloc.c: Add msp430 relocs.
4989 * targets.c: Add msp320 target.
4990 * cpu-msp430.c: New file: msp430 cpu detection.
4991 * elf32-msp430.c: New file: msp430 reloc processing.
4992 * bfd-in2.h: Regenerate.
4993 * libbfd.h: Regenerate.
4994
4995 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4996
4997 * elf.c (elf_sort_sections): Don't reorder .tbss.
4998 (assign_file_positions_for_segments): Only adjust off/voff
4999 for increased alignment in PT_LOAD or PT_NOTE segment,
5000 but adjust p_filesz for .tbss too. in PT_LOAD consider
5001 .tbss to have zero memory size.
5002 (copy_private_bfd_data) [SECTION_SIZE]: Define.
5003 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
5004 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
5005 into PT_TLS segment. Never put SHF_TLS sections in
5006 segments other than PT_TLS or PT_LOAD.
5007
5008 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
5009 sh_entsize.
5010
5011 2002-12-23 DJ Delorie <dj@redhat.com>
5012
5013 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
5014
5015 2002-12-23 Alan Modra <amodra@bigpond.net.au>
5016
5017 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
5018
5019 2002-12-23 Nick Clifton <nickc@redhat.com>
5020
5021 * archures.c (bfd_arch_get_compatible): Add third parameter
5022 'accept_unknowns'. Only accept unknown format BFDs if
5023 accept_unknowns is true, or if the format is "binary".
5024 * bfd-in2.h: Regenerate.
5025
5026 2002-12-21 Nick Clifton <nickc@redhat.com>
5027
5028 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
5029 that subtracted 8 from pc relative relocations.
5030
5031 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
5032
5033 * coff-h8300.c: Fix comment typos.
5034 * coffcode.h: Likewise.
5035 * cpu-cris.c: Likewise.
5036 * elf32-vax.c: Likewise.
5037 * genlink.h: Likewise.
5038 * linker.c: Likewise.
5039 * som.c: Likewise.
5040 * tekhex.c: Likewise.
5041 * vms-misc.c: Likewise.
5042
5043 2002-12-20 DJ Delorie <dj@redhat.com>
5044
5045 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
5046 * libbfd.h: Regenerate.
5047 * bfd-in2.h: Regenerate.
5048 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
5049 (xstormy16_reloc_map): Add R_XSTORMY16_12.
5050
5051 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
5052
5053 * doc/bfdint.texi: Fix typos.
5054
5055 2002-12-20 Paul Eggert <eggert@twinsun.com>
5056
5057 Port to POSIX 1003.1-2001.
5058 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
5059 * configure.in (build-warnings): Likewise.
5060 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
5061 * aclocal.m4: Regenerate.
5062 * config.in: Regenerate.
5063 * configure: Regenerate.
5064
5065 2002-12-19 Alan Modra <amodra@bigpond.net.au>
5066
5067 * coff-h8300.c: Include libiberty.h.
5068 (h8300_reloc16_extra_cases): Check the hash table creator before
5069 referencing h8300 specific fields. Stash the hash table pointer
5070 in a local var. Comment typo fixes.
5071 (h8300_bfd_link_add_symbols): Likewise.
5072
5073 * reloc.c (struct reloc_howto_struct): Revise src_mask and
5074 dst_mask comments.
5075 * bfd-in2.h: Regenerate.
5076
5077 2002-12-18 Alan Modra <amodra@bigpond.net.au>
5078
5079 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
5080 code a little. Comment on dynamic relocs against section symbols.
5081
5082 2002-12-17 Roger Sayle <roger@eyesopen.com>
5083
5084 * configure.host (ia64-*-hpux*): Support 64 bit targets using
5085 the HP compiler's "long long".
5086
5087 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
5088
5089 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
5090 and R_XSTORMY16_HI16) howto entries.
5091 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
5092 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
5093 determine the start of the second reloc table.
5094
5095 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
5096
5097 * ecofflink.c: Fix the reading of the debugging information
5098 of Tru64/Alpha binaries that are produced by recent Compaq
5099 compilers.
5100 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
5101 table.
5102 (lookup_line): Because of the strange information sometimes
5103 generated by Compaq's recent compilers, change how the FDR
5104 table is searched so that PDRs (procedure descriptors) are
5105 correctly found. Note that this change is really more of a hack;
5106 however, I have included extensive documentation as to why
5107 this is the best solution short of an extensive rewrite or
5108 another hack.
5109 (fdrtab_lookup): Add comments to explain the algorithm.
5110
5111 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5112
5113 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
5114 initializers to match struct declaration.
5115
5116 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5117
5118 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
5119 * elf.c (get_program_header_size): Likewise.
5120 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
5121 (m32r_elf_generic_reloc): Likewise.
5122 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
5123 * elflink.h (elf_bfd_discard_info): Likewise.
5124
5125 2002-12-12 Alan Modra <amodra@bigpond.net.au>
5126
5127 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
5128 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
5129 DT_RELSZ adjustment, not output section. Avoid writing tags when
5130 unchanged. Don't assume linker script is sane, adjust DT_REL too.
5131 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
5132 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
5133 DT_RELASZ adjustment, not output section. Avoid writing tags when
5134 unchanged. Adjust DT_RELA.
5135 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
5136 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
5137
5138 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5139
5140 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
5141 addend by 4.
5142
5143 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
5144
5145 * elfxx-mips.c (struct mips_got_entry): New.
5146 (struct mips_got_info): Added got_entries field.
5147 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
5148 (mips_elf_local_got_index, mips_elf_got_page,
5149 mips_elf_got16_entry): Re-implement in terms of new...
5150 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
5151 Change return type.
5152 (mips_elf_highest): Warning clean-up.
5153 (mips_elf_create_got_section): Initialize got_entries.
5154 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
5155 local got size.
5156 (_bfd_mips_elf_size_dynamic_sections): Do not account for
5157 GOT_PAGE entries, since we now reuse GOT16 entries.
5158
5159 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
5160
5161 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
5162 read-only section that lies after .text and before .data to be
5163 written into the output file and included in a_text.
5164 (translate_to_native_sym_flags): If an otherwise unrepresentable
5165 section was merged with .text, convert its symbols to N_TEXT
5166 symbols.
5167 * libaout.h (aout_section_merge_with_text_p): New macro.
5168
5169 2002-12-08 Alan Modra <amodra@bigpond.net.au>
5170
5171 * bfd-in.h: Comment typo fix. Formatting.
5172 * bfd-in2.h: Regenerate.
5173 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
5174 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
5175 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
5176
5177 2002-12-05 Richard Henderson <rth@redhat.com>
5178
5179 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
5180 Only send PCREL21B though the plt. Fix installed reloc type.
5181 (elfNN_ia64_relocate_section): Give error for dynamic reloc
5182 against PCREL22 or PCREL64I; clean up error messages for
5183 branch relocs.
5184
5185 2002-12-04 Kevin Buettner <kevinb@redhat.com>
5186
5187 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
5188 New functions.
5189 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
5190
5191 2002-12-04 David Mosberger <davidm@hpl.hp.com>
5192
5193 * cpu-ia64-opc.c: Add operand constant "ar.csd".
5194
5195 2002-12-04 H.J. Lu <hjl@gnu.org>
5196
5197 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
5198 BFD address when constructing local name.
5199
5200 2002-12-04 Andreas Schwab <schwab@suse.de>
5201
5202 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
5203 member.
5204 (elf_m68k_link_hash_table_create): Initialize it.
5205 (elf_m68k_check_relocs): Handle symbols that are forced to be
5206 local due to visibility changes.
5207 (elf_m68k_adjust_dynamic_symbol): Likewise.
5208 (elf_m68k_size_dynamic_sections): Likewise.
5209 (elf_m68k_discard_copies): Likewise.
5210 (elf_m68k_relocate_section): Likewise.
5211
5212 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5213
5214 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
5215
5216 2002-12-04 Alan Modra <amodra@bigpond.net.au>
5217
5218 * srec.c (srec_write_symbols): Restore '$' prefix to address
5219 accidentally removed in 2002-04-04 change.
5220 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
5221
5222 2002-12-03 Nick Clifton <nickc@redhat.com>
5223
5224 * elf32-ppc.c (apuinfo_list_init): New function.
5225 (apuinfo_list_add): New function: Add a value to the list.
5226 (apuinfo_list_length): New function: Return the number of
5227 values on the list.
5228 (apuinfo_list_element): New function: Return a value on the
5229 list.
5230 (apuinfo_list_finish): New function: Free the resources used
5231 by the list.
5232 (ppc_elf_begin_write_processing): New function. Scan the
5233 input bfds for apuinfo sections.
5234 (ppc_elf_write_section): New function: Delay the creation of
5235 the contents of an apuinfo section in an output bfd.
5236 (ppc_elf_final_write_processing): New function. Create the
5237 contents of an apuinfo section in an output bfd.
5238 (elf_backend_begin_write_processing): Define.
5239 (elf_backend_final_write_processing): Define.
5240 (elf_backend_write_section): Define.
5241
5242 2002-12-03 Richard Henderson <rth@redhat.com>
5243
5244 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
5245
5246 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5247
5248 Fix PR savannah/1417:
5249 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
5250 branch if it goes to the start of the deleted region.
5251
5252 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
5253
5254 * bfd-in2.h (bfd_mach_m6812): Rebuild.
5255 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
5256 bfd_mach_m6812s): Declare.
5257
5258 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
5259 (_bfd_m68hc12_elf_set_private_flags): Call it.
5260 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
5261 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
5262 report microcontroller incompatibilities (HC12 vs HCS12).
5263 (elf_backend_object_p): Update.
5264
5265 2002-11-30 Alan Modra <amodra@bigpond.net.au>
5266
5267 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
5268 (enum bfd_boolean, boolean): Delete.
5269 (bfd_boolean): Typedef to an int.
5270 (FALSE, TRUE): Define.
5271 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
5272 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
5273 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
5274 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
5275 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
5276 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
5277 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
5278 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
5279 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
5280 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
5281 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
5282 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
5283 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
5284 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
5285 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
5286 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
5287 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
5288 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
5289 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5290 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5291 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5292 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5293 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5294 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5295 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5296 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5297 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5298 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5299 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5300 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5301 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5302 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5303 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5304 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5305 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5306 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5307 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5308 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5309 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5310 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5311 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5312 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5313 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5314 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5315 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5316 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5317 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5318 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
5319 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
5320 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5321 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5322 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5323 of bfd_boolean vars with TRUE/FALSE. Formatting.
5324 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5325
5326 2002-11-28 Alan Modra <amodra@bigpond.net.au>
5327
5328 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5329 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5330 with Elf_Internal_Rela.
5331 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5332 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5333 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5334 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5335 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5336 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5337 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5338 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5339 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5340 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5341 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5342 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5343 throughout instead.
5344 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5345 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5346 Remove INLINE keyword.
5347 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5348 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5349 as a bfd_byte *.
5350 (elf_write_relocs): Consolidate REL and RELA code.
5351 (elf_slurp_reloc_table_from_section): Simplify REL code.
5352 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5353 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5354 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5355 RELA code.
5356 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5357 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5358 (elf_link_output_relocs): Likewise.
5359 (elf_reloc_link_order): Likewise.
5360 (elf_finish_pointer_linker_section): Likewise.
5361 (struct elf_link_sort_rela): Remove union.
5362 (elf_link_sort_cmp1): Update to suit.
5363 (elf_link_sort_cmp2): Here too.
5364 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5365 over-allocation for int_rels_per_ext_rel != 1 case.
5366 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5367 * elf32-i386.c: Likewise.
5368 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5369 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5370 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5371 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5372 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5373 elf64-sparc.c, elf64-x86-64.c: Likewise.
5374 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5375 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5376 bfd_elf32_swap_reloc_in.
5377
5378 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5379 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5380 (mips_elf64_swap_reloc_in): Zero r_addend.
5381 (mips_elf64_be_swap_reloc_in): Likewise.
5382 (mips_elf64_slurp_one_reloc_table): Simplify.
5383
5384 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5385 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5386 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5387
5388 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5389
5390 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
5391 unresolved debugging relocs in dynamic applications.
5392 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5393
5394 2002-11-26 Alan Modra <amodra@bigpond.net.au>
5395
5396 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5397 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5398 on a relocatable link. Comment typos.
5399 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5400 in the order they are declared. Clear elf_hash_value too.
5401 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5402 eh_info and tls_segment.
5403 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5404 sorted when discarding relocs by turning them into R_*_NONE.
5405
5406 * libbfd.c (warn_deprecated): Comment spelling.
5407 * po/SRC-POTFILES.in: Regenerate.
5408
5409 2002-11-21 Richard Henderson <rth@redhat.com>
5410
5411 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5412 arch's st_other bits when merging visibilities.
5413 (elf_link_output_extsym): Tidy clearing of visibility field.
5414
5415 2002-11-21 Alan Modra <amodra@bigpond.net.au>
5416
5417 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5418 (SWAP_OUT_RELOC_OFFSET): Define.
5419
5420 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
5421
5422 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5423 can_refcount is properly extended to the type of
5424 init_refcount.
5425
5426 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
5427
5428 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5429 (_bfd_mips_elf_relocate_section): Use it.
5430
5431 * elfxx-mips.c (MNAME): New macro.
5432 (_bfd_mips_elf_check_relocs): Use it.
5433 (_bfd_mips_elf_discard_info): Likewise.
5434 (_bfd_mips_elf_final_link): Likewise.
5435
5436 2002-11-19 Alan Modra <amodra@bigpond.net.au>
5437
5438 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5439 rel_hdr.sh_size too.
5440
5441 2002-11-18 Klee Dienes <kdienes@apple.com>
5442
5443 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5444 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5445 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5446 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5447 Add dependencies for bfdwin.c, bfdio.c.
5448 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5449 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5450 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5451 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5452 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5453 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5454 bfd_get_size (moved from libbfd.c and bfd.c).
5455 * bfdwin.c New file. Contains _bfd_window_internal,
5456 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5457 libbfd.c and bfd.c).
5458 * po/SRC-POTFILES.in: Regenerate.
5459 * po/bfd.pot: Regenerate.
5460 * libbfd.h: Regenerate.
5461 * bfd-in2.h: Regenerate.
5462 * aclocal.m4: Regenerate.
5463 * Makefile.in: Regenerate.
5464 * configure: Regenerate.
5465
5466 2002-11-18 Klee Dienes <kdienes@apple.com>
5467
5468 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5469
5470 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5471
5472 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5473 jsr after a short jump.
5474 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5475
5476 2002-11-15 Klee Dienes <kdienes@apple.com>
5477
5478 * pef.c (bfd_pef_convert_architecture): Move declaration of
5479 ARCH_POWERPC and ARCH_M68K to the start of the function.
5480
5481 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5482
5483 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5484
5485 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5486
5487 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5488 For bpo_gregs_section->contents, allocate _raw_size, not
5489 _cooked_size.
5490
5491 2002-11-13 Klee Dienes <kdienes@apple.com>
5492
5493 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5494
5495 2002-11-13 H.J. Lu <hjl@gnu.org>
5496
5497 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5498
5499 2002-11-13 Klee Dienes <kdienes@apple.com>
5500 Alan Modra <amodra@bigpond.net.au>
5501
5502 * bfd.c (struct bfd_preserve): New.
5503 (bfd_preserve_save): New function.
5504 (bfd_preserve_restore): Ditto.
5505 (bfd_preserve_finish): Ditto.
5506 * bfd-in2.h: Regenerate.
5507 * mach-o.c: Formatting.
5508 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5509 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5510 (bfd_mach_o_core_p): Ditto.
5511 (bfd_mach_o_scan): Pass in mdata.
5512 * mach-o.h (bfd_mach_o_scan): Update prototype.
5513 * pef.c: Formatting.
5514 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5515 (bfd_pef_xlib_object_p): Ditto.
5516 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5517 * pef.h (bfd_pef_scan): Update prototype.
5518 * xsym.c: Formatting, K&R fixes.
5519 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5520 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5521 * xsym.h (bfd_sym_scan): Declare.
5522 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
5523 * elfcore.h (elf_core_file_p): Likewise.
5524 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5525
5526 2002-11-12 Nick Clifton <nickc@redhat.com>
5527
5528 * po/da.po: Updated Danish translation.
5529
5530 2002-11-12 Alan Modra <amodra@bigpond.net.au>
5531
5532 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5533 relocatable link too.
5534 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5535 eh_frame and stab sections. Zap deleted relocs.
5536 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5537 (elf_bfd_discard_info): Run for relocatable link too.
5538 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5539 Handle ld -r case.
5540 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5541 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5542
5543 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5544 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5545 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5546 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5547 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5548 (struct elf_link_hash_table): Add eh_info.
5549 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5550 (_bfd_elf_discard_section_eh_frame): Update prototype.
5551 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5552 (_bfd_elf_write_section_eh_frame): Likewise.
5553 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5554 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5555 param. Get "hdr_info" from link hash table.
5556 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5557 header section from link hash table. Save header section to elf_tdata.
5558 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5559 header section from link hash table. Don't alloc hdr_info. Clear
5560 hdr_sec instead of setting "strip".
5561 (_bfd_elf_eh_frame_section_offset): Formatting.
5562 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5563 Get header section from link hash table.
5564 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5565 Get header section from link hash table.
5566 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5567 (get_program_header_size): Likewise.
5568 (_bfd_elf_section_offset): Formatting.
5569 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5570 section pointer in link hash table.
5571 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5572 and _bfd_elf_write_section_eh_frame calls. Update comment about
5573 eh_frame entries.
5574 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5575 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5576
5577 * po/SRC-POTFILES.in: Regenerate.
5578
5579 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5580 relocs for discarded FDEs. Remove dead code.
5581 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5582 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5583 Tidy conditions under which stabs are edited. Formatting.
5584 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5585 from discarded relocs.
5586 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5587 section adjustments after testing magic values.
5588
5589 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5590
5591 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5592 references to large plt symbols.
5593
5594 2002-11-12 Klee Dienes <kdienes@apple.com>
5595
5596 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5597 looking for an unused section name.
5598
5599 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5600
5601 * coff-h8300.c: Fix formatting.
5602 * elf32-h8300.c: Likewise.
5603 * reloc16.c: Likewise.
5604
5605 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5606
5607 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5608 section when dynamic section unused; _bfd_strip_section_from_output
5609 instead.
5610
5611 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5612
5613 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5614 and sym_vec.
5615
5616 * dwarf2.c: Revert last change.
5617
5618 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5619
5620 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5621 _bfd_dwarf2_find_nearest_line): Use
5622 bfd_simple_get_relocated_section_contents() instead of
5623 bfd_get_section_contents().
5624 * reloc.c (bfd_perform_relocation): Add sanity check.
5625 * simple.c (simple_get_relocated_section_contents): If the section
5626 does not have any relocs associated with it, just return the
5627 unadjusted contents.
5628
5629 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5630
5631 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5632 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5633 contents, enabling for a non-DSO, for symbols defined in the
5634 program with --export-dynamic.
5635
5636 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5637
5638 * elf64-ppc.c: Comment typo fixes.
5639 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5640
5641 2002-11-07 Nick Clifton <nickc@redhat.com>
5642
5643 * po/da.po: Updated Danish translation.
5644
5645 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5646
5647 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5648 exactly three internal relocs per external reloc. Set reloc_count
5649 to the external reloc count.
5650
5651 2002-11-06 Klee Dienes <kdienes@apple.com>
5652
5653 * coff-stgo32.c (stub_bytes): Mark as const.
5654 Fix comment formatting.
5655
5656 2002-11-06 Klee Dienes <kdienes@apple.com>
5657
5658 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5659 xsym.lo.
5660 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5661 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5662 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5663 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5664 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5665 sym.
5666 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5667 * Makefile.in: Regenerate.
5668 * doc/Makefile.in: Regenerate.
5669 * bfd-in2.h: Regenerate.
5670 * xsym.c: New file. Contains support for the Apple/Metrowerks
5671 xSYM debugging format.
5672 * xsym.h: New file.
5673 * pef.c: New file. Contains support for the Apple Code Fragment
5674 Manager Preferred Executable Format
5675 * pef.h: New file.
5676 * pef-traceback.h: New file. Contains support for parsing PowerPC
5677 traceback tables as used by PEF executables (and perhaps other
5678 systems as well).
5679 * mach-o.c: New file. Contains support for the Mach-O object file
5680 format.
5681 * mach-o.h: New file.
5682 * mach-o-target.c: New file. Declares the mach-o targets
5683 themselves. Included three times by mach-o.c; each time with a
5684 different set of macros set.
5685
5686 2002-11-06 Graeme Peterson <gp@qnx.com>
5687
5688 * Makefile.am: Remove entries for elf32-qnx.[ch].
5689 * Makefile.in: Regenerate.
5690 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5691 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5692 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5693 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5694 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5695 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5696 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5697 * configure: Regenerate.
5698 * elf32-qnx.c: Remove.
5699 * elf32-qnx.h: Remove.
5700 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5701 is_contained_by_filepos, and copy_private_bfd_data_p.
5702 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5703 is_contained_by_filepos, and copy_private_bfd_data_p.
5704 * elf32-i386.c: Remove QNX extended bfd support.
5705 * elf32-ppc.c: Remove QNX extended bfd support.
5706 * elf32-sh.c: Remove QNX extended bfd support.
5707 * elfarm-nabi.c: Remove QNX extended bfd support.
5708 * targets.c: Remove qnx vectors.
5709 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5710 (elf_backend_is_contained_by_filepos): Remove.
5711 (elf_backend_copy_private_bfd_data_p): Remove.
5712 * po/SRC-POTFILES.in: Regenerate.
5713
5714 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5715 Alan Modra <amodra@bigpond.net.au>
5716
5717 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5718 dynamic relocs against section symbols for the output section vma.
5719
5720 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5721
5722 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5723 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5724
5725 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5726 Alan Modra <amodra@bigpond.net.au>
5727
5728 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5729 vectors in target_selvecs.
5730 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5731 in target_selvecs.
5732 (sh-*-netbsdelf*): Likewise.
5733 * configure.in (assocvecs): New variable. Handle assocvecs like
5734 selvecs.
5735 * configure: Regenerate.
5736 * format.c (bfd_check_format_matches): Store bfd_target pointers
5737 in matching_vector instead of target names. Select first target
5738 from bfd_associated_vector that matches a list of ambiguous targets.
5739 * targets.c (_bfd_associated_vector): New array.
5740 (bfd_associated_vector): New variable.
5741 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5742 * libbfd-in.h (bfd_associated_vector): Declare.
5743 * libbfd.h: Regenerate.
5744
5745 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5746
5747 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5748 non-NULL before dereferencing.
5749
5750 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5751
5752 * vms.c (vms_object_p): Restore the start address when returning
5753 NULL.
5754
5755 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5756 Hans-Peter Nilsson <hp@axis.com>
5757
5758 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5759 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5760 Set up a larger symshndxbuf, and write it out. Free it on
5761 exit rather than freeing symbuf twice. Correct section index
5762 on output section symbol loop.
5763 (elf_link_output_sym): Accumulate symbol extension section
5764 indices, reallocating symshndxbuf rather than writing it out.
5765 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5766 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5767 Use bfd_zalloc to clear i_shdrp[0] too.
5768
5769 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5770
5771 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5772 _raw_size of cranges section if _cooked_size not yet set.
5773
5774 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5775
5776 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5777 for bfd_elf32_swap_symbol_out.
5778
5779 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5780
5781 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5782 signed and unsigned in comparison.
5783
5784 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5785
5786 * coffcode.h: Remove extraneous '\'.
5787
5788 2002-10-28 H.J. Lu <hjl@gnu.org>
5789
5790 * Makefile.am (targets.lo): Depend on Makefile instead of
5791 config.status.
5792 (archures.lo): Likewise.
5793 * Makefile.in: Regenerated.
5794
5795 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5796
5797 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5798 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5799 targ_selvecs.
5800
5801 2002-10-25 Jim Wilson <wilson@redhat.com>
5802
5803 * elf64-sh64.c (sh_elf64_relocate_section): Call
5804 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5805 of SHF_MERGE section.
5806
5807 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5808
5809 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5810
5811 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5812
5813 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5814 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5815 unsigned int.
5816 (NAME(aout,final_link)): Cast enum used in assignment.
5817 (aout_link_write_symbols): Cast enums in comparisons, int values to
5818 boolean, enums in assignments to int.
5819 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5820 (aout_link_input_section_ext): Likewise. Cast enums used in
5821 comparisons with unsigned ints.
5822 (aout_link_reloc_link_order): Cast enum to int in assignment.
5823 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5824 calls to char *.
5825 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5826 assignment.
5827 * bfd-in2.h (bfd_set_section_vma): Likewise.
5828 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5829 * binary.c (bfd_alloc): Cast enum to long.
5830 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5831 * dwarf2.c (read_abbrevs): Add casts to enum types.
5832 (read_attribute_value): Likewise.
5833 (arange_add): Cast result of bfd_zalloc call.
5834 (comp_unit_contains_address): Return true and false.
5835 (comp_unit_find_nearest_line): Cast return to boolean.
5836 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5837 * gen-aout.c: define macro '_' if not defined.
5838 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5839 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5840 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5841 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5842 (bfd_generic_is_local_label_name): Cast return to boolean.
5843 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5844 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5845 struct bfd_hash_entry *.
5846 (_bfd_generic_link_hash_newfunc): likewise.
5847 (_bfd_generic_final_link): Cast enum to unsigned int.
5848 * merge.c (sec_merge_emit): Cast return to boolean.
5849 (merge_strings): Add casts to const unsigned char *.
5850 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5851 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5852 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5853 to struct bfd_hash_entry *.
5854 (bfd_set_section_content): Add cast to PTR in comparison.
5855 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5856 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5857 simple_dummy_unattached_reloc,
5858 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5859 function definitions.
5860 * srec.c (S3Forced): Initialize to false.
5861 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5862 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5863 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5864 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5865 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5866 comparisons.
5867
5868 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5869
5870 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5871 relocs into shared lib non-allocated reloc sections.
5872
5873 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5874
5875 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5876 sorted even when given an out-of-order line sequence.
5877 (lookup_address_in_line_info_table): When an exact VMA match is
5878 not found, return line information with the closest VMA.
5879
5880 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5881
5882 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5883 HPUX 11.00 patch PHSS_26559.
5884
5885 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5886
5887 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5888 the options section into a separate section unless IRIX 6
5889 compatibility is enabled.
5890
5891 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5892
5893 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5894 into arrays.
5895 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5896 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5897 into account.
5898 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5899 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5900
5901 2002-10-21 Graeme Peterson <gp@qnx.com>
5902
5903 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5904
5905 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5906
5907 * targets.c (bfd_target_list): Don't return the default target twice.
5908
5909 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5910
5911 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5912 perror with bfd_perror.
5913
5914 2002-10-19 H.J. Lu <hjl@gnu.org>
5915
5916 * elflink.h (elf_link_add_object_symbols): Correctly handle
5917 DT_RPATH and DT_RUNPATH.
5918
5919 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5920
5921 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5922
5923 2002-10-17 Denis Chertykov <denisc@overta.ru>
5924
5925 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5926 for ip2k port.
5927
5928 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5929
5930 * elfxx-target.h (USE_REL): Don't define as 1.
5931 * elf32-arm.h (USE_REL): Provide a default define of 0.
5932 Use #if rather than #ifdef when testing USE_REL.
5933 * elf32-m32r.c: Likewise.
5934
5935 * elf32-arc.c (USE_REL): Define as 1.
5936 * elf32-d10v.c (USE_REL): Likewise.
5937 * elf32-m32r.c (USE_REL): Likewise.
5938 * elf32-m68hc11.c (USE_REL): Likewise.
5939 * elf32-m68hc12.c (USE_REL): Likewise.
5940 * elf32-or32.c (USE_REL): Likewise.
5941 * elfarm-nabi.c (USE_REL): Likewise.
5942
5943 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5944
5945 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5946 (s390x-*-linux*): Add targ_selvecs.
5947
5948 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5949
5950 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5951 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5952 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5953 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5954 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5955 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5956 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5957 (SOURCE_HFILES): Add elf32-qnx.h.
5958 (BUILD_HFILES): Add bfdver.h.
5959 Run "make dep-am".
5960 * Makefile.in: Regenerate.
5961 * configure.in Update bfd vector dependencies.
5962 * configure: Regenerate.
5963 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5964 * elf32-i386qnx.c: Likewise.
5965 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5966 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5967 * elf32-sh-lin.c: Likewise.
5968 * elf32-shqnx.c: Likewise.
5969 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5970 * elf32-sh64-nbsd.c: Likewise.
5971 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5972 * elf64-sh64-nbsd.c: Likewise.
5973 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5974 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5975 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5976 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5977 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5978 (elf_backend_is_contained_by_filepos): Likewise.
5979 (elf_backend_copy_private_bfd_data_p): Likewise.
5980 Globalize and move functions to..
5981 * elf32-qnx.c: ..here. New file.
5982 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5983 emit target vectors when INCLUDE_SHMEDIA.
5984 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5985 end of file.
5986 * elf64-sh64.c: Remove ELF_ARCH test.
5987 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5988 * po/BLD-POTFILES.in: Regenerate.
5989 * po/SRC-POTFILES.in: Regenerate.
5990
5991 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5992
5993 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5994 loaded with --just-symbols.
5995
5996 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5997 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5998 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5999 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
6000
6001 2002-10-15 Richard Henderson <rth@redhat.com>
6002
6003 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
6004 (BFD64_BACKENDS_CFILES): Likewise.
6005 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
6006 * elf64-alpha-fbsd.c: Remove file, move code ...
6007 * elf64-alpha.c: ... here.
6008 * Makefile.in, configure: Rebuild.
6009
6010 2002-10-14 Richard Henderson <rth@redhat.com>
6011
6012 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
6013 VALUE, not ADDEND.
6014
6015 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
6016
6017 * elf32-sh.c (elf_sh_link_hash_entry): Replace
6018 datalabel_got_offset with union of datalabel_got
6019 offset and refcount.
6020 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
6021 (allocate_dynrelocs): Delete unnecessary code for
6022 STT_DATALABEL type. Create entry in got for
6023 datalabel version of symbol if datalabel_got.refcount > 0.
6024 (sh_elf_relocate_section): Use datalabel_got union.
6025 (sh_elf_gc_sweep_hook): Pull common code to initialize
6026 h and eh out of switch statement. Declare seen_stt_datalabel.
6027 Initialize it. Decrement datalabel_got.refcount for
6028 got relocs when seen_stt_datalabel is true.
6029 Decrement local_got_refcounts entry for datalabel got relocs
6030 of local symbols.
6031 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
6032 (sh_elf_check_relocs): Declare seen_stt_datalabel.
6033 Initialize it. When seen_stt_datalabel is true, increment
6034 datalabel_got refcount rather than got.refcount.
6035 (sh_elf_finish_dynamic_symbol): Create relocs to
6036 initialize got entry for datalabel version of symbol.
6037
6038 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6039
6040 * Makefile.am: Run "make dep-am".
6041 (BFD_H_FILES): Remove version.h.
6042 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
6043 * version.h: ..to here.
6044 * configure.in (bfd_version_date): Remove.
6045 (AC_OUTPUT): Make bfdver.h from version.h.
6046 * bfd.c: #include "bfdver.h".
6047 * vms-hdr.c: Likewise.
6048 * Makefile.in: Regenerate.
6049 * bfd-in2.h: Regenerate.
6050 * configure: Regenerate.
6051 * po/SRC-POTFILES.in: Regenerate.
6052
6053 2002-10-14 Alan Modra <amodra@bigpond.net.au>
6054
6055 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
6056 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
6057 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
6058 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
6059 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
6060 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
6061 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
6062 bfd_mach_ip2022, bfd_mach_ip2022ext,
6063 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
6064 * bfd-in2.h: Regenerate.
6065
6066 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6067
6068 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
6069 endian vector to targ_selvecs.
6070
6071 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
6072
6073 * elfxx-mips.c (mips_elf_calculate_relocation): Take
6074 save_addend argument. Don't apply the 32-bit mask to a
6075 GPREL32 value if it's to be used in another relocation. Don't
6076 use forced-check computation of local_p to decide whether to
6077 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
6078 of the addend of a non-in-place GPREL16 relocation.
6079 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
6080 mips_elf_calculate_relocation().
6081
6082 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6083
6084 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
6085 with symbols in other sections if we relaxed something; the sections
6086 output offsets must be re-computed before.
6087
6088 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
6089
6090 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
6091 handling to use Elf_Internal_Sym.
6092 (m68hc11_elf_relax_delete_bytes): Likewise.
6093
6094 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6095
6096 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
6097 sh_elf_object_p, dtpoff_base): New functions.
6098 (sh_elf_howto_table): Add TLS relocs.
6099 (sh_reloc_map): Likewise.
6100 (sh_elf_info_to_howto): Support TLS relocs.
6101 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
6102 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
6103 New macros.
6104 (sh_elf_obj_tdata): New.
6105 (elf_sh_link_hash_table): Add tls_ldm_got.
6106 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
6107 (allocate_dynrelocs): Support TLS relocs.
6108 (sh_elf_size_dynamic_sections): Likewise.
6109 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
6110 .rela.got section when found already. Return false after printing
6111 error about unresolvable relocation.
6112 (sh_elf_gc_sweep_hook): Support TLS relocs.
6113 (sh_elf_check_relocs): Likewise.
6114 (sh_elf_finish_dynamic_symbol): Likewise.
6115 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
6116 * reloc.c: Add SH TLS relocs.
6117 * bfd-in2.h, libbfd.h: Regenerate.
6118
6119 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6120
6121 * Makefile.in: Regenerated.
6122
6123 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
6124
6125 * Makefile.am: Run dep-am.
6126 (BFD_H_DEP): Add simple.c and linker.c.
6127 (BFD32_LIBS): Add simple.lo.
6128 (BFD32_LIBS_CFILES): Add simple.c.
6129 * Makefile.in: Regenerated.
6130 * bfd-in2.h: Regenerated.
6131 * simple.c: New file.
6132
6133 2002-10-11 Alan Modra <amodra@bigpond.net.au>
6134
6135 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
6136 (record_thumb_to_arm_glue): Likewise.
6137 * ecoff.c (ecoff_link_add_externals): Likewise.
6138 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
6139 (record_thumb_to_arm_glue): Likewise.
6140 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
6141 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
6142 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6143 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
6144 * elf64-ppc.c (func_desc_adjust): Likewise.
6145 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6146 (sh64_elf64_create_dynamic_sections): Likewise.
6147 * elflink.c (_bfd_elf_create_got_section): Likewise.
6148 (_bfd_elf_create_dynamic_sections): Likewise.
6149 (_bfd_elf_create_linker_section): Likewise.
6150 * elflink.h (elf_add_default_symbol): Likewise.
6151 (elf_link_create_dynamic_sections): Likewise.
6152 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6153 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
6154 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
6155 (_bfd_mips_elf_add_symbol_hook): Likewise.
6156 (_bfd_mips_elf_create_dynamic_sections): Likewise.
6157 * linker.c (generic_link_add_symbol_list): Likewise.
6158 * xcofflink.c (xcoff_link_add_symbols): Likewise.
6159
6160 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
6161
6162 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
6163 completely removed. Correct local sym adjustment.
6164
6165 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
6166
6167 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
6168 Correct mistake in calculation of address of .got.
6169 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
6170 elf_sh64_pic_plt_entry_le): Likewise.
6171
6172 2002-10-09 Richard Shann <richard.shann@superh.com>
6173 Stephen Clarke <stephen.clarke@superh.com>
6174
6175 * Makefile.am: Add entries for elf32-sh64-lin.c and
6176 elf64-sh64-lin.c. Regenerate.
6177 * Makefile.in: Regenerate.
6178 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
6179 to use sh64 vectors rather than sh vectors.
6180 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6181 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6182 * configure: Regenerate.
6183 * elf32-sh64-lin.c: New file.
6184 * elf64-sh64-lin.c: New file.
6185 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
6186 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
6187
6188 2002-10-08 H.J. Lu <hjl@gnu.org>
6189
6190 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
6191 IE->LE transition for R_386_TLS_IE.
6192
6193 2002-10-08 Alan Modra <amodra@bigpond.net.au>
6194
6195 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
6196
6197 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
6198
6199 * cofflink.c (mark_relocs): Don't mark relocations in excluded
6200 sections.
6201
6202 2002-10-07 Alan Modra <amodra@bigpond.net.au>
6203
6204 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
6205 code.
6206
6207 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
6208
6209 2002-10-06 Alan Modra <amodra@bigpond.net.au>
6210
6211 * opncls.c: Formatting.
6212 (_bfd_new_bfd): Use a smaller section hash table.
6213
6214 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
6215
6216 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
6217 of the other two relocations packed with a REL32 to NONE.
6218
6219 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
6220
6221 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
6222 (sh_elf_link_hash_newfunc): Initialize it.
6223 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
6224 to got.refcount for symbols that are forced local or when
6225 we have direct got refs.
6226 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
6227 to correctly adjust got.refcount and plt.refcount.
6228 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
6229 (sh_elf_check_relocs): Increment gotplt_refcount.
6230
6231 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6232
6233 * elf32-i386.c (elf_i386_relocate_section): Fix
6234 movl foo@indntpoff, %eax IE->LE transition.
6235
6236 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6237
6238 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
6239 sequence and its transitions.
6240
6241 2002-10-01 Jakub Jelinek <jakub@redhat.com>
6242
6243 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
6244 to st_value + addend in non-code sections.
6245 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
6246 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
6247
6248 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
6249 Ken Raeburn <raeburn@cygnus.com>
6250 Aldy Hernandez <aldyh@redhat.com>
6251 Eric Christopher <echristo@redhat.com>
6252 Richard Sandiford <rsandifo@redhat.com>
6253
6254 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
6255 (bfd_mach_mips5500): New.
6256 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
6257 (arch_info_struct): Add corresponding entries here.
6258 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
6259 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
6260 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
6261 bfd_mach_mips5400 and bfd_mach_mips5500.
6262 (_bfd_mips_elf_mach_extends_p): New function.
6263 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
6264 the EF_MIPS_MACH flags.
6265 * bfd-in2.h: Regenerate.
6266
6267 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
6268
6269 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
6270 .got sections.
6271
6272 2002-09-28 Alan Modra <amodra@bigpond.net.au>
6273
6274 * elf.c (map_sections_to_segments): Correct test for start of
6275 writable section in the same page as end of read-only section.
6276
6277 2002-09-27 Matt Thomas <matt@3am-software.com>
6278
6279 * elf32-vax.c (elf_vax_check_relocs): Remove unused
6280 local_got_refcounts usage. Remove allocation of got slot.
6281 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
6282 Remove de-allocation of got slot.
6283 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
6284 traversal for elf_vax_instantiate_got_entries. Allow empty .got
6285 sections to be GC'ed.
6286 (elf_vax_instantiate_got_entries): New function.
6287 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
6288 tests that are now handled by elf_vax_instantiate_got_entries.
6289 Assert GOT entry falls within .got section size. Remove redundant
6290 comparisions. Fix comments.
6291
6292 2002-09-27 Jakub Jelinek <jakub@redhat.com>
6293
6294 * reloc.c: Add x86-64 TLS relocs.
6295 * bfd-in2.h, libbfd.h: Rebuilt.
6296 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6297 relocs. Add TLS relocs.
6298 (x86_64_reloc_map): Add TLS relocs.
6299 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6300 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6301 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6302 (elf64_x86_64_hash_entry): Define.
6303 (struct elf64_x86_64_obj_tdata): New.
6304 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6305 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6306 (link_hash_newfunc): Initialize tls_type.
6307 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6308 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6309 (elf64_x86_64_mkobject): New.
6310 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6311 (elf64_x86_64_tls_transition): New.
6312 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6313 Handle TLS relocs.
6314 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6315 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6316 (elf64_x86_64_size_dynamic_sections): Likewise.
6317 (dtpoff_base, tpoff): New.
6318 (elf64_x86_64_relocate_section): Handle TLS relocs.
6319 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6320 entries.
6321 (bfd_elf64_mkobject): Define.
6322
6323 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6324 DF_STATIC_TLS if shared.
6325
6326 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6327
6328 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6329 empty relocation sections.
6330
6331 2002-09-26 Alan Modra <amodra@bigpond.net.au>
6332
6333 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6334 (ppc64_elf_build_stubs): Build them here instead.
6335
6336 2002-09-24 Jakub Jelinek <jakub@redhat.com>
6337
6338 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6339 addend into r_addend, not *r_offset.
6340 (elf32_sparc_finish_dynamic_symbol): Likewise.
6341 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6342 R_SPARC_RELATIVE's r_offset.
6343
6344 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6345
6346 * dwarf2.c (decode_line_info): Update to correctly decode
6347 the (non-standard DWARF2) out-of-order address sequences
6348 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6349
6350 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
6351
6352 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6353
6354 2002-09-23 Alan Modra <amodra@bigpond.net.au>
6355
6356 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6357 for discarded FDEs. Remove redundant assignment.
6358 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6359
6360 2002-09-22 H.J. Lu <hjl@gnu.org>
6361
6362 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6363 the relocation count between different .reloc sections.
6364
6365 2002-09-21 Alan Modra <amodra@bigpond.net.au>
6366
6367 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6368 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6369 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6370 R_PPC_EMB_RELSDA.
6371
6372 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6373 unsigned. Move "symcount" assignment out of loop.
6374 * Makefile.am: Run "make dep-am".
6375 * Makefile.in: Regenerate.
6376 * configure: Regenerate.
6377 * po/SRC-POTFILES.in: Regnerate.
6378
6379 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6380
6381 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6382 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6383 (e.g. IRIX64).
6384
6385 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6386
6387 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6388 even if generating R_PPC_RELATIVE reloc.
6389 (ppc_elf_relocate_section): Make sure relocation is performed
6390 if skip == -2. Clear memory at r_offset when creating dynamic
6391 relocation.
6392
6393 2002-09-19 Jakub Jelinek <jakub@redhat.com>
6394
6395 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6396 BFD_RELOC_386_TLS_GOTIE): Add.
6397 * bfd-in2.h, libbfd.h: Rebuilt.
6398 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6399 and R_386_TLS_GOTIE.
6400 (elf_i386_reloc_type_lookup): Handle it.
6401 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6402 char instead of enum, change GOT_* into defines.
6403 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6404 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6405 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6406 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6407 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6408 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6409 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6410 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6411 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6412 tls_type is GOT_TLS_IE_BOTH.
6413 (elf_i386_size_dynamic_sections): Likewise.
6414 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6415 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6416 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6417 all 4 GOT_TLS_* TLS types.
6418
6419 2002-09-19 Nick Clifton <nickc@redhat.com>
6420
6421 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6422 follow indirect links.
6423
6424 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6425
6426 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6427 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6428 on 64 bit machines.
6429 (ecoff_swap_sym_in) <iss>: Likewise.
6430 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6431 ECOFF information: 'ioptMax' refers to the actual *size*
6432 of the optimization symtab, not the number of entries.
6433
6434 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
6435
6436 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6437 ELF_LINK_HASH_NEEDS_PLT logic.
6438
6439 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
6440
6441 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6442 correct relocation count.
6443
6444 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
6445
6446 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6447 * bfd.c (struct _bfd): Add dynsymcount.
6448 * bfd-in2.h: Regenerated.
6449 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6450 abfd->dynsymcount.
6451 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6452 for overflow.
6453
6454 2002-09-17 Stan Cox <scox@redhat.com>
6455
6456 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6457 (mips_elf64_final_gp): Don't make up gp value.
6458 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6459 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6460 .MIPS.options/.options section.
6461
6462 2002-09-17 David O'Brien <obrien@FreeBSD.org>
6463
6464 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6465 It is benign for FreeBSD < 4.1. Minor reformatting.
6466 * elf64-alpha-fbsd.c: Likewise.
6467
6468 2002-09-17 Jakub Jelinek <jakub@redhat.com>
6469
6470 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6471 addend.
6472
6473 2002-09-17 Alan Modra <amodra@bigpond.net.au>
6474
6475 * elf64-alpha.c (alpha_elf_size_info): Make static.
6476
6477 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6478
6479 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6480 * cpu-tic4x.c: Ditto.
6481
6482 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6483
6484 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6485 duplicate define.
6486
6487 2002-09-16 Bruno Haible <bruno@clisp.org>
6488
6489 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6490 by a target variant implementation.
6491 * elf64-alpha.c: Likewise.
6492 * elf32-i386-fbsd.c: New file.
6493 * elf64-alpha-fbsd.c: New file.
6494 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6495 bfd_elf64_alpha_freebsd_vec.
6496 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6497 bfd_elf64_alpha_freebsd_vec.
6498 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6499 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6500 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6501 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6502 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6503 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6504 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6505
6506 2002-09-12 Jakub Jelinek <jakub@redhat.com>
6507
6508 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6509 NULL.
6510 (elf_i386_relocate_section): Return false after printing error about
6511 unresolvable relocation.
6512
6513 2002-09-12 Nick Clifton <nickc@redhat.com>
6514
6515 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6516 R_ARM_THM_PC11.
6517
6518 2002-09-11 Jeffrey Law <law@redhat.com>
6519
6520 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6521
6522 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6523
6524 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6525 line_ptr before deciding we've found a symbol.
6526
6527 2002-09-11 Nick Clifton <nickc@redhat.com>
6528
6529 * po/da.po: New Danish translation file.
6530 * configure.in (LINGUAS): Add 'da'.
6531 * configure: Regenerate.
6532
6533 2002-09-10 Michael Snyder <msnyder@redhat.com>
6534
6535 * irix-core.c (do_sections, do_sections64): New functions.
6536 (irix_core_core_file_p): Call new functions do_sections,
6537 do_sections64, depending on corefile (32-bit or 64-bit).
6538
6539 2002-09-09 Richard Henderson <rth@redhat.com>
6540
6541 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6542 and PCREL21F like PCREL21B.
6543
6544 2002-09-04 Kevin Buettner <kevinb@redhat.com>
6545
6546 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6547 vector.
6548
6549 2002-09-02 Nick Clifton <nickc@redhat.com>
6550
6551 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6552 names instead of cryptically overloaded bfd_reloc error
6553 codes.
6554 (v850_elf_relocate_section): Likewise.
6555 (v850_elf_relax_section): Replace caching of external symbols
6556 with caching of internal symbols obtained from calling
6557 bfd_elf_get_elf_syms().
6558 Fixup problems with freeing cached allocated memory blocks.
6559
6560 2002-09-02 Alan Modra <amodra@bigpond.net.au>
6561
6562 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6563 (bfd_pj_arch): Use bfd_default_scan.
6564 * cpu-v850.c (scan): Remove.
6565 (N): Use bfd_default_scan.
6566 * cpu-z8k.c (scan_mach): Remove.
6567 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6568 first. Use bfd_default_scan.
6569
6570 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6571 bfd_mach constants.
6572 (ecoff_get_magic): Likewise.
6573 * elf32-v850.c (v850_elf_object_p): Likewise.
6574 (v850_elf_final_write_processing): Likewise.
6575 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6576 (MY(write_object_contents)): Likewise.
6577 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6578 * coffcode.h (coff_write_object_contents): Likewise.
6579 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6580 Remove unnecessary "machine" assignments.
6581 (coff_write_relocs): Test for the absolute section sym by testing
6582 section and flags.
6583
6584 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6585 and bfd_mach_i386_i386_intel_syntax.
6586 * pdp11.c (NAME(aout,machine_type)): Likewise.
6587
6588 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6589
6590 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6591 * bfd-in2.h (align_power): Likewise.
6592
6593 2002-08-30 Alan Modra <amodra@bigpond.net.au>
6594
6595 * Makefile.am: Run "make dep-am".
6596 * Makefile.in: Regenerate.
6597
6598 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6599 * cpu-powerpc.c (powerpc_compatible): Likewise.
6600 * cpu-rs6000.c (rs6000_compatible): Likewise.
6601
6602 2002-08-28 Catherine Moore <clm@redhat.com>
6603
6604 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6605 (v850-elf-reloc): Don't resolve pc relative relocs.
6606 (v850_elf_ignore_reloc): New routine.
6607 (v850_elf_final_link_relocate): Handle new relocs.
6608 (v850_elf_relax_delete_bytes ): New routine.
6609 (v850_elf_relax_section): New routine.
6610 (bfd_elf32_bfd_relax_section): Define.
6611 (HOWTO): New entries for new relocs.
6612 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6613 (BFD_RELOC_V850_LONGJUMP): New reloc.
6614 (BFD_RELOC_V850_ALIGN): New reloc.
6615 * archures.c: Remove redundant v850ea architecture.
6616 * cpu-v850.c: Remove redundant v850ea support.
6617 * libbfd.h: Regenerate.
6618 * bfd-in2.h: Regenerated.
6619
6620 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6621
6622 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6623 * configure.in: Add tic4x_coff vector files.
6624 * configure: Regenerate.
6625 * Makefile.am: Add tic4x target.
6626 * Makefile.in: Regenerate.
6627
6628 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6629
6630 * archures.c: Add the BFD arch type tic4x.
6631 * bfd-in.h: Add BFD_IN_MEMORY flag.
6632 * coff-tic4x.c: New file.
6633 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6634 * cpu-tic4x.c: New file.
6635 * targets.c: Added tic4x- in list of xvecs.
6636 * ticoff.h: New file.
6637 * bfd-in2.h: Regenerate.
6638
6639 2002-08-27 Adam Nemet <anemet@lnxw.com>
6640
6641 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6642 bit of DT_INIT and DT_FINI for Thumb functions.
6643
6644 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6645
6646 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6647
6648 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6649
6650 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6651
6652 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6653
6654 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6655 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6656 Likewise.
6657 (struct elf_sh_pcrel_relocs_copied): Removed.
6658 (struct elf_sh_dyn_relocs): New.
6659 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6660 field with dyn_relocs.
6661 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6662 sections and sym_sec.
6663 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6664 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6665 (sh_elf_create_dynamic_sections): Use create_got_section instead
6666 of _bfd_elf_create_got_section.
6667 (sh_elf_check_relocs): Likewise.
6668 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6669 sections.
6670 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6671 sh_elf_relocate_section, sh_elf_check_relocs,
6672 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6673 Likewise.
6674 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6675 dynamic relocations and avoiding the copy relocation when we
6676 didn't find any dynamic relocations in the section which has
6677 contents or is read-only.
6678 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6679 (sh_elf_size_dynamic_sections): Don't reset the size of
6680 .rela.got section even if dynamic_sections_created flag is off.
6681 Don't use sh_elf_discard_copies. Scan all input bfd and use
6682 allocate_dynrelocs. Call readonly_dynrelocs to determine
6683 whether we need DT_TEXTREL.
6684 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6685 whether the symbol was never referred to.
6686 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6687 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6688 (sh_elf_check_relocs): Call create_got_section if the short-cut
6689 to .got is null. Increment reference counters only instead of
6690 allocating space on dynamic sections here. Don't conditionalize
6691 uninitialized got.offset value when marking the symbol as a
6692 global offset table entry. Keep relocations for symbols satisfied
6693 by a dynamic library to avoid copy relocations for the symbol.
6694 Set dynobj field of an elf hash table if needed.
6695 (sh_elf_finish_dynamic_sections): Handle null section pointer
6696 correctly.
6697 (elf_backend_copy_indirect_symbol): Defined.
6698 (elf_backend_can_refcount): Defined.
6699
6700 2002-08-23 Nick Clifton <nickc@redhat.com>
6701
6702 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6703 previous change. Add comment explaining why.
6704
6705 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6706
6707 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6708 contents of .got.plt[2] to tr0, not address of .got.plt.
6709 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6710 patching absolute plt entry. For shmedia plt entry, set bottom bit
6711 of branch to plt0 as this is a branch to an shmedia instruction.
6712 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6713 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6714 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6715 branch to plt0.
6716 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6717 patching absolute plt entry. For shmedia plt entry, branch to
6718 plt0 is now ptrel, so use relative offset. Set bottom bit of
6719 branch target as it is a branch to an shmedia instruction.
6720
6721 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6722 Richard Shann <richard.shann@superh.com>
6723
6724 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6725 value if .init is an SHmedia function. Similarly for DT_FINI.
6726 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6727
6728 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6729
6730 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6731 dynamic section.
6732 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6733
6734 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6735
6736 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6737 byte read when reading the return address register column.
6738
6739 2002-08-22 Nick Clifton <nickc@redhat.com>
6740
6741 * config.bfd: Add powepc64-*-*bsd* target.
6742
6743 2002-08-22 Graeme Peterson <gp@qnx.com>
6744
6745 * Makefile.am: Add entries for elf32-shqnx.c
6746 * Makefile.in: Regenerate.
6747 * config.bfd: Add support sh-*-nto* target.
6748 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6749 * configure: Regenerate.
6750 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6751 * elf32-sh.c: Do not include elf32-target.h if
6752 ELF32_SH_C_INCLUDED is defined.
6753 * elf32-shqnx.c: New file: Support for QNX.
6754 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6755
6756 2002-08-22 Nick Clifton <nickc@redhat.com>
6757
6758 * po/tr.po: Updated Turkish translation.
6759
6760 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6761 symbols are not read.
6762
6763 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6764
6765 * elf32-m68hc11.c: Formatting fixes.
6766 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6767 * elf32-m68hc12.c: Formatting fixes.
6768 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6769
6770 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6771
6772 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6773 SEC_DATA.
6774 (pmac_xcoff_vec): Likewise.
6775 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6776 (aix5coff64_vec): Likewise.
6777
6778 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6779
6780 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6781 param to elf_backend_copy_indirect_symbol.
6782 (_bfd_elf_link_hash_copy_indirect): Likewise.
6783 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6784 calls to copy_indirect_symbol.
6785 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6786 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6787 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6788 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6789 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6790 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6791 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6792 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6793 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6794 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6795 test refcounts for "used" values.
6796
6797 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6798
6799 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6800 argument declaration.
6801
6802 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6803
6804 * archures.c (bfd_mach_ppc_e500): Added.
6805 * bfd-in2.h: Rebuilt.
6806 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6807
6808 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6809
6810 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6811
6812 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6813
6814 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6815 `bfd_byte'.
6816
6817 2002-08-17 Stan Cox <scox@redhat.com>
6818
6819 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6820 IRIX 6 segment layout for NEWABI.
6821
6822 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6823
6824 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6825 symbols when looking for section referred to by a relocation.
6826 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6827
6828 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6829
6830 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6831
6832 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6833
6834 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6835 missing check for whether the symbol is referenced by DSO before
6836 unexporting it as an unneeded dynamic symbol.
6837
6838 2002-08-14 H.J. Lu <hjl@gnu.org>
6839
6840 * libbfd.h: Regenerate.
6841
6842 2002-08-14 H.J. Lu <hjl@gnu.org>
6843
6844 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6845
6846 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6847
6848 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6849 instructions.
6850 (m68hc11_direct_relax): New to define table of relaxable instructions.
6851 (find_relaxable_insn): New, find a relaxable insn.
6852 (compare_reloc): New to compare two relocs.
6853 (m68hc11_elf_relax_section): New, relax text sections.
6854 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6855 (elf32_m68hc11_check_relocs): New function for GC support.
6856 (elf32_m68hc11_relocate_section): New function for GC support.
6857 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6858 (elf_backend_check_relocs): Likewise.
6859 (elf_backend_relocate_section): Likewise.
6860
6861 2002-08-13 H.J. Lu <hjl@gnu.org>
6862
6863 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6864 definitions in shared objects when checking symbol with
6865 undefined version.
6866
6867 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6868
6869 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6870 (elf32_m68hc11_gc_sweep_hook): Likewise.
6871 (elf_backend_gc_mark_hook): Define for GC section support.
6872 (elf_backend_gc_sweep_hook): Likewise.
6873 (elf_backend_can_gc_sections): Likewise.
6874
6875 * elf32-m68hc12.c: Likewise.
6876
6877 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6878
6879 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6880 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6881 (_bfd_m68hc11_elf_set_private_flags): New function.
6882 Use them to set/check/print ELF flags specific to 68HC11.
6883
6884 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6885 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6886 (_bfd_m68hc12_elf_set_private_flags): New function.
6887 Use them to set/check/print ELF flags specific to 68HC12.
6888
6889 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6890
6891 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6892 fix masks for PC-rel relocs.
6893 (m68hc11_elf_ignore_reloc): New function.
6894
6895 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6896 68HC12 banked addressing relocs.
6897 (m68hc12_phys_addr): New to compute physical address of banked memory.
6898 (m68hc12_phys_page): Likewise for page.
6899 (m68hc12_addr_is_banked): New to see if address is in banked area.
6900 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6901
6902 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6903
6904 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6905 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6906 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6907 * bfd-in2.h: Regenerate.
6908
6909 2002-08-12 H.J. Lu <hjl@gnu.org>
6910
6911 * elflink.h (elf_add_default_symbol): Preserve section across
6912 elf_merge_symbol.
6913
6914 2002-08-09 Graeme Peterson <gp@qnx.com>
6915
6916 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6917 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6918 * Makefile.in: Regenerate.
6919 * config.bfd: Add support for powerpc{le}-*-nto targets.
6920 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6921 * configure: Regenerate.
6922 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6923 common file "elf32-qnx.h", and now include that file.
6924 * elf32-qnx.h: New file: QNX specific common elf backend.
6925 * elf32-ppc.c: Do not include elf32-target.h if
6926 ELF32_PPC_C_INCLUDED is defined.
6927 * elf32-ppcqnx.c: New file: Support for QNX.
6928 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6929 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6930
6931 2002-08-09 Nick Clifton <nickc@redhat.com>
6932
6933 * po/sv.po: Updated Swedish translation.
6934
6935 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6936
6937 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6938 g->global_gotsym is NULL.
6939
6940 2002-08-08 H.J. Lu <hjl@gnu.org>
6941
6942 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6943 overrides an indirect versioned symbol.
6944
6945 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6946
6947 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6948 for R_386_TLS_TPOFF32 relocs against symndx 0.
6949
6950 2002-08-07 H.J. Lu <hjl@gnu.org>
6951
6952 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6953 with undefined version if needed.
6954 (elf_link_assign_sym_version): Match a default symbol with a
6955 version without definition. No need to hide the default
6956 definition separately.
6957
6958 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6959
6960 * elflink.h (elf_link_output_extsym): Don't output symbols from
6961 SEC_EXCLUDE sections.
6962
6963 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6964
6965 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6966
6967 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6968 entries.
6969
6970 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6971
6972 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6973 mismatch.
6974
6975 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6976
6977 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6978
6979 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6980
6981 * elf32-mips.c (mips_reloc_map): Fix typo.
6982
6983 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6984
6985 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6986
6987 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6988
6989 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6990
6991 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6992
6993 * libxcoff.h: Use PARAMS on function declarations.
6994 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6995 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6996
6997 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6998 addend.
6999 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
7000
7001 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7002
7003 * coff-rs6000.c: Formatting fixes.
7004 (xcoff_calculate_relocation): Use PARAMS in declaration.
7005 (xcoff_complain_overflow): Likewise.
7006 (xcoff_ppc_relocate_section): Use old-style function pointer call.
7007 (bfd_xcoff_backend_data): Remove useless comments.
7008 (rs6000coff_vec): Likewise.
7009 (bfd_pmac_xcoff_backend_data): Likewise.
7010 (pmac_xcoff_vec): Likewise.
7011
7012 * coff64-rs6000.c: Formatting fixes.
7013 (xcoff64_calculate_relocation): Use PARAMS in declaration.
7014 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
7015 (bfd_xcoff_backend_data): Remove useless comments.
7016 (rs6000coff64_vec): Likewise.
7017 (bfd_xcoff_aix5_backend_data): Likewise.
7018 (aix5coff64_vec): Likewise.
7019
7020 2002-08-06 Alan Modra <amodra@bigpond.net.au>
7021
7022 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
7023 mask entries. Use complain_overflow_dont for R_REF.
7024 (xcoff_reloc_type_ba): Revert last change.
7025 (xcoff_reloc_type_br): Likewise.
7026 (xcoff_reloc_type_crel): Likewise.
7027 (xcoff_ppc_relocate_section): Likewise.
7028 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
7029 (xcoff64_ppc_relocate_section): Likewise.
7030 (xcoff64_howto_table): Revert some of last change to mask entries.
7031 Use complain_overflow_dont for R_REF.
7032
7033 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
7034 relocs with bitsize == 16 have size = 1.
7035 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
7036 (xcoff_reloc_type_br): Likewise.
7037 (xcoff_reloc_type_crel): Likewise.
7038 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7039 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
7040 dst_mask adjustment.
7041 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
7042 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
7043 bitsize == 16 have size = 1.
7044
7045 2002-08-01 Denis Chertykov <denisc@overta.ru>
7046
7047 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
7048 (struct misc): New field isymbuf. All free_* fields removed.
7049 (symbol_value): Pass in internal syms. No need to swap syms in.
7050 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
7051 possibly cached info.
7052 (tidyup_after_error): Removed.
7053 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
7054 misc. Use new field.
7055 (adjust_all_relocations): Use internal syms. No need to swap syms
7056 in and out.
7057 (add_page_insn): Don't use removed fields of struct misc.
7058
7059 2002-08-01 Nick Clifton <nickc@redhat.com>
7060
7061 * elf32-arm.h: Revert previous delta.
7062
7063 2002-08-01 Nick Clifton <nickc@redhat.com>
7064
7065 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
7066 * configure: Regenerate.
7067
7068 2002-07-31 H.J. Lu <hjl@gnu.org>
7069
7070 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
7071 selected.
7072
7073 2002-07-31 H.J. Lu <hjl@gnu.org>
7074
7075 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
7076 is selected.
7077
7078 2002-07-31 Jakub Jelinek <jakub@redhat.com>
7079
7080 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
7081 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
7082
7083 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7084
7085 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
7086 There is no 8 byte relocation type for this architecture.
7087 (do_ns32k_reloc): Use bfd_vma instead of native types.
7088 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
7089 returns void.
7090 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
7091 rely on generic code to do that.
7092 * aout-ns32k.c (howto_table): Add appropriate overflow detection
7093 to all table entries.
7094 (_bfd_ns32k_relocate_contents): put_data returns void.
7095 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
7096 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
7097 return void.
7098
7099 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
7100
7101 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
7102 archive object is target dependant.
7103
7104 2002-07-31 Adam Nemet <anemet@lnxw.com>
7105
7106 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
7107 (THUMB_PLT_ENTRY_SIZE): New macro.
7108 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
7109 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
7110 ARM_PLT_ENTRY_SIZE.
7111 (elf32_arm_plt_entry): Likewise.
7112 (elf_backend_plt_header_size): Likewise.
7113 (elf32_thumb_plt0_entry): New global.
7114 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
7115 into .plt.thumb.
7116 (elf32_thumb_plt_entry): New global.
7117 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
7118 Thumb entries. Set the bottom bit of the corresponding GOT entry
7119 for a Thumb PLT entry.
7120 (struct elf32_arm_plt_entry_info): New structure.
7121 (struct elf32_arm_link_hash_entry, plt_info): New member of this
7122 type.
7123 (elf32_arm_link_hash_newfunc): Initialize new member.
7124 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
7125 relocations against the PLT.
7126 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
7127 first_rel_type if this is the first time we encounter the symbol.
7128 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
7129 Determine if relocation needs a PLT entry. Set first_rel_type if
7130 this is the first time we encounter the symbol
7131 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
7132 functions as well.
7133 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
7134 (elf32_arm_create_dynamic_sections): New function. Create the
7135 .plt.thumb section.
7136 (elf_backend_create_dynamic_sections): Call it.
7137
7138 2002-07-31 Nick Clifton <nickc@redhat.com>
7139
7140 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
7141 'alternative' in order to avoid shadowing global symbol of the
7142 same name.
7143 * bfd-in2.h: Regenerate.
7144 * libbfd.h: Regenerate.
7145 * libcoff.h: Regenerate.
7146
7147 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7148
7149 * Makefile.am: Add n32 ABI support.
7150 * Makefile.in: Regenerate.
7151 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
7152 bit vectors for mips*-*-linux targets as optional.
7153 * configure.in: Add n32 ABI vectors.
7154 * configure: Regenerate.
7155 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
7156 * elfn32-mips.c: New file, n32 ABI support.
7157 * targets.c: Add n32 ABI vectors.
7158
7159 2002-07-30 Graeme Peterson <gp@qnx.com>
7160
7161 * elfarmqnx-nabi.c: New file: Support for QNX.
7162 * config.bfd: Add support for arm-*-nto target.
7163 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
7164 * configure: Regenerate.
7165 * Makefile.am: Add entries for elfarmqnx-nabi.c.
7166 * Makefile.in: Regenerate.
7167 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
7168 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
7169 * elfarm-nabi.c: Do not include elf32-arm.h if
7170 ELFARM_NABI_C_INCLUDED is defined.
7171 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7172
7173 2002-07-30 Nick Clifton <nickc@redhat.com>
7174
7175 * po/sv.po: Updated Swedish translation.
7176
7177 2002-07-30 Jakub Jelinek <jakub@redhat.com>
7178
7179 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
7180
7181 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7182
7183 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
7184 * archive.c (bfd_generic_archive_p): Likewise.
7185 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
7186 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
7187 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
7188 (xcoff64_archive_p): Likewise.
7189 (xcoff64_openr_next_archived_file): Likewise.
7190 (xcoff64_archive_p): Clean up tdata properly on error.
7191 * coffgen.c (coff_real_object_p): Likewise.
7192 (coff_object_p): Release filehdr and opthdr.
7193 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
7194 * ieee.c (ieee_archive_p): Likewise.
7195 * ihex.c (ihex_object_p): Likewise.
7196 (ihex_mkobject): Always allocate tdata.
7197 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
7198 * srec.c (srec_mkobject): Always allocate tdata.
7199 (srec_object_p): Clean up tdata properly on error.
7200 (symbolsrec_object_p): Likewise.
7201 * versados.c (versados_object_p): Likewise.
7202 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
7203 and bfd_realloc instead of realloc.
7204 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
7205 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
7206 place of bfd_malloc, simplifying error freeing. Free hash table too.
7207 (vms_object_p): Clean up tdata on error.
7208 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
7209 (vms_close_and_cleanup): Adjust for bfd_alloc use.
7210
7211 2002-07-30 Alan Modra <amodra@bigpond.net.au>
7212
7213 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
7214
7215 2002-07-26 Chris Demetriou <cgd@broadcom.com>
7216
7217 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
7218 flags into resulting BFD.
7219
7220 2002-07-26 Alan Modra <amodra@bigpond.net.au>
7221
7222 From John Reiser <jreiser@BitWagon.com>
7223 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
7224 tls_ldm_got.refcount.
7225
7226 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7227
7228 * elf64-mips.c: Update TODO comment.
7229 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
7230 mips_elf64_gprel16_reloca): Remove prototypes.
7231 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
7232 (UNUSED_RELOC): Replace by EMPTY_RELOC.
7233 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
7234 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
7235 R_MIPS_HIGHEST.
7236 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
7237 R_MIPS_GOT16. Remove wrong comments.
7238 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
7239 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
7240 from elf32-mips.c.
7241 (mips_elf64_hi16_reloc): Fix formatting.
7242 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
7243 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
7244 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
7245 (mips_elf64_gprel16_reloc): Make static. Add check for
7246 partial_inplace.
7247 (mips_elf64_gprel16_reloca): Remove.
7248 (mips_elf64_literal_reloc): New function.
7249 (mips_elf64_gprel32_reloc): Fix formatting.
7250 (mips_elf64_shift6_reloc): Fix comment. Make static.
7251 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
7252 elf32-mips.c.
7253 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
7254 elf32-mips.c
7255 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
7256 specific relocations.
7257 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
7258 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
7259 (ELF_MAXPAGESIZE): Add comment.
7260
7261 2002-07-25 Nick Clifton <nickc@redhat.com>
7262
7263 * po/sv.po: Updated Swedish translation.
7264 * po/es.po: Updated Spanish translation.
7265 * po/fr.po: Updated French translation.
7266
7267 2002-07-25 Alan Modra <amodra@bigpond.net.au>
7268
7269 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
7270 as elf_link_record_local_dynamic_symbol.
7271 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
7272 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
7273 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
7274 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
7275 attempt is made to record a symbol in a discarded section, and
7276 return `2' in that case.
7277
7278 2002-07-24 Nick Clifton <nickc@redhat.com>
7279
7280 * po/sv.po: Updated Swedish translation.
7281 * po/es.po: Updated Spanish translation.
7282
7283 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7284
7285 * po/SRC-POTFILES.in: Regenerate.
7286
7287 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
7288 immediately. Remove code handling relocatable linking.
7289 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7290 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7291 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
7292 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7293 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7294 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7295 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7296 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7297 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7298 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7299 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7300 * elf32-avr.c (elf_backend_rela_normal): Define.
7301 * elf32-cris.c: Likewise.
7302 * elf32-fr30.c: Likewise.
7303 * elf32-frv.c: Likewise.
7304 * elf32-h8300.c: Likewise.
7305 * elf32-hppa.c: Likewise.
7306 * elf32-ip2k.c: Likewise.
7307 * elf32-sparc.c: Likewise.
7308 * elf32-v850.c: Likewise.
7309 * elf32-vax.c: Likewise.
7310 * elf64-hppa.c: Likewise.
7311 * elf64-sparc.c: Likewise.
7312 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
7313 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7314 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7315 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7316 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7317 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7318 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7319 * elf-m10200.c (USE_RELA): Don't define.
7320 * elf-m10300.c: Likewise.
7321 * elfarm-oabi.c: Likewise.
7322 * elf32-i370.c: Likewise.
7323 * elf32-ip2k.c: Likewise.
7324 * elf32-m68k.c: Likewise.
7325 * elf32-mcore.c: Likewise.
7326 * elf32-ppc.c: Likewise.
7327 * elf32-s390.c: Likewise.
7328 * elf32-vax.c: Likewise.
7329 * elf64-ppc.c: Likewise.
7330 * elf64-s390.c: Likewise.
7331 * elf64-x86-64.c: Likewise.
7332 * elfxx-ia64.c: Likewise.
7333 * elf32-avr.c (USE_REL): Don't undef.
7334 * elf32-ip2k.c: Likewise.
7335
7336 2002-07-23 Nick Clifton <nickc@redhat.com>
7337
7338 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7339 'want_p_paddr_set_to_zero'.
7340 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7341 to false;
7342 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7343 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7344
7345 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7346
7347 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7348 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7349 show the Copyright string.
7350 Minor formatting tidy ups.
7351
7352 2002-07-23 Nick Clifton <nickc@redhat.com>
7353
7354 * po/fr.po: Updated French translation.
7355 * po/sv.po: Updated Swedish translation.
7356
7357 2002-07-23 Alan Modra <amodra@bigpond.net.au>
7358
7359 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7360 when outputting relocs.
7361
7362 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7363
7364 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7365 DT_PLTGOT into the dynamic section if there is a PLT.
7366
7367 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7368
7369 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7370 elf32-mips.c.
7371 (_bfd_mips_elf_write_section): Likewise.
7372 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7373 (_bfd_mips_elf_write_section): Likewise.
7374 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7375 (elf32_mips_write_section): Likewise.
7376 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7377 (_bfd_mips_elf_write_section): Likewise.
7378
7379 2002-07-19 Alan Modra <amodra@bigpond.net.au>
7380
7381 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7382 PT_IA_64_UNWIND segments for a given section.
7383
7384 2002-07-17 H.J. Lu <hjl@gnu.org>
7385
7386 * Makefile.am: Fix a typo.
7387 * Makefile.in: Regenerate.
7388
7389 2002-07-15 Denis Chertykov <denisc@overta.ru>
7390 Frank Ch. Eigler <fche@redhat.com>
7391 Ben Elliston <bje@redhat.com>
7392 Alan Lehotsky <alehotsky@cygnus.com>
7393 John Healy <jhealy@redhat.com>
7394 Graham Stott <grahams@redhat.com>
7395 Jeff Johnston <jjohnstn@redhat.com>
7396
7397 * Makefile.am: Add support for ip2k.
7398 * Makefile.in: Regenerate.
7399 * doc/Makefile.in: Regenerate.
7400 * archures.c: Add support for ip2k.
7401 * config.bfd: Add support for ip2k.
7402 * configure.in: Add support for ip2k.
7403 * configure: Regenerate.
7404 * reloc.c: Add support for ip2k.
7405 * targets.c: Add support for ip2k.
7406 * bfd-in2.h: Regenerate.
7407 * libbfd.h: Regenerate.
7408 * cpu-ip2k.c: New file.
7409 * elf32-ip2k.c: New file.
7410
7411 2002-07-17 Ian Rickards <irickard@arm.com>
7412
7413 * dwarf2.c (concat_filename): If we can't establish the directory
7414 just return the filename.
7415
7416 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
7417
7418 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7419
7420 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7421
7422 * elflink.h: Formatting fixes, tidy prototypes.
7423 (elf_link_assign_sym_version): Move common code out of loop.
7424
7425 2002-07-16 Alan Modra <amodra@bigpond.net.au>
7426
7427 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7428 reloc section size is zero. Correct reloc output location.
7429
7430 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7431
7432 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7433 the final type for the e_fsel selector when generating PA2.0W code.
7434 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7435 relocations.
7436
7437 2002-07-14 H.J. Lu <hjl@gnu.org>
7438
7439 * elflink.h (elf_link_assign_sym_version): Hide the default
7440 definition if there is a hidden versioned definition.
7441
7442 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
7443
7444 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7445 dynamic reference test in assertion when initializing GOT with
7446 static contents. Just assert that there are either no dynamic
7447 sections, the symbol is defined in the regular objects or that the
7448 symbol is undef weak. Tweak comment.
7449 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7450 only if the symbol isn't defined in the program and isn't undef
7451 weak.
7452 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7453 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7454 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7455 (elf_cris_discard_excess_program_dynamics): Don't consider
7456 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7457
7458 2002-07-11 Alan Modra <amodra@bigpond.net.au>
7459
7460 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7461 unresolved debugging relocs in dynamic applications.
7462 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7463 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7464 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7465 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7466 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7467 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7468
7469 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7470
7471 * elf64-ppc.c (ONES): Define.
7472 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7473 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7474 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7475
7476 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7477 (ppc64_elf_set_private_flags): Delete.
7478 (ppc64_elf_section_from_shdr): Delete.
7479 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7480 (ppc64_elf_fake_sections): Delete.
7481 (bfd_elf64_bfd_set_private_flags): Don't define.
7482 (bfd_elf64_get_symbol_info): Likewise.
7483 (elf_backend_section_from_shdr): Likewise.
7484 (elf_backend_fake_sections): Likewise.
7485
7486 2002-07-10 Marco Walther <Marco.Walther@sun.com>
7487
7488 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7489 when not already set.
7490 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7491 (elf_backend_fake_sections): Define.
7492
7493 2002-07-10 Alan Modra <amodra@bigpond.net.au>
7494
7495 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7496 Formatting.
7497 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7498
7499 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
7500
7501 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7502 NULL sym_hashes to just before use.
7503 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7504 symbol with non-default visibility.
7505 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7506 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7507 Ditto.
7508 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7509 symbol with non-default visibility.
7510 (cris_elf_check_relocs): At tests for local symbol before
7511 increasing h->plt.refcount, also check for non-default
7512 visibility. Ditto when checking for local symbol to eliminate
7513 pc-relative runtime relocs.
7514
7515 2002-07-08 Alan Modra <amodra@bigpond.net.au>
7516
7517 * elf.c: Formatting.
7518 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7519 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7520 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7521 segments.
7522
7523 2002-07-07 Mark Mitchell <mark@codesourcery.com>
7524 Alan Modra <amodra@bigpond.net.au>
7525
7526 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7527 account the impact of relocation count overflow when computing
7528 section offsets.
7529 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7530 or not to apply the PE COFF reloc overflow handling. Fix a
7531 fencepost error in deciding whether or not to use that technique.
7532
7533 2002-07-07 Alan Modra <amodra@bigpond.net.au>
7534
7535 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7536 change type of locsyms.
7537 (bfd_elf_get_elf_syms): Declare.
7538 * elf.c (bfd_elf_get_elf_syms): New function.
7539 (group_signature): Use bfd_elf_get_elf_syms.
7540 (bfd_section_from_r_symndx): Likewise.
7541 * elfcode.h (elf_slurp_symbol_table): Likewise.
7542 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7543 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7544 locality of various data structures. Properly free internal relocs.
7545 (elf_bfd_final_link): Properly free internal relocs.
7546 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7547 (elf_link_input_bfd): Likewise.
7548 (elf_gc_mark): Likewise. Properly free internal relocs.
7549 (elf_gc_sweep): Properly free internal relocs.
7550 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7551 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7552 internal relocs.
7553 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7554 Properly free possibly cached info.
7555 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7556 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7557 symbol swapping code.
7558 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7559 Properly free possibly cached info.
7560 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7561 (mn10300_elf_relax_delete_bytes): Likewise.
7562 (mn10300_elf_symbol_address_p): Likewise.
7563 (mn10300_elf_get_relocated_section_contents): Likewise.
7564 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7565 (elf32_h8_relax_delete_bytes): Likewise.
7566 (elf32_h8_symbol_address_p): Likewise.
7567 (elf32_h8_get_relocated_section_contents): Likewise.
7568 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7569 (m32r_elf_relax_delete_bytes): Likewise.
7570 (m32r_elf_get_relocated_section_contents): Likewise.
7571 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7572 elf_section_data to determine whether cached.
7573 (sh_elf_relax_section): As above for elf-m10200.c.
7574 (sh_elf_relax_delete_bytes): Likewise.
7575 (sh_elf_get_relocated_section_contents): Likewise.
7576 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7577 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7578 reading of local syms.
7579 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7580 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7581 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7582 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7583 relocs.
7584 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7585 free internal relocs and section contents. Don't read symbols.
7586 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7587 (elf32_hppa_size_stubs): Don't free local syms.
7588 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7589 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7590 possibly cached info.
7591 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7592 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7593 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7594 all_local_syms.
7595 (get_local_syms): Delete function.
7596 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7597 on exit.
7598 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7599
7600 2002-07-05 Jim Wilson <wilson@redhat.com>
7601
7602 * syms.c (decode_section_type): New.
7603 (bfd_decode_symclass): Call decode_section_type.
7604
7605 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7606
7607 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7608 section content start.
7609 Reported by Michael Schumacher <mike@hightec-rt.com>.
7610
7611 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7612
7613 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7614 link order code. Don't actually remove the output section here;
7615 Just set a flag for the linker to do so.
7616 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7617 sections when setting up output section dynsyms.
7618
7619 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7620
7621 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7622 fudge.
7623 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7624 libs here instead.
7625
7626 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7627
7628 * elf64-s390.c (create_got_section): Set .got section alignment to
7629 8 bytes.
7630 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7631
7632 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7633
7634 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7635
7636 2002-07-01 Matt Thomas <matt@3am-software.com>
7637
7638 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7639 to EF_VAX_*.
7640
7641 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7642
7643 * elfxx-mips.c (ABI_64_P): Fix comment.
7644 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7645 new section names for N64 ABI.
7646 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7647 (mips_elf_calculate_relocation): Code formatting.
7648 (mips_elf_create_dynamic_relocation): Likewise.
7649 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7650 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7651 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7652 in any NewABI.
7653 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7654 for NewABI.
7655 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7656 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7657 here, too.
7658
7659 2002-07-01 Andreas Schwab <schwab@suse.de>
7660
7661 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7662 R_X86_64_64 to R_X86_64_RELATIVE.
7663
7664 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7665
7666 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7667 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7668 Run "make dep-am".
7669 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7670 host_aout_vec.
7671 * configure.in (vaxbsd_vec): Add.
7672 * targets.c (vaxbsd_vec): Add.
7673 * Makefile.in: Rebuild.
7674 * configure: Rebuild.
7675 * po/SRC-POTFILES.in: Rebuild.
7676
7677 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7678
7679 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7680 examining to gc_mark_hook, rather than the bfd.
7681 (elf_gc_sections): Adjust.
7682 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7683 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7684 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7685 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7686 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7687 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7688 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7689 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7690 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7691 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7692 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7693 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7694 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7695 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7696 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7697 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7698 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7699 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7700 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7701 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7702 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7703 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7704 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7705 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7706 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7707 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7708 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7709 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7710 redundant local sym tests.
7711 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7712 (link_hash_newfunc): Init is_entry.
7713 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7714 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7715 (create_linkage_sections): Use bfd_make_section_anyway rather than
7716 bfd_make_section.
7717 (ppc64_elf_mark_entry_syms): New function.
7718 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7719 up opd entry to function section map.
7720 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7721 relocs that reference the opd section.
7722 (edit_opd): New function.
7723 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7724 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7725 (get_local_syms): Do so here. Exit if we already have local syms.
7726 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7727 read local syms on non-ELF input.
7728 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7729 than duplicating it's function here. Adjust free of internal
7730 relocs to suit.
7731 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7732 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7733 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7734 _bfd_elf32_link_read_relocs rather than duplicating it's function
7735 here. Adjust free of internal relocs to suit.
7736
7737 2002-07-01 Andreas Jaeger <aj@suse.de>
7738
7739 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7740 are not allowed in shared libs code, enforce -fPIC.
7741
7742 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7743
7744 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7745 trailing zero-sequences when there's previous left-over data.
7746
7747 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7748
7749 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7750 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7751 and opd_rel_sec in order for starting rela section. Check _raw_size.
7752 (elf_backend_reloc_type_class): Define.
7753
7754 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7755
7756 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7757 DWARF2 formats.
7758
7759 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7760
7761 * cpu-powerpc.c: Comment on ordering of arch_info.
7762 * elf32-ppc.c (ppc_elf_object_p): New function.
7763 (elf_backend_object_p): Define.
7764 * elf64-ppc.c (ppc64_elf_object_p): New function.
7765 (elf_backend_object_p): Define.
7766
7767 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7768
7769 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7770 * configure: Regenerate.
7771
7772 2002-06-25 Jason Eckhardt <jle@rice.edu>
7773
7774 * dwarf2.c (decode_line_info): Check unit->addr_size
7775 to read in the proper number of prologue bytes.
7776
7777 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7778
7779 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7780 aix5coff64_vec if 64-bit bfd support has been enabled.
7781 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7782 been enabled.
7783
7784 * targets.c (_bfd_target_vector[]): Only include
7785 aix5coff64_vec if 64-bit bfd support has been enabled.
7786
7787 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7788
7789 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7790 * elf32-hppa.c (hppa_add_stub): Likewise.
7791 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7792 * elflink.h (elf_add_default_symbol): Fix comment typo.
7793 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7794 (elf_link_add_object_symbols): Likewise.
7795 (elf_link_assign_sym_version): Likewise.
7796 * hash.c (bfd_hash_lookup): Likewise.
7797 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7798 * section.c (bfd_get_unique_section_name): Likewise.
7799 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7800 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7801 (assign_section_numbers): Likewise.
7802 (_bfd_elfcore_make_pseudosection): Likewise.
7803 (elfcore_grok_lwpstatus): Likewise.
7804 (elfcore_grok_win32pstatus): Likewise.
7805 (elfcore_write_note): Constify input params. Use PTR instead of
7806 void *. Include terminating NUL in namesz. Correct padding.
7807 Support NULL "name" param. Use memcpy instead of strcpy.
7808 (elfcore_write_prpsinfo): Constify input params.
7809 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7810 (elfcore_write_lwpstatus): Likewise.
7811 (elfcore_write_pstatus): Likewise.
7812 (elfcore_write_prfpreg): Likewise.
7813 (elfcore_write_prxfpreg): Likewise.
7814 * elf-bfd.h (elfcore_write_note): Update declaration.
7815 (elfcore_write_prpsinfo): Likewise.
7816 (elfcore_write_prstatus): Likewise.
7817 (elfcore_write_pstatus): Likewise.
7818 (elfcore_write_prfpreg): Likewise.
7819 (elfcore_write_prxfpreg): Likewise.
7820 (elfcore_write_lwpstatus): Likewise.
7821
7822 2002-06-25 Jason Eckhardt <jle@rice.edu>
7823
7824 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7825 symbols of type stProc and stStaticProc.
7826
7827 2002-06-25 Nick Clifton <nickc@redhat.com>
7828
7829 * ecoff.c: VArious formatting fixes.
7830
7831 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7832
7833 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7834
7835 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7836
7837 * aout-adobe.c: Don't compare against "true" or "false.
7838 * aout-target.h: Likewise.
7839 * aoutx.h: Likewise.
7840 * archive.c: Likewise.
7841 * bout.c: Likewise.
7842 * cache.c: Likewise.
7843 * coff-a29k.c: Likewise.
7844 * coff-alpha.c: Likewise.
7845 * coff-i386.c: Likewise.
7846 * coff-mips.c: Likewise.
7847 * coff-or32.c: Likewise.
7848 * coff64-rs6000.c: Likewise.
7849 * coffcode.h: Likewise.
7850 * coffgen.c: Likewise.
7851 * cpu-ns32k.c: Likewise.
7852 * ecoff.c: Likewise.
7853 * ecofflink.c: Likewise.
7854 * elf.c: Likewise.
7855 * elf32-arm.h: Likewise.
7856 * elf32-cris.c: Likewise.
7857 * elf32-d30v.c: Likewise.
7858 * elf32-i386.c: Likewise.
7859 * elf32-mcore.c: Likewise.
7860 * elf32-ppc.c: Likewise.
7861 * elf32-sh.c: Likewise.
7862 * elf32-sh64.c: Likewise.
7863 * elf32-v850.c: Likewise.
7864 * elf64-alpha.c: Likewise.
7865 * elf64-sh64.c: Likewise.
7866 * elfcode.h: Likewise.
7867 * elfcore.h: Likewise.
7868 * elflink.h: Likewise.
7869 * elfxx-mips.c: Likewise.
7870 * i386os9k.c: Likewise.
7871 * ieee.c: Likewise.
7872 * libbfd.c: Likewise.
7873 * linker.c: Likewise.
7874 * mmo.c: Likewise.
7875 * nlm32-alpha.c: Likewise.
7876 * nlm32-i386.c: Likewise.
7877 * nlm32-ppc.c: Likewise.
7878 * nlm32-sparc.c: Likewise.
7879 * nlmcode.h: Likewise.
7880 * oasys.c: Likewise.
7881 * pdp11.c: Likewise.
7882 * peicode.h: Likewise.
7883 * reloc.c: Likewise.
7884 * som.c: Likewise.
7885 * srec.c: Likewise.
7886 * tekhex.c: Likewise.
7887 * vms.c: Likewise.
7888 * xcofflink.c: Likewise.
7889 * elf64-sparc.c: Edit comment to not use "== false".
7890
7891 * aoutf1.h: Don't use "? true : false".
7892 * ecoff.c: Likewise.
7893 * format.c: Likewise.
7894 * ieee.c: Likewise.
7895 * linker.c: Likewise.
7896 * mmo.c: Likewise.
7897 * oasys.c: Likewise.
7898
7899 2002-06-23 H.J. Lu <hjl@gnu.org>
7900
7901 * elflink.h (elf_link_add_archive_symbols): For the default
7902 version, check references with only one `@' first.
7903
7904 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7905
7906 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7907 function.
7908 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7909 symbol table.
7910 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7911 (elf64_hppa_size_dynamic_sections): Revise to use
7912 elf64_hppa_mark_milli_and_exported_functions.
7913 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7914 symbols out of dynamic symbol table.
7915
7916 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7917
7918 * Makefile.in: Regenerate.
7919 * libbfd.h: Regenerate.
7920 * bfd-in2.h: Regenerate.
7921 * configure: Regenerate.
7922 * po/SRC-POTFILES.in: Regenerate.
7923
7924 * elflink.h: Comment typo fixes.
7925
7926 2002-06-23 H.J. Lu <hjl@gnu.org>
7927
7928 * elf-bfd.h (elf_link_loaded_list): New structure.
7929 (elf_link_hash_table): Add "loaded".
7930 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7931 * elflink.h (elf_link_check_versioned_symbol): New function.
7932 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7933
7934 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7935
7936 * elflink.h (size_dynamic_sections): If the target does not
7937 support an ELF style hash table, return true, indicating that
7938 nothing needed to be done, rather than false, indicating that the
7939 section's size could not be computed.
7940
7941 2002-06-18 Dave Brolley <brolley@redhat.com>
7942
7943 From Catherine Moore, Michael Meissner, Dave Brolley:
7944 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7945 * targets.c: Support bfd_elf32_frv_vec.
7946 * reloc.c: Add FRV relocs.
7947 * configure.in: Add support for bfd-elf32-frv-vec.
7948 * config.bfd (targ_cpu): Add support for frv-*-elf.
7949 * archures.c: Add frv arch and machines.
7950 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7951 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7952 (BFD32_BACKENDS): Add elf32-frv.lo.
7953 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7954 (cpu-frv.lo): New target.
7955 (elf32-frv.lo): New target.
7956 * cpu-frv.c: New file.
7957 * elf32-frv.c: New file.
7958
7959 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7960
7961 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7962 e_shnum == 0.
7963 Only read the first section header if e_shoff is non-zero.
7964 Don't consider e_shstrndx if there are no sections.
7965
7966 2002-06-17 Tom Rix <trix@redhat.com>
7967
7968 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7969 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7970 complain_overflow_bitfield.
7971
7972 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7973
7974 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7975 (bfd_fdopenr): Likewise.
7976 (bfd_openstreamr): Likewise.
7977 (bfd_openw): Likewise.
7978
7979 * targets.c: Sort target vecs.
7980 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7981 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7982 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7983 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7984 * configure.in: Sort target vecs. Add m88kmach3_vec.
7985 * configure: Regenerate.
7986
7987 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7988
7989 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7990 bpo_reloc_no to break sort order ties, not address of items.
7991
7992 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7993
7994 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7995 Skip excluded sections in determing __gp value.
7996 (elf_hppa_final_link_relocate): Use the symbol's address in
7997 R_PARISC_FPTR64 relocations that don't need an opd entry.
7998 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7999 (elf64_hppa_finalize_dynreloc): Likewise.
8000 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
8001 (elf64_hppa_finish_dynamic_symbol): Break up assert.
8002
8003 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
8004
8005 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
8006 alignment for .bss, .data and .text sections so that sse and sse2
8007 code will work.
8008 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
8009
8010 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
8011
8012 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
8013 sh[1234]*-elf*.
8014
8015 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8016
8017 * elflink.h (elf_bfd_final_link): Improve error handling for missing
8018 dynamic sections.
8019
8020 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
8021 for a symbol that has no output section.
8022 (allocate_dynrel_entries): Correct comment.
8023 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
8024 unless we want one.
8025 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
8026 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
8027 with no section. Remove unnecessary parentheses.
8028
8029 2002-06-11 Tom Rix <trix@redhat.com>
8030
8031 * coffcode.h (coff_compute_section_file_positions): Add data
8032 section to AIX loader alignment check.
8033
8034 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
8035 alignment to 4 bytes.
8036 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
8037 power accessor macro.
8038 (do_shared_object_padding): Remove invalid assertion.
8039
8040 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
8041
8042 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
8043 for removed output sections.
8044
8045 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
8046
8047 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
8048 htab_alloc.
8049 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
8050
8051 2002-06-08 H.J. Lu <hjl@gnu.org>
8052
8053 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
8054 work around a long long bug in gcc 2.96 on mips.
8055
8056 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
8057
8058 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
8059 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
8060 Regenerate dependency lists.
8061 * Makefile.in: Regenerate.
8062 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
8063 vax1knetbsd_vec to targ_selvecs.
8064 * configure.in: Add vax1knetbsd_vec.
8065 * configure: Regenerate.
8066 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
8067 * vax1knetbsd.c: New file.
8068 * vaxnetbsd.c: Update copyright years.
8069 (TARGET_PAGE_SIZE): Set to 0x1000.
8070 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
8071
8072 2002-06-08 Matt Thomas <matt@3am-software.com>
8073
8074 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
8075
8076 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8077
8078 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
8079
8080 2002-06-08 Alan Modra <amodra@bigpond.net.au>
8081
8082 * Makefile.am: Run "make dep-am".
8083 * Makefile.in: Regenerate.
8084
8085 * armnetbsd.c: Replace CONST with const.
8086 * corefile.c: Likewise.
8087 * elf32-dlx.c: Likewise.
8088 * elf64-mips.c: Likewise.
8089 * mmo.c: Likewise.
8090 * ns32knetbsd.c: Likewise.
8091
8092 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
8093 table is elf64-sparc.
8094
8095 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8096
8097 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
8098 Fix RELA addends to get not shifted in the result. Don't do special
8099 handling of R_MIPS_64 for NewABI.
8100
8101 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8102
8103 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8104 (NAME(aout,slurp_reloc_table)): Likewise.
8105 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
8106 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
8107 (xcoff_write_archive_contents_big): Likewise.
8108 (xcoff_generate_rtinit): Likewise.
8109 (xcoff_generate_rtinit): Likewise, and check error return.
8110 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
8111 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
8112 (coff_get_normalized_symtab): Likewise.
8113 (coff_make_empty_symbol): Likewise.
8114 (bfd_coff_set_symbol_class): Likewise.
8115 * cofflink.c (coff_link_add_symbols): Likewise.
8116 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
8117 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
8118 (bfd_ecoff_write_accumulated_debug): Likewise.
8119 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
8120 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
8121 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
8122 * ieee.c (do_with_relocs): Use bfd_zalloc.
8123 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
8124 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
8125 (NAME(aout,slurp_reloc_table)): Likewise.
8126 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
8127 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
8128 * som.c (som_build_and_write_symbol_table): Likewise.
8129 (som_slurp_string_table): Likewise.
8130 (som_slurp_symbol_table): Likewise.
8131 (som_bfd_ar_write_symbol_stuff): Likewise.
8132 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
8133 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
8134 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
8135 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
8136 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
8137
8138 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8139
8140 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
8141 "group" union.
8142 (elf_group_name): Update.
8143 (elf_group_id): Define.
8144 (bfd_elf_set_group_contents): Declare.
8145 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
8146 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
8147 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
8148 that sym for the signature.
8149 (_bfd_elf_compute_section_file_positions): Don't call
8150 set_group_contents for "ld -r" case.
8151 (swap_out_syms): Use bfd_zalloc.
8152 * elflink.h (elf_link_add_archive_symbols): Likewise.
8153 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
8154 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
8155
8156 2002-06-07 Alan Modra <amodra@bigpond.net.au>
8157
8158 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
8159 relocs in opd for non-shared too.
8160
8161 2002-06-06 Jeffrey Law <law@redhat.com>
8162
8163 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
8164 relocations.
8165
8166 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
8167
8168 * merge.c: Include libiberty.h.
8169 * elf-strtab.c: Include libiberty.h.
8170
8171 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
8172
8173 * peXXigen.c (pe_print_idata): Remove unused variable.
8174
8175 2002-06-06 David Heine <dlheine@tensilica.com>
8176
8177 * elf.c (assign_file_positions_for_segments): Remove unallocated
8178 sections from the section to segment mapping for PT_LOAD segments.
8179 Update comment about empty loadable segments.
8180
8181 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
8182
8183 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
8184 is within the .stabstr section.
8185
8186 2002-06-06 Alan Modra <amodra@bigpond.net.au>
8187
8188 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
8189 are "const PTR", not "const PTR *".
8190 (bfd_elf32_swap_symbol_in): Likewise.
8191 (bfd_elf64_swap_symbol_in): Likewise.
8192 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
8193 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8194 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8195 (elf_link_add_object_symbols): Likewise.
8196 (elf_link_record_local_dynamic_symbol): Likewise.
8197 (elf_link_input_bfd): Likewise.
8198 (elf_gc_mark): Likewise.
8199 (elf_reloc_symbol_deleted_p): Likewise.
8200 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8201 (mn10200_elf_relax_delete_bytes): Likewise.
8202 (mn10200_elf_symbol_address_p): Likewise.
8203 (mn10200_elf_get_relocated_section_contents): Likewise.
8204 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8205 (mn10300_elf_relax_section): Likewise.
8206 (mn10300_elf_relax_delete_bytes): Likewise.
8207 (mn10300_elf_symbol_address_p): Likewise.
8208 (mn10300_elf_get_relocated_section_contents): Likewise.
8209 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8210 (elf32_h8_relax_delete_bytes): Likewise.
8211 (elf32_h8_symbol_address_p): Likewise.
8212 (elf32_h8_get_relocated_section_contents): Likewise.
8213 * elf32-hppa.c (get_local_syms): Likewise.
8214 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8215 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8216 * elf32-sh.c (sh_elf_relax_section): Likewise.
8217 (sh_elf_relax_delete_bytes): Likewise.
8218 (sh_elf_get_relocated_section_contents): Likewise.
8219 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8220 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8221 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8222 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8223 * elf64-ppc.c (get_local_syms): Likewise.
8224 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8225 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8226
8227 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
8228
8229 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
8230
8231 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8232
8233 * elf.c (group_signature): Swap in the whole symbol, and handle
8234 extracting section symbol names.
8235 (setup_group): Add comment.
8236 (set_group_contents): When called from objcopy or ld, arrange for
8237 section contents to be written. Write group member output section
8238 indices to allow objcopy to reorganize sections.
8239 (_bfd_elf_copy_private_section_data): Copy group info.
8240
8241 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
8242 (bfd_elf32_swap_symbol_in): Update prototype.
8243 (bfd_elf64_swap_symbol_in): Likewise.
8244 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
8245 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
8246 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
8247 (elf_link_add_object_symbols): Likewise.
8248 (elf_link_record_local_dynamic_symbol): Likewise.
8249 (elf_link_input_bfd): Likewise.
8250 (elf_gc_mark): Likewise.
8251 (elf_reloc_symbol_deleted_p): Likewise.
8252 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
8253 (mn10200_elf_relax_delete_bytes): Likewise.
8254 (mn10200_elf_symbol_address_p): Likewise.
8255 (mn10200_elf_get_relocated_section_contents): Likewise.
8256 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
8257 (mn10300_elf_relax_section): Likewise.
8258 (mn10300_elf_relax_delete_bytes): Likewise.
8259 (mn10300_elf_symbol_address_p): Likewise.
8260 (mn10300_elf_get_relocated_section_contents): Likewise.
8261 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
8262 (elf32_h8_relax_delete_bytes): Likewise.
8263 (elf32_h8_symbol_address_p): Likewise.
8264 (elf32_h8_get_relocated_section_contents): Likewise.
8265 * elf32-hppa.c (get_local_syms): Likewise.
8266 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
8267 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
8268 * elf32-sh.c (sh_elf_relax_section): Likewise.
8269 (sh_elf_relax_delete_bytes): Likewise.
8270 (sh_elf_get_relocated_section_contents): Likewise.
8271 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
8272 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
8273 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
8274 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
8275 * elf64-ppc.c (get_local_syms): Likewise.
8276 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
8277 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
8278 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
8279 * elf64-alpha.c (alpha_elf_size_info): Likewise.
8280 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
8281 * elf64-mips.c (mips_elf64_size_info): Likewise.
8282 * elf64-s390.c (s390_elf64_size_info): Likewise.
8283 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
8284
8285 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8286
8287 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
8288 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
8289 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8290 _bfd_mips_elf_ignore_discarded_relocs.
8291 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8292
8293 2002-06-05 H.J. Lu <hjl@gnu.org>
8294
8295 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8296 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8297 the SEC_MERGE section.
8298
8299 2002-06-05 Alan Modra <amodra@bigpond.net.au>
8300
8301 * coff-alpha.c: Update copyright date.
8302 * coff-mips.c: Likewise.
8303 * xcoff-target.h: Likewise.
8304
8305 * bfd-in.h: Remove "taken from the source" comment.
8306 * libbfd-in.h: Likewise.
8307 * libcoff-in.h: Likewise.
8308 * bfd-in2.h: Regenerate.
8309 * libbfd.h: Regenerate.
8310 * libcoff.h: Regenerate.
8311
8312 * elf.c (bfd_elf_discard_group): Return true.
8313 * elf-bfd.h (bfd_elf_discard_group): Declare.
8314 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8315 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8316 * bfd.c (bfd_discard_group): Define.
8317 * targets.c (struct bfd_target): Add _bfd_discard_group.
8318 (BFD_JUMP_TABLE_LINK): Here too.
8319 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8320 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8321 * aout-target.h (MY_bfd_discard_group): Define.
8322 * aout-tic30.c (MY_bfd_discard_group): Define.
8323 * binary.c (binary_bfd_discard_group): Define.
8324 * bout.c (b_out_bfd_discard_group): Define.
8325 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8326 * coffcode.h (coff_bfd_discard_group): Define.
8327 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8328 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8329 * i386msdos.c (msdos_bfd_discard_group): Define.
8330 * i386os9k.c (os9k_bfd_discard_group): Define.
8331 * ieee.c (ieee_bfd_discard_group): Define.
8332 * ihex.c (ihex_bfd_discard_group): Define.
8333 * mmo.c (mmo_bfd_discard_group): Define.
8334 * nlm-target.h (nlm_bfd_discard_group): Define.
8335 * oasys.c (oasys_bfd_discard_group): Define.
8336 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8337 * som.c (som_bfd_discard_group): Define.
8338 * srec.c (srec_bfd_discard_group): Define.
8339 * tekhex.c (tekhex_bfd_discard_group): Define.
8340 * versados.c (versados_bfd_discard_group): Define.
8341 * vms.c (vms_bfd_discard_group): Define.
8342 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8343 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8344 (aix5coff64_vec): Likewise.
8345 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8346
8347 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8348
8349 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8350 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8351 (elf32-sh64-com.lo): New dependency list.
8352 * Makefile.in: Regenerate.
8353 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8354 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8355 elf32-sh64-com.lo.
8356 * configure: Regenerate.
8357 * elf32-sh64.c (sh64_address_in_cranges)
8358 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8359 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8360 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8361 * elf32-sh64-com.c: ...here. New file.
8362
8363 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8364
8365 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8366 ATTRIBUTE_UNUSED on used params.
8367 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8368 before calling bfd_section_from_elf_index on local syms.
8369 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8370
8371 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8372
8373 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8374 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8375 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8376 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8377 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8378 * Makefile.in: Regenerate.
8379 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8380 (sh64-*-netbsd*): New targets.
8381 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8382 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8383 * configure: Regenerate.
8384 * elf32-sh64-nbsd.c: New file.
8385 * elf64-sh64-nbsd.c: New file.
8386 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8387 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8388 bfd_elf64_sh64lnbsd_vec.
8389
8390 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8391
8392 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8393 (bfd_section_from_shdr): Likewise. Set section name of group
8394 sections from signature.
8395 (group_signature): Split out from setup_group. Ensure symbol table
8396 is available.
8397 (bfd_elf_discard_group): New function.
8398 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8399 .gnu.linkonce* sections if they are members of a group.
8400 (set_group_contents): Set GRP_COMDAT flag.
8401 * section.c (bfd_discard_group): New function.
8402 * bfd-in.h (bfd_elf_discard_group): Declare.
8403 * bfd-in2.h: Regenerate.
8404 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8405 (elf_linkonce_p): Define.
8406
8407 2002-06-04 Alan Modra <amodra@bigpond.net.au>
8408
8409 * elf.c (bfd_section_from_shdr): Make "name" const.
8410 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8411 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8412 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8413 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8414 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8415 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8416 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8417 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8418 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8419 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8420 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8421
8422 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8423
8424 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8425 ABI.
8426
8427 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8428
8429 * elf32-arc.c: Fix formatting.
8430 * elf32-arm.h: Likewise.
8431 * elf32-cris.c: Likewise.
8432 * elf32-dlx.c: Likewise.
8433 * elf32-hppa.c: Likewise.
8434 * elf32-i386.c: Likewise.
8435 * elf32-i386qnx.c: Likewise.
8436 * elf32-or32.c: Likewise.
8437 * elf32-s390.c: Likewise.
8438 * elf32-sh64.c: Likewise.
8439 * elf32-vax.c: Likewise.
8440 * elf32-xstormy16.c: Likewise.
8441 * elf64-alpha.c: Likewise.
8442 * elf64-mmix.c: Likewise.
8443 * elf64-ppc.c: Likewise.
8444 * elf64-s390.c: Likewise.
8445 * elf64-sh64.c: Likewise.
8446 * elf64-x86-64.c: Likewise.
8447
8448 2002-06-02 Richard Henderson <rth@redhat.com>
8449
8450 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8451 null when there are no got entries for a symbol.
8452 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8453 uninitialized variable warning.
8454
8455 2002-06-01 Richard Henderson <rth@redhat.com>
8456
8457 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8458 undefined symbols here.
8459 (elf64_alpha_relax_section): Do it here. Also test for not
8460 defined in the current module.
8461 (elf64_alpha_relocate_section_r): Split out of ...
8462 (elf64_alpha_relocate_section): ... here. Don't dereference
8463 NULL when looking up local got entries.
8464
8465 2002-06-01 Richard Henderson <rth@redhat.com>
8466
8467 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8468 symbols from JSR relaxation.
8469 (elf64_alpha_size_plt_section_1): New.
8470 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8471 (elf64_alpha_size_rela_got_1): ... here.
8472 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8473 (elf64_alpha_size_rela_got_section): ... here.
8474 (elf64_alpha_size_plt_section): New.
8475 (elf64_alpha_relax_section): Call them.
8476 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8477 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8478
8479 2002-06-01 Richard Henderson <rth@redhat.com>
8480
8481 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8482 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8483 in shared libraries. Fix DTPRELHI and TPRELHI value.
8484 (INSN_ADDQ, INSN_RDUNIQ): New.
8485 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8486 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8487 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8488 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8489 Handle GOTDTPREL and GOTTPREL relocations.
8490 (elf64_alpha_relax_gprelhilo): New.
8491 (elf64_alpha_relax_tls_get_addr): New.
8492 (elf64_alpha_relax_find_tls_segment): New.
8493 (elf64_alpha_relax_section): Handle TLS relocations.
8494 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8495 (elf64_alpha_check_relocs): Set it.
8496
8497 2002-06-01 Richard Henderson <rth@redhat.com>
8498
8499 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8500
8501 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8502 check; don't suppress dynamic relocs for non-allocated sections.
8503
8504 * elf64-alpha.c: Remove dead code.
8505
8506 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8507
8508 * bfd-in2.h: Regenerate.
8509 * libbfd.h: Regenerate.
8510 * po/SRC-POTFILES.in: Regenerate.
8511
8512 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8513 space for bss .plt.
8514
8515 2002-05-31 Graeme Peterson <gp@qnx.com>
8516
8517 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8518 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8519 Run "make dep-am".
8520 * Makefile.in: Regenerate.
8521 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8522 * configure.in: Add bfd_elf32_i386qnx_vec support.
8523 * configure: Regenerate.
8524 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8525 is_contained_by_filepos, and copy_private_bfd_data_p.
8526 * elf.c (assign_file_positions_for_segments): Call backend
8527 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8528 (IS_CONTAINED_BY_FILEPOS): Define.
8529 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8530 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8531 Fix non-K&R call to _bfd_error_handler.
8532 (_bfd_elf_copy_private_section_data): Use backend
8533 copy_private_bfd_data_p.
8534 * elf32-i386.c: Don't include elfxx-target.h when
8535 ELF32_I386_C_INCLUDED is defined.
8536 * elf32-i386qnx.c: New QNX elf backend file.
8537 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8538 elf_backend_is_contained_by_filepos, and
8539 elf_backend_do_copy_private_bfd_data.
8540 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8541
8542 2002-05-31 Alan Modra <amodra@bigpond.net.au>
8543
8544 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8545 Move other similar defines to start of file.
8546
8547 2002-05-30 Tom Rix <trix@redhat.com>
8548
8549 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8550 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8551
8552 2002-05-30 Richard Henderson <rth@redhat.com>
8553
8554 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8555 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8556 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8557 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8558 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8559 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8560 n_local_got_entries to total_got_size and local_got_size.
8561 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8562 (alpha_got_entry_size): New.
8563 (elf64_alpha_relax_with_lituse): Use it.
8564 (elf64_alpha_relax_without_lituse): Likewise.
8565 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8566 (get_got_entry): New.
8567 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8568 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8569 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8570 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8571 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8572 (elf64_alpha_calc_got_offsets): Likewise.
8573 (alpha_dynamic_entries_for_reloc): New.
8574 (elf64_alpha_calc_dynrel_sizes): Use it.
8575 (elf64_alpha_size_dynamic_sections): Likewise.
8576 (elf64_alpha_relocate_section): Handle TLS relocations.
8577 * reloc.c: Add Alpha TLS relocations.
8578 * bfd-in2.h, libbfd.h: Rebuild.
8579
8580 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8581
8582 * peXXigen.c (pe_print_idata): Remove double printed
8583 import table lines; add Bound-To comment.
8584
8585 2002-05-29 Matt Thomas <matt@3am-software.com>
8586
8587 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8588 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8589 (elf32-vax.lo): New rule.
8590 * Makefile.in: Regenerate.
8591 * configure.in (bfd_elf32_vax_vec)
8592 (vaxnetbsd_vec): New vectors.
8593 * configure: Regenerate.
8594 * config.bfd (vax-*-netbsdelf*)
8595 (vax-*-netbsdaout*)
8596 (vax-*-netbsd*): New targets.
8597 * elf32-vax.c: New file.
8598 * reloc.c: Add VAX relocations.
8599 * bfd-in2.h: Regenerate.
8600 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8601
8602 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8603
8604 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8605 and bfd_elf32_bigarm_vec to targ_selvecs.
8606
8607 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8608
8609 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8610 with auto-imported symbols.
8611
8612 2002-05-29 Adam Nemet <anemet@lnxw.com>
8613
8614 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8615 sections only record bfd.
8616 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8617 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8618 * bfd-in2.h: Regenerate.
8619
8620 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8621
8622 * syms.c (_bfd_stab_section_find_nearest_line): Move
8623 declaration and initialisation of saw_line and saw_func out of
8624 for loop.
8625
8626 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8627
8628 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8629 (bfd_elf64_get_symbol_info): Define.
8630 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8631
8632 2002-05-29 Andrey Volkov <avolkov@transas.com>
8633
8634 * cpu-h8300.c: Make default h8300 machine first in machine list.
8635
8636 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8637
8638 * config.bfd: Added DLX configuraton.
8639 * Makefile.am: Added DLX configuraton.
8640 * configure.in: Added DLX configuraton.
8641 * archures.c: Add DLX architecture.
8642 * reloc.c: Add DLX relocs.
8643 * targets.c: Added DLX target vector.
8644 * configure: Regenerate.
8645 * Makefile.in: Regenreate.
8646 * bfd-in2.h: Regenreate.
8647 * elf32-dlx.c: New file: Support DLX target.
8648 * cpu-dlx.c: New file: Support DLX target.
8649
8650 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8651
8652 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8653
8654 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8655 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8656 strings to point inside function code sym string.
8657 (func_desc_adjust): Likewise.
8658 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8659
8660 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8661
8662 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8663 (elf64_x86_64_grok_psinfo): Added.
8664
8665 2002-05-24 TAMURA Kent <kent@netbsd.org>
8666
8667 * config.bfd: Add a target for i386-netbsdpe.
8668
8669 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8670
8671 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8672 and is_func_descriptor.
8673 (func_desc_adjust): Hide function code sym in shared libs unless
8674 there is a matching exported function descriptor sym.
8675
8676 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8677
8678 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8679 for symbols from SHF_TLS section.
8680 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8681 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8682 (map_sections_to_segments): Build PT_TLS segment if necessary.
8683 (assign_file_positions_for_segments): Likewise.
8684 (get_program_header_size): Account for PT_TLS segment.
8685 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8686 SEC_THREAD_LOCAL sections to STT_TLS.
8687 * reloc.c: Add 386 and IA-64 TLS relocs.
8688 * section.c (SEC_THREAD_LOCAL): Define.
8689 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8690 Remove.
8691 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8692 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8693 unconditionally.
8694 (struct elf_final_link_info): Add first_tls_sec.
8695 (elf_bfd_final_link): Set first_tls_sec.
8696 Compute elf_hash_table (info)->tls_segment.
8697 (elf_link_output_extsym): Handle STT_TLS symbols.
8698 (elf_link_input_bfd): Likewise.
8699 * syms.c (BSF_THREAD_LOCAL): Define.
8700 * bfd-in2.h: Rebuilt.
8701 * libbfd.h: Rebuilt.
8702 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8703 elf_i386_mkobject, elf_i386_object_p): New functions.
8704 (elf_howto_table): Add TLS relocs.
8705 (elf_i386_reloc_type_lookup): Support TLS relocs.
8706 (elf_i386_info_to_howto_rel): Likewise.
8707 (struct elf_i386_link_hash_entry): Add tls_type.
8708 (struct elf_i386_obj_tdata): New.
8709 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8710 New macros.
8711 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8712 (link_hash_newfunc): Clear tls_type.
8713 (elf_i386_check_relocs): Support TLS relocs.
8714 (elf_i386_gc_sweep_hook): Likewise.
8715 (allocate_dynrelocs): Likewise.
8716 (elf_i386_size_dynamic_sections): Likewise.
8717 (elf_i386_relocate_section): Likewise.
8718 (elf_i386_finish_dynamic_symbol): Likewise.
8719 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8720 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8721 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8722 want_tprel, want_dtpmod, want_dtprel.
8723 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8724 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8725 R_IA64_LTOFF_TPREL22.
8726 (elf_code_to_howto_index): Add TLS relocs.
8727 (elfNN_ia64_check_relocs): Support TLS relocs.
8728 (allocate_global_data_got): Account for TLS .got data.
8729 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8730 (elfNN_ia64_install_value): Supprt TLS relocs.
8731 (set_got_entry): Support TLS relocs.
8732 (elfNN_ia64_relocate_section): Likewise.
8733
8734 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8735
8736 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8737 BLX reloc round the relocation up rather than down.
8738 * coff-arm.c (coff_arm_relocate_section): Likewise.
8739
8740 2002-05-21 H.J. Lu (hjl@gnu.org)
8741
8742 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8743 definition.
8744
8745 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8746
8747 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8748 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8749
8750 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8751
8752 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8753 unresolved relocs.
8754 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8755
8756 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8757
8758 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8759 non-ELF targets.
8760
8761 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8762
8763 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8764 an error value.
8765 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8766 return with false on error.
8767 (elf_link_input_bfd): Check reloc_emitter return value.
8768
8769 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8770
8771 * config.bfd (armeb-*-netbsdelf*): New target.
8772
8773 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8774
8775 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8776 at the plt call stub.
8777
8778 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8779
8780 * cpu-mips.c (mips_compatible): Don't try to check machine
8781 compatibility.
8782
8783 2002-05-18 Tom Rix <trix@redhat.com>
8784
8785 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8786
8787 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8788
8789 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8790 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8791 we've already warned about an undefined symbol. Report more
8792 detail on reloc errors.
8793
8794 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8795
8796 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8797 * configure.in: Invoke AM_INSTALL_LIBBFD.
8798 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8799 (install_libbfd): .. New target.
8800 (uninstall_libbfd): Likewise.
8801 (install-bfdlibLTLIBRARIES): Likewise.
8802 (uninstall-bfdlibLTLIBRARIES): Likewise.
8803 (bfdlibdir): New.
8804 (bfdincludedir): New.
8805 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8806 * aclocal.m4: Regenerate.
8807 * configure: Regenerate.
8808 * Makefile.in: Regenerate.
8809
8810 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8811
8812 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8813 hash loop.
8814
8815 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8816
8817 * config.bfd: Add targets for sh64-linux (little endian and
8818 big endian).
8819
8820 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8821
8822 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8823 is located in the same section as the import table. Instead
8824 check, and if necessary load the section containing the thunk.
8825
8826 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8827
8828 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8829 bfd_bread.
8830 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8831 with bfd_bread.
8832
8833 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8834
8835 * aix5ppc-core.c: Warning fixes.
8836 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8837 * aout-target.h (MY_bfd_link_just_syms): Define.
8838 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8839 * bfd.c (bfd_link_just_syms): Define.
8840 * binary.c (binary_bfd_link_just_syms): Define.
8841 * bout.c (b_out_bfd_link_just_syms): Define.
8842 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8843 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8844 * coffcode.h (coff_bfd_link_just_syms): Define.
8845 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8846 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8847 (_bfd_elf_link_just_syms): Declare.
8848 * elf.c (_bfd_elf_link_just_syms): New function.
8849 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8850 sections haven't already been discarded by the linker.
8851 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8852 sections and SEC_MERGE sections.
8853 (elf_bfd_discard_info): Similarly here.
8854 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8855 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8856 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8857 * ieee.c (ieee_bfd_link_just_syms): Define.
8858 * ihex.c (ihex_bfd_link_just_syms): Define.
8859 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8860 (_bfd_generic_link_just_syms): Declare.
8861 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8862 * linker.c (_bfd_generic_link_just_syms): New function.
8863 * mmo.c (mmo_bfd_link_just_syms): Define.
8864 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8865 * oasys.c (oasys_bfd_link_just_syms): Define.
8866 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8867 * som.c (som_bfd_link_just_syms): Define.
8868 * srec.c (srec_bfd_link_just_syms): Define.
8869 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8870 (BFD_JUMP_TABLE_LINK): And here.
8871 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8872 * versados.c (versados_bfd_link_just_syms): Define.
8873 * vms.c (vms_bfd_link_just_syms): Define.
8874 * libbfd.h: Regenerate.
8875 * bfd-in2.h: Regenerate.
8876
8877 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8878
8879 * elf32-mips.c: Remove superfluous definitions copied from
8880 elfxx-mips.c.
8881 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8882 SGIish vectors to check the special case.
8883 (mips_elf_hi16_reloc): Fix comment.
8884 (mips_elf_got16_reloc): Likewise.
8885 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8886 (elf_reloc_map): Code cleanup.
8887 (mips_reloc_map): Add comment.
8888 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8889 (mips_elf32_rtype_to_howto): Likewise.
8890 (mips_elf32_discard_info): Likewise.
8891 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8892 lead to IRIX compatibility now.
8893
8894 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8895
8896 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8897
8898 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8899
8900 * config.bfd (shle-*-netbsdelf*): Add target which includes
8901 sh64 support.
8902
8903 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8904
8905 * configure.in: Revert 2002-04-07. Instead, auto-configure
8906 HAVE_ST_C_IMPL.
8907 * configure: Regenerate.
8908 * config.in: Regenerate.
8909 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8910 or AIX_5_CORE.
8911
8912 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8913
8914 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8915 corefiles as well.2
8916 * configure: Regenerate.
8917
8918 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8919
8920 * Makefile.am (install-data-local): Install headers to
8921 $(exec_prefix)/include.
8922 * Makefile.in: Regenerate.
8923
8924 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8925 Daniel Jacobowitz <drow@mvista.com>
8926
8927 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8928 map BFD_RELOC_RVA.
8929
8930 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8931
8932 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8933 hppa*-*-openbsd*): New targets.
8934 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8935 * configure: Regenerate.
8936
8937 2002-05-10 Tom Rix <trix@redhat.com>
8938
8939 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8940 xcoff64_ppc_relocate_section.
8941 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8942 * libxcoff.h: Common xcoff_reloc_type function declaration.
8943
8944 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8945
8946 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8947 added in 2002-05-09 commit.
8948
8949 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8950 don't look for stubs on all undefined syms.
8951
8952 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8953
8954 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8955 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8956 pcrel_offset.
8957
8958 * elf32-i386.c (elf_howto_table): Comments.
8959 (elf_i386_relocate_section): Handle more relocs for relocatable
8960 linking and against SEC_MERGE sections.
8961
8962 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8963
8964 * elf32-ppc.c (ppc_elf_create_got): New function.
8965 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8966 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8967 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8968 _bfd_elf_create_got_section.
8969
8970 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8971
8972 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8973 * elfxx-target.h (elf_backend_rela_normal): Define.
8974 (elfNN_bed): Init rela_normal.
8975 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8976 for section symbols here if rela_normal. Simplify abs section test.
8977 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8978 return immediately. Remove code handling relocatable linking.
8979 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8980 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8981 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8982 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8983 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8984 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8985 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8986 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8987 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8988 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8989 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8990 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8991 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8992 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8993 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8994 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8995 * elf-m10200.c (elf_backend_rela_normal): Define.
8996 * elf-m10300.c (elf_backend_rela_normal): Define.
8997 * elf32-fr30.c (elf_backend_rela_normal): Define.
8998 * elf32-i370.c (elf_backend_rela_normal): Define.
8999 * elf32-i860.c (elf_backend_rela_normal): Define.
9000 * elf32-m68k.c (elf_backend_rela_normal): Define.
9001 * elf32-mcore.c (elf_backend_rela_normal): Define.
9002 * elf32-openrisc.c (elf_backend_rela_normal): Define.
9003 * elf32-ppc.c (elf_backend_rela_normal): Define.
9004 * elf32-s390.c (elf_backend_rela_normal): Define.
9005 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
9006 * elf64-ppc.c (elf_backend_rela_normal): Define.
9007 * elf64-s390.c (elf_backend_rela_normal): Define.
9008 * elf64-x86-64.c (elf_backend_rela_normal): Define.
9009 * elfxx-ia64.c (elf_backend_rela_normal): Define.
9010 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
9011 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
9012
9013 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
9014
9015 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
9016 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
9017
9018 2002-05-06 Alan Modra <amodra@bigpond.net.au>
9019
9020 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
9021 when not relocatable. Fix reloc_emitter call for K&R.
9022
9023 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9024
9025 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
9026 reloading local sym addend mistakenly removed in 2002-05-01 change.
9027
9028 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
9029 (read_abbrevs): Change "offset" param to bfd_vma.
9030 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
9031 Change "abbrev_offset" to bfd_vma.
9032 (read_indirect_string): Use correct conversion chars in error
9033 message format string, cast bfd_vma's to unsigned long.
9034 (read_abbrevs): Likewise.
9035 (read_attribute_value): Likewise.
9036 (decode_line_info): Likewise.
9037 (scan_unit_for_functions): Likewise.
9038 (parse_comp_unit): Likewise.
9039
9040 2002-05-04 Tom Rix <trix@redhat.com>
9041
9042 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
9043 (coff_swap_reloc_out): Same.
9044 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
9045 (xcoff_swap_reloc_out): Same.
9046 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
9047 case some 16 bit relocs. Add reloc value to output.
9048 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
9049 R_RBR. Improve names.
9050 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
9051 (bfd_xcoff_backend_data): Update with new reloc swap names.
9052 (bfd_pmac_xcoff_backend_data) : Same.
9053 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
9054 (xcoff64_swap_reloc_out): Same.
9055 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
9056 R_POS. Add reloc value to output.
9057 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
9058 bit R_RBR. Improve names, masks.
9059 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
9060 (bfd_xcoff_backend_data): Update with new reloc swap names.
9061 (bfd_xcoff_aix5_backend_data) : Same.
9062
9063 2002-05-04 Alan Modra <amodra@bigpond.net.au>
9064
9065 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
9066 bfd_count top_index, input_list, all_local_syms.
9067 (elf32_hppa_setup_section_lists): New function, split from
9068 elf32_hppa_size_stubs.
9069 (elf32_hppa_next_input_section): Likewise.
9070 (group_sections): Likewise.
9071 (get_local_syms): Likewise.
9072 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
9073 stubs on undefined syms too.
9074 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
9075 Only access htab elf fields when we have an elf hash table.
9076 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
9077 (elf32_hppa_next_input_section): Declare.
9078
9079 2002-05-04 Bob Byrnes <byrnes@curl.com>
9080
9081 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
9082 _bfd_new_bfd.
9083
9084 2002-05-03 H.J. Lu (hjl@gnu.org)
9085
9086 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
9087 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
9088 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
9089 to hide a global symbol.
9090 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
9091 forced_local to true.
9092
9093 2002-05-02 Richard Henderson <rth@redhat.com>
9094
9095 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
9096 vs SHN_UNDEF to zero.
9097
9098 2002-05-02 Alan Modra <amodra@bigpond.net.au>
9099
9100 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
9101 16 bit reloc.
9102 <R_PPC64_SECTOFF_DS>: Likewise.
9103 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9104 SECTOFF reloc.
9105 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
9106 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
9107 SECTOFF reloc.
9108
9109 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
9110 (ppc64_elf_ha_reloc): New function.
9111 (ppc64_elf_brtaken_reloc): New function.
9112 (ppc64_elf_sectoff_reloc): New function.
9113 (ppc64_elf_sectoff_ha_reloc): New function.
9114 (ppc64_elf_toc_reloc): New function.
9115 (ppc64_elf_toc_ha_reloc): New function.
9116 (ppc64_elf_toc64_reloc): New function.
9117 (ppc64_elf_unhandled_reloc): New function.
9118 (ppc64_elf_howto_raw): Use the above.
9119 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
9120 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
9121 <R_PPC64_SECTOFF_DS>: Likewise.
9122 (IS_ABSOLUTE_RELOC): Update.
9123 (struct ppc_link_hash_table): Add have_undefweak.
9124 (ppc64_elf_link_hash_table_create): Init.
9125 (func_desc_adjust): Set have_undefweak.
9126 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
9127 add the .sfpr blr when have_undefweak.
9128 (ppc64_elf_setup_section_lists): Check hash table flavour.
9129 (ppc64_elf_next_input_section): Move output_section->owner test to
9130 ppc64elf.em.
9131 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
9132 and relocatable test. Return TOCstart and don't set elf_gp.
9133 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
9134 offset calculation. Add assert on weak sym branch tweaks.
9135 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
9136 (ppc64_elf_toc): Declare.
9137 (ppc64_elf_next_input_section): Update.
9138
9139 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9140
9141 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
9142 file_name.
9143
9144 2002-05-01 Alan Modra <amodra@bigpond.net.au>
9145
9146 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
9147 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
9148 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
9149 call branches. Correct undefined weak destination.
9150 (ppc64_elf_func_desc_adjust): Always create at least one blr in
9151 .sfpr, and correct case where either only savef* or restf* is
9152 needed.
9153
9154 Long branch stubs, multiple stub sections.
9155 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
9156 (ppc64_elf_next_input_section): Declare.
9157 * elf64-ppc.c: Move linker-only prototypes.
9158 (STUB_SUFFIX): Define.
9159 (enum ppc_stub_type): New.
9160 (struct ppc_stub_hash_entry): New.
9161 (struct ppc_branch_hash_entry): New.
9162 (struct ppc_link_hash_entry): Add stub_cache, oh.
9163 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
9164 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
9165 Rename plt_overflow to stub_error.
9166 (ppc_stub_hash_lookup): Define.
9167 (ppc_branch_hash_lookup): Define.
9168 (stub_hash_newfunc): New function.
9169 (branch_hash_newfunc): New function.
9170 (link_hash_newfunc): Init new fields.
9171 (ppc64_elf_link_hash_table_create): Likewise.
9172 (ppc64_elf_link_hash_table_free): New function.
9173 (ppc_stub_name): New function.
9174 (ppc_get_stub_entry): New function.
9175 (ppc_add_stub): New function.
9176 (create_linkage_sections): Use bfd_make_section_anyway. Create
9177 .branch_lt and .rela.branch_lt sections. Don't create .stub.
9178 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
9179 and set up for plt call stubs. Link func and func desc syms.
9180 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
9181 (func_desc_adjust): Avoid hash lookup when func desc sym available
9182 via shortcut, and set links when processing.
9183 (ppc64_elf_hide_symbol): Likewise.
9184 (allocate_dynrelocs): Don't allocate stub section here.
9185 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
9186 Remove sstub code.
9187 (ppc_type_of_stub): New function.
9188 (build_one_stub): Delete.
9189 (ppc_build_one_stub): New function.
9190 (ppc_size_one_stub): New function.
9191 (ppc64_elf_setup_section_lists): New function.
9192 (ppc64_elf_next_input_section): New function.
9193 (group_sections): New function.
9194 (get_local_syms): New function.
9195 (ppc64_elf_size_stubs): Rewrite.
9196 (ppc64_elf_build_stubs): Rewrite.
9197 (ppc64_elf_relocate_section): Look up stub entry for REL24
9198 relocs. Don't propagate REL14* to dynamic objects. Look for long
9199 branch stubs if REL14* or REL24 relocs won't reach.
9200 (bfd_elf64_bfd_link_hash_table_free): Define.
9201
9202 2002-04-30 Mark Mitchell <mark@codesourcery.com>
9203
9204 * config.bfd: Add support for powerpc-*-windiss.
9205
9206 2002-04-30 Tom Rix <trix@redhat.com>
9207
9208 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
9209 symbol names into the hash table.
9210
9211 2002-04-28 Tom Rix <trix@redhat.com>
9212
9213 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
9214 calulating relocations.
9215 (xcoff_complain_overflow) : Function table for relocation errors.
9216 (xcoff_ppc_relocate_section): Use relocation and complain function
9217 tables.
9218 (xcoff_complain_overflow_unsigned_func): New complain function.
9219 (xcoff_complain_overflow_signed_func): Same.
9220 (xcoff_complain_overflow_bitfield_func): Same.
9221 (xcoff_complain_overflow_dont_func): Same.
9222 (xcoff_reloc_type_crel): New recot function.
9223 (xcoff_reloc_type_br): Same.
9224 (xcoff_reloc_type_ba): Same.
9225 (xcoff_reloc_type_toc): Same.
9226 (xcoff_reloc_type_rel): Same.
9227 (xcoff_reloc_type_neg): Same.
9228 (xcoff_reloc_type_pos): Same.
9229 (xcoff_reloc_type_fail): Same.
9230 (xcoff_reloc_type_noop): Same.
9231 * libxcoff.h : Declare common parts for xcoff64.
9232 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
9233 and complain function tables.
9234
9235 2002-04-28 Alan Modra <amodra@bigpond.net.au>
9236
9237 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
9238 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
9239
9240 2002-04-26 Alan Modra <amodra@bigpond.net.au>
9241
9242 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
9243 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
9244
9245 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
9246 same as the output before calling elf_link_input_bfd.
9247
9248 * coffcode.h (coff_compute_section_file_positions): Set
9249 section_tail after shuffling section list.
9250
9251 2002-04-24 Christian Groessler <chris@groessler.org>
9252
9253 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
9254 addresses are 23bit with a special layout, not plain 32bit
9255 values. Prevent relocation of immediate values.
9256
9257 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
9258
9259 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
9260 MIPS-16 ASE flags are set, print something to indicate that.
9261
9262 2002-04-23 Alan Modra <amodra@bigpond.net.au>
9263
9264 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
9265 under which a plt call stub is used.
9266 (final_link_relocate): Similarly.
9267 (allocate_plt_static): Clear h-plabel except when plt entry is
9268 exclusively used for a plabel.
9269 (allocate_dynrelocs): Use the above to simplify plt sizing.
9270 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
9271 (elf32_hppa_link_hash_table_create): Init.
9272 (BL22_RP): Define.
9273 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
9274 (elf32_hppa_check_relocs): Set has_22bit_branch.
9275
9276 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
9277 (final_link_relocate): Likewise.
9278
9279 2002-04-22 Jakub Jelinek <jakub@redhat.com>
9280
9281 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
9282 search table if some FDE is DW_EH_PE_aligned encoded either.
9283 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
9284
9285 2002-04-22 Richard Smith <richard@ex-parrot.com>
9286 Jakub Jelinek <jakub@redhat.com>
9287
9288 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
9289 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9290 encoded personality.
9291 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9292 for CIE/FDE removal.
9293
9294 2002-04-20 Tom Rix <trix@redhat.com>
9295
9296 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9297
9298 2002-04-20 Alan Modra <amodra@bigpond.net.au>
9299
9300 * archures.c (bfd_lookup_arch): Move the list order comment..
9301 (struct bfd_arch_info): ..to where it belongs.
9302 * bfd-in2.h: Regenerate.
9303
9304 * archures.c (bfd_lookup_arch): Add comment on list order.
9305 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9306 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9307 is always at head of list.
9308
9309 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9310
9311 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9312 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9313 definition of these functions for ARM_WINCE builds as they are
9314 not used.
9315 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
9316 for ARM_WINCE builds.
9317
9318 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9319
9320 * coff-arm.c (bfd_arm_process_before_allocation):
9321
9322 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
9323
9324 * cpu-sh.c (scan_mach): Delete.
9325 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9326 (bfd_sh_arch): Likewise.
9327
9328 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9329
9330 * ihex.c (ihex_write_object_contents): Fix check for records
9331 crossing 64K boundaries.
9332
9333 2002-04-16 Alan Modra <amodra@bigpond.net.au>
9334
9335 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9336 type rather than just assuming entries are ELF.
9337 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9338 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9339 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9340 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9341 rather than elf_link_hash_entry.
9342
9343 2002-04-15 Richard Henderson <rth@redhat.com>
9344
9345 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9346 n32 binaries.
9347
9348 2002-04-15 Michael Snyder <msnyder@redhat.com>
9349
9350 * opncls.c (bfd_close): Write contents if writeable.
9351 Minor formatting tidy-ups.
9352
9353 2002-04-15 Alan Modra <amodra@bigpond.net.au>
9354
9355 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9356
9357 2002-04-12 Michael Snyder <msnyder@redhat.com>
9358
9359 * bfd-in.h (bfd_get_section_lma): New access macro.
9360 Minor white-space fix-up.
9361
9362 2002-04-12 Alan Modra <amodra@bigpond.net.au>
9363
9364 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9365 header pad.
9366
9367 2002-04-09 DJ Delorie <dj@redhat.com>
9368
9369 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9370
9371 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9372
9373 * coffcode.h (coff_read_word): New.
9374 (coff_compute_checksum): New.
9375 (coff_apply_checksum): New.
9376 (coff_write_object_contents): Call coff_apply_checksum () to
9377 apply checksum to PE image.
9378
9379 2002-04-08 Randolph Chung <tausq@debian.org>
9380
9381 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9382 (elf32_hppa_final_link): Split out sorting logic to..
9383 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9384 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9385
9386 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9387
9388 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9389 pattern.
9390 * configure: Re-generate.
9391
9392 2002-04-07 Andrew Cagney <ac131313@redhat.com>
9393
9394 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9395 is greater or equal to 4.3.3.
9396 * configure: Regenerate.
9397 Fix PR gdb/344.
9398
9399 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
9400
9401 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9402 R_CRIS_32_PCREL>: Fix typo in name.
9403 (cris_elf_check_relocs): Always create .rela.got here when
9404 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9405 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9406 assume it's created.
9407
9408 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
9409
9410 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9411 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9412 define.
9413 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9414 * bfd.c (bfd_link_hash_table_free): Define.
9415 * binary.c (binary_bfd_link_hash_table_free): Define.
9416 * bout.c (b_out_bfd_link_hash_table_free): Define.
9417 * coff-rs6000.c (rs6000coff_vec): Include
9418 _bfd_generic_link_hash_table_free.
9419 (pmac_xcoff_vec): Likewise.
9420 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9421 (aix5coff64_vec): Likewise.
9422 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9423 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9424 (bfd_elf32_bfd_link_hash_table_free): Define.
9425 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9426 (bfd_elf32_bfd_link_hash_table_free): Define.
9427 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9428 define.
9429 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9430 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9431 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9432 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9433 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9434 (_bfd_generic_link_hash_table_free): Add prototype.
9435 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9436 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9437 * linker.c (_bfd_generic_link_hash_table_free): New function.
9438 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9439 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9440 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9441 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9442 * som.c (som_bfd_link_hash_table_free): Define.
9443 * srec.c (srec_bfd_link_hash_table_free): Define.
9444 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9445 * versados.c (versados_bfd_link_hash_table_free): Define.
9446 * vms.c (vms_bfd_link_hash_table_free): New function.
9447 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9448
9449 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9450 instead of bfd_alloc.
9451 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9452 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9453 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9454 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9455 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9456 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9457 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9458 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9459 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9460 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9461 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9462 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9463 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9464 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9465 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9466 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9467 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9468 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9469 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9470 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9471 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9472 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9473 * m68klinux.c (linux_link_hash_table_create): Likewise.
9474 * sparclinux.c (linux_link_hash_table_create): Likewise.
9475 * sunos.c (sunos_link_hash_table_create): Likewise.
9476 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9477
9478 * targets.c: Add _bfd_link_hash_table_free to xvec.
9479
9480 * bfd-in2.h: Regenerate.
9481 * libbfd.h: Regenerate.
9482 * libcoff.h: Regenerate.
9483
9484 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9485
9486 * dep-in.sed: Cope with absolute paths.
9487 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9488 Run "make dep-am".
9489 * Makefile.in: Regenerate.
9490 * coff-arm.c: Fix copyright date.
9491 * cpu-h8300.c: Likewise.
9492 * cpu-i370.c: Likewise.
9493 * cpu-s390.c: Likewise.
9494 * cpu-mips.c: Likewise.
9495 * po/SRC-POTFILES.in: Regenerate.
9496
9497 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9498
9499 * Makefile.am: Add elfxx-mips.c to the known backends.
9500 (elf32-mips.lo): remove dependency to coff/external.h.
9501 * Makefile.in: Regenerate.
9502 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9503 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9504 accordingly.
9505 * configure: Regenerate.
9506 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9507 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9508 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9509 MIPS specific backend functions.
9510 * elf32-mips.c: Moved most code to elfxx-mips.c.
9511 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9512 static.
9513 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9514 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9515 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9516 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9517 interface to allow selection of the right REL or RELA howto table.
9518 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9519 static. Let it refuse n32 objects.
9520 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9521 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9522 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9523 (elf32_mips_ignore_discarded_relocs): Rename from
9524 _bfd_elf32_mips_ignore_discarded_relocs.
9525 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9526 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9527 (elf_mips_howto_table_rela): Remove.
9528 * elf64-mips.c: Moved most code to elfxx-mips.c.
9529 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9530 (mips_elf64_rtype_to_howto): New function.
9531 (mips_elf64_object_p): Likewise.
9532 (elf64_mips_irix_compat): Likewise.
9533 * elfxx-mips.c: New file containing common code merged together from
9534 elf32-mips.c and elf64-mips.c.
9535 * elfxx-mips.h: New file containing MIPS specific prototypes from
9536 elf-bfd.h.
9537 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9538 elf_backend_mips_rtype_to_howto.
9539
9540 2002-04-04 Alan Modra <amodra@bigpond.net.au>
9541
9542 * srec.c (MAXCHUNK, Chunk): Revise comments.
9543 (srec_write_record): Correct buffer size.
9544 (srec_write_header): Do without intermediate buffer.
9545 (srec_write_section): Validate Chunk.
9546 (srec_write_terminator): Pass NULL instead of dummy buffer.
9547 (srec_write_symbols): Pass file and symbol names directly to
9548 bfd_bwrite so sprintf won't overflow buffer.
9549
9550 2002-04-03 Jakub Jelinek <jakub@redhat.com>
9551
9552 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9553 PC relative relocs against hidden symbols.
9554 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9555
9556 2002-04-03 Alan Modra <amodra@bigpond.net.au>
9557
9558 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9559 LMAs, loop over segments until p_vaddr and p_memsz specify an
9560 extent enclosing the section.
9561
9562 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9563
9564 * ihex.c (ihex_write_object_contents): Do not allow records to
9565 cross a 64K boundary - wrap if necessary.
9566
9567 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9568
9569 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9570 which caused the returned LWP ID to always be 0.
9571
9572 2002-04-01 Richard Henderson <rth@redhat.com>
9573
9574 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9575 (elf32_sparc_relocate_section): Use it to figure out when to
9576 initialize .got entries.
9577 * elf64-sparc.c: Similarly.
9578
9579 2002-03-28 Alan Modra <amodra@bigpond.net.au>
9580
9581 * linker.c (link_action): Ignore duplicate warning syms.
9582 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9583 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9584 (elf_adjust_dynamic_symbol): Likewise.
9585 (elf_export_symbol): Likewise.
9586 (elf_link_find_version_dependencies): Likewise.
9587 (elf_link_assign_sym_version): Likewise.
9588 (elf_link_sec_merge_syms): Likewise.
9589 (elf_link_output_extsym): Likewise.
9590 (elf_gc_sweep_symbol): Likewise.
9591 (elf_gc_propagate_vtable_entries_used): Likewise.
9592 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9593 (elf_gc_allocate_got_offsets): Likewise.
9594 (elf_collect_hash_codes): Likewise.
9595 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9596 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9597 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9598 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9599 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9600 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9601 (elf_cris_discard_excess_dso_dynamics): Likewise.
9602 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9603 (mark_PIC_calls): Likewise.
9604 (allocate_plt_static): Likewise.
9605 (allocate_dynrelocs): Likewise.
9606 (readonly_dynrelocs): Likewise.
9607 * elf32-i386.c (allocate_dynrelocs): Likewise.
9608 (readonly_dynrelocs): Likewise.
9609 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9610 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9611 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9612 (mips_elf_sort_hash_table_f): Likewise.
9613 (mips_elf_check_mips16_stubs): Likewise.
9614 * elf32-s390.c (allocate_dynrelocs): Likewise.
9615 (readonly_dynrelocs): Likewise.
9616 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9617 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9618 (xstormy16_relax_plt_realloc): Likewise.
9619 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9620 (elf64_alpha_output_extsym): Likewise.
9621 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9622 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9623 (mips_elf64_check_mips16_stubs): Likewise.
9624 (mips_elf64_output_extsym): Likewise.
9625 * elf64-ppc.c (func_desc_adjust): Likewise.
9626 (allocate_dynrelocs): Likewise.
9627 (readonly_dynrelocs): Likewise.
9628 * elf64-s390.c (allocate_dynrelocs): Likewise.
9629 (readonly_dynrelocs): Likewise.
9630 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9631 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9632 (readonly_dynrelocs): Likewise.
9633 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9634 * aoutx.h (aout_link_write_other_symbol): Likewise.
9635 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9636 (_bfd_coff_write_global_sym): Likewise.
9637 * i386linux.c (linux_tally_symbols): Likewise.
9638 * m68klinux.c (linux_tally_symbols): Likewise.
9639 * sparclinux.c (linux_tally_symbols): Likewise.
9640 * pdp11.c (aout_link_write_other_symbol): Likewise.
9641 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9642 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9643 (xcoff_write_global_symbol): Likewise.
9644
9645 * cofflink.c (_bfd_coff_final_link): Formatting.
9646 * cpu-mips.c (mips_compatible): Make static, prototype.
9647 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9648 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9649 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9650 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9651 (mips_elf64_final_link): Likewise.
9652 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9653 prototype.
9654
9655 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9656
9657 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9658 (SWAP_OUT_RELOC_OFFSET): Define.
9659
9660 2002-03-27 Gregory Steuck <greg@nest.cx>
9661
9662 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9663 terminating NULL if empty symbol table.
9664 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9665
9666 2002-03-26 H.J. Lu (hjl@gnu.org)
9667
9668 * elflink.h (elf_link_input_bfd): Revert the last change since
9669 the gcc exception handling isn't fixed yet.
9670
9671 2002-03-26 H.J. Lu (hjl@gnu.org)
9672
9673 * elflink.h (elf_link_input_bfd): Complain about relocations
9674 against local symbols in discarded sections.
9675
9676 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9677
9678 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9679
9680 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9681
9682 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9683 section file offset for !SEC_LOAD sections.
9684
9685 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9686
9687 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9688 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9689
9690 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9691
9692 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9693 Whitespace changes.
9694 * archive.c: Update copyright date.
9695 * bfd-in2.h: Regenerate.
9696 * libbfd.h: Regenerate.
9697 * Makefile.am: Run "make dep-am"
9698 * Makefile.in: Regenerate.
9699 * po/SRC-POTFILES.in: Regenerate.
9700
9701 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9702
9703 * dwarf2.c (struct funcinfo): Move up.
9704 (lookup_address_in_function_table): New argument function_ptr.
9705 Set it.
9706 (lookup_address_in_line_table): New argument function. If function
9707 is non-NULL, use it to handle ``addr'' before the first line note of
9708 the function.
9709 (comp_unit_find_nearest_line): Update and swap calls to
9710 lookup_address_in_function_table and lookup_address_in_line_table.
9711 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9712 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9713
9714 2002-03-20 Tom Rix <trix@redhat.com>
9715
9716 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9717 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9718 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9719
9720 2002-03-19 Tom Rix <trix@redhat.com>
9721
9722 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9723 dynamic objects in archives.
9724
9725 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9726
9727 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9728 STT_NOTYPE symbols to STT_OBJECT.
9729
9730 2002-03-18 Jan Hubicka <jh@suse.cz>
9731
9732 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9733
9734 2002-03-18 Tom Rix <trix@redhat.com>
9735
9736 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9737 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9738 * coff-rs6000 (do_pad) : New function for archive padding.
9739 (do_copy) : New function for object file copying in archives.
9740 (do_shared_object_padding) : New function for padding shared
9741 objects to their text section alignment in archives.
9742 (bfd_xcoff_ar_achive_set_magic) : Stub.
9743 (xcoff_write_armap_big) : Use do_copy and do_pad.
9744 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9745 do_copy and do_pad.
9746 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9747 bfd_xcoff_magic_number.
9748 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9749 fop.
9750 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9751 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9752 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9753 * rs6000-core.c : Update copyright date.
9754 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9755 csectpp.
9756 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9757 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9758 (coff_set_flags) : Use bfd_xcoff_magic_number.
9759 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9760 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9761 * Makefile.am : Same.
9762 * config.bfd : Same.
9763 * targets.c : Same.
9764 * configure : Regnerate.
9765 * Makefile.in : Same.
9766 * bfd-in2.h : Same.
9767
9768 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9769
9770 * po/fr.po: Updated version.
9771
9772 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9773
9774 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9775 * libbfd.h: Regenerate.
9776 * archive.c (coff_write_armap): Pass on failures from
9777 bfd_write_bigendian_4byte_int.
9778
9779 2002-03-14 H.J. Lu <hjl@gnu.org>
9780
9781 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9782 error to bfd_error_nonrepresentable_section for reinit_array
9783 section in DSO.
9784
9785 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9786
9787 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9788 OR it in rather than replacing previously selected flags.
9789
9790 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9791 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9792
9793 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9794
9795 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9796 (N): Use the above.
9797 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9798 ensure reloc size matches before calling elf_link_input_bfd.
9799 Add an assert to check reloc size when counting output relocs.
9800
9801 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9802
9803 * mmo.c (mmo_get_loc): Return NULL rather than false.
9804
9805 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9806
9807 * po/fr.po: Updated version.
9808
9809 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9810
9811 * archures.c (bfd_default_compatible): Test bits_per_word.
9812 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9813 bfd_default_compatible.
9814 * cpu-i370.c (i370_compatible): Likewise.
9815 * cpu-sparc.c (sparc_compatible): Likewise.
9816 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9817
9818 * elflink.h: Formatting fixes.
9819 (elf_link_output_extsym): Merge undefined and undef weak cases.
9820
9821 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9822 when word size of input matches output word size.
9823
9824 2002-03-12 Andreas Jaeger <aj@suse.de>
9825
9826 * cpu-i386.c (i386_compatible): New. Use it instead of
9827 bfd_default_compatible.
9828
9829 2002-03-07 H.J. Lu (hjl@gnu.org)
9830
9831 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9832 as the type for bfd_reloc_val.
9833
9834 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9835
9836 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9837 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9838 (elf_hppa_final_link_relocate): Correct relocations for indirect
9839 references to local data through the DLT. Fix .opd creation for
9840 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9841 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9842 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9843 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9844 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9845 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9846 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9847
9848 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9849
9850 * merge.c (_bfd_merge_sections): Don't segfault if there
9851 is nothing to merge due to GC.
9852
9853 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9854
9855 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9856 symbols that have been forced local.
9857
9858 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9859 to output forced local syms for non-shared link.
9860 (elf_link_output_extsym): Tweak condition for calling backend
9861 adjust_dynamic_symbol so that previous behaviour is kept.
9862 Whitespace changes throughout file.
9863
9864 2002-03-04 H.J. Lu <hjl@gnu.org>
9865
9866 * elf.c (bfd_section_from_shdr): Handle special sections,
9867 .init_array, .fini_array and .preinit_array.
9868 (elf_fake_sections): Likewise.
9869
9870 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9871 DT entry only if the section is in output for .init_array,
9872 .fini_array and .preinit_array. Complain about .preinit_array
9873 section in DSO.
9874 (elf_bfd_final_link): Warn zero size for .init_array,
9875 .fini_array and .preinit_array sections.
9876
9877 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9878 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9879 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9880 .preinit_array.
9881
9882 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9883
9884 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9885 * configure: Regenerate.
9886
9887 2002-03-02 Tom Rix <trix@redhat.com>
9888
9889 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9890 symbolic equiv.
9891 * coff-rs6000.c (xcoff_howto_table): Same.
9892
9893 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9894
9895 * elflink.h (size_dynamic_sections): If section named
9896 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9897 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9898 ".init_array" and ".fini_array".
9899 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9900 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9901 DT_FINI_ARRAY.
9902
9903 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9904
9905 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9906 dynsyms.
9907
9908 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9909
9910 * elf64-hppa.h: Update copyright date.
9911
9912 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9913 (ppc64_elf_relocate_section): Don't generate power4 style branch
9914 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9915
9916 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9917
9918 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9919 last patch.
9920 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9921
9922 2002-02-21 Andreas Jaeger <aj@suse.de>
9923
9924 * elf64-x86-64.c: Major rework that introduces all recent changes
9925 to the x86-64 backend. Get a closer match to elf32-i386.
9926 (struct elf64_x86_64_dyn_relocs): Rename from
9927 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9928 all users.
9929 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9930 sections.
9931 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9932 remove casts, initialize new hash members.
9933 (create_got_section): New.
9934 (elf64_x86_64_create_dynamic_sections): New.
9935 (elf64_x86_64_copy_indirect_symbol): New.
9936 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9937 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9938 Reference count possible .plt and .got entries. Don't test input
9939 section SEC_READONLY here to try to avoid copy relocs, and keep
9940 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9941 DF_TEXTREL here. Delay setting of variables until needed. Cache
9942 pointer to "sreloc" section in elf_section_data. Tweak condition
9943 under which .got created. Report files with bad relocation
9944 section names.
9945 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9946 Reference count possible .plt entries. Don't deallocate .got and
9947 .relgot space here.
9948 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9949 do copy reloc processing for weakdefs. Remove redundant casts and
9950 aborts. Delay setting of vars until needed. Move creation of
9951 dynamic symbols and allocation of .plt and .rela.plt to
9952 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9953 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9954 (allocate_dynrelocs): New.
9955 (readonly_dynrelocs): New.
9956 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9957 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9958 Zero out the dynamic allocated content space.
9959 (elf64_x86_64_discard_copies): Removed.
9960 (elf64_x86_64_relocate_section): Make use of dynamic section
9961 short-cuts. Localise vars, and delay setting. Better error
9962 reporting, replace BFD_ASSERT with abort. Check
9963 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9964 regular object file and tread the weak definition as the normal
9965 one. Don't discard relocs for undefweak or undefined symbols and
9966 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9967 relocs.
9968 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9969 symbols that have been forced local. Use same test to decide if
9970 we can use a relative reloc for got as relocate_section. Expand
9971 SHN_UNDEF comment. Move expressions out of function calls.
9972 Replace BFD_ASSERT with abort.
9973 (bfd_elf64_bfd_final_link): Removed.
9974 (elf_backend_copy_indirect_symbol): Define.
9975
9976 2002-02-20 Tom Rix <trix@redhat.com>
9977
9978 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9979 (_bfd_xcoff_reloc_type_lookup): Use it.
9980 * coff64-rs6000.c (xcoff64_howto_table): Same.
9981 (xcoff64_reloc_type_lookup): Same.
9982
9983 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9984
9985 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9986 little endian.
9987
9988 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9989
9990 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9991 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9992 * bfd-in2.h: Regenerate.
9993 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9994 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9995 with "s390:64-bit".
9996 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9997 (elf_s390_reloc_type_lookup): Likewise.
9998 (elf_s390_check_relocs): Likewise.
9999 (elf_s390_gc_sweep_hook): Likewise.
10000 (elf_s390_relocate_section): Likewise.
10001 (elf_s390_object_p): Use renamed architecture define.
10002 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
10003
10004 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
10005
10006 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
10007
10008 2002-02-19 Jakub Jelinek <jakub@redhat.com>
10009
10010 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
10011 absptr -> pcrel optimization for shared libs.
10012 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
10013 library cannot be converted to pcrel.
10014 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
10015 relative.
10016 * elf32-i386.c (elf_i386_relocate_section): If
10017 _bfd_elf_section_offset returned -2, skip, but make sure the
10018 relocation is installed.
10019 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
10020 * elf32-cris.c (cris_elf_relocate_section): Likewise.
10021 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
10022 * elf32-i370.c (i370_elf_relocate_section): Likewise.
10023 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
10024 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
10025 * elf32-s390.c (elf_s390_relocate_section): Likewise.
10026 * elf32-sh.c (sh_elf_relocate_section): Likewise.
10027 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
10028 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
10029 * elf64-s390.c (elf_s390_relocate_section): Likewise.
10030 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
10031 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
10032 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
10033 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
10034 _bfd_elf_section_offset returning -2 the same way as -1.
10035 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
10036 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
10037 and BFD_ASSERT.
10038 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
10039
10040 2002-02-18 Tom Rix <trix@redhat.com>
10041
10042 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
10043 (bfd_xcoff_size_dynamic_sections): Same.
10044 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
10045 (bfd_xcoff_size_dynamic_sections): Same.
10046 * coff-rs6000.c (xcoff_generate_rtinit): Same.
10047 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
10048 * libxcoff.h (struct xcoff_backend_data_rec): Same.
10049 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
10050 * bfd-in2.h: Regenerate.
10051
10052 2002-02-18 Alan Modra <amodra@bigpond.net.au>
10053
10054 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
10055 (struct ppc_link_hash_table): Add sfpr.
10056 (ppc64_elf_link_hash_table_create): Init it.
10057 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
10058 .glink out to..
10059 (create_linkage_sections): ..here. Make .sfpr too.
10060 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
10061 dynobj early.
10062 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
10063 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
10064 ._restf* functions, and create as needed.
10065 (func_desc_adjust): Only force_local for shared libs.
10066
10067 2002-02-18 David O'Brien <obrien@FreeBSD.org>
10068
10069 * configure.in: Bump version number post 2.12 branching.
10070 * configure: Regenerate.
10071
10072 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
10073
10074 * mmo.c: Correct and improve comments.
10075 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
10076 zero-pad. Use input to fill up non-empty bfd buffer.
10077 (mmo_flush_chunk): New function.
10078 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
10079 changed. Don't emit location specifier if VMA is same as
10080 *LAST_VMAP after omitting leading zero contents. Call
10081 mmo_flush_chunk before emitting location specifier.
10082 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
10083 with mmo_write_loc_chunk calls.
10084 (mmo_internal_write_section): Call mmo_flush_chunk after
10085 mmo_write_chunk.
10086 (mmo_write_symbols_and_terminator): Move :Main to first position
10087 in symbol array. Add faked one if it does not exist if there are
10088 other symbols. Don't add it if there are no symbols at all. Move
10089 out test for value of :Main from symbol loop. Rename table
10090 fakemain to maintable and variable mainsym to fakemain.
10091
10092 2002-02-15 Richard Henderson <rth@redhat.com>
10093
10094 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
10095 section with no got matches any got. Simplify error generaion.
10096
10097 2002-02-15 Alan Modra <amodra@bigpond.net.au>
10098
10099 Support arbitrary length fill patterns.
10100 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
10101 (_bfd_default_link_order): Remove bfd_fill_link_order code.
10102 Call default_data_link_order.
10103 (default_fill_link_order): Delete.
10104 (default_data_link_order): New function.
10105 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
10106 of bfd_fill_link_order with bfd_data_link_order.
10107 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
10108 * elf64-mips.c (mips_elf64_final_link): Likewise.
10109
10110 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
10111 Correct value returned in "end" for "0x<non-hex>".
10112
10113 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
10114
10115 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
10116 (scan): Test against 'mach' field in info structure.
10117
10118 2002-02-14 Alan Modra <amodra@bigpond.net.au>
10119
10120 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
10121
10122 2002-02-14 Matt Fredette <fredette@netbsd.org>
10123
10124 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
10125 EF_M68000.
10126
10127 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
10128
10129 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
10130 non-zero physical addresses when adjusting the LMAs of new
10131 sections.
10132
10133 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
10134
10135 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
10136 from _bfd_elf_hppa_gen_reloc_type.
10137 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
10138 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
10139 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
10140 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
10141
10142 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
10143
10144 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
10145 loading its contents if there's nothing to do in it.
10146
10147 2002-02-12 Alan Modra <amodra@bigpond.net.au>
10148
10149 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
10150 64k boundary.
10151
10152 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
10153 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
10154 (ppc64_elf_finish_dynamic_sections): Set values for them.
10155
10156 2002-02-11 Michael Snyder <msnyder@redhat.com>
10157
10158 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
10159 * elf.c (elfcore_grok_pstatus): Add prototype.
10160 (elfcore_grok_lwpstatus): Add prototype.
10161 (elfcore_write_lwpstatus): New function.
10162 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
10163
10164 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
10165
10166 * elf32-sh.c: Added missing prototypes.
10167 * elf32-sh64.c: Likewise.
10168 (sh_elf_align_loads): Mark unused args as such.
10169 * elf64-sh64.c: Added missing prototypes.
10170 (struct elf_sh64_link_hash_entry): Fix typo.
10171 (sh_elf64_relocate_section): Fix info argument passed to
10172 _bfd_elf_section_offset.
10173
10174 2002-02-11 Alan Modra <amodra@bigpond.net.au>
10175
10176 * Makefile.am: "make dep-am".
10177 * Makefile.in: Regenerate.
10178 * aclocal.m4: Regenerate.
10179 * config.in: Regenerate.
10180 * configure: Regenerate.
10181
10182 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
10183
10184 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
10185 variable warnings.
10186 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
10187 comparison warning.
10188 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
10189 cast warnings for the common case.
10190
10191 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
10192
10193 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
10194 vectors.
10195 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
10196 vectors.
10197
10198 2002-02-09 Richard Henderson <rth@redhat.com>
10199
10200 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
10201 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
10202 (elf64_alpha_relocate_section): Likewise.
10203 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
10204 * bfd-in2.h, libbfd.h: Rebuild.
10205
10206 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
10207
10208 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
10209 that base-plus-offset reloc accounting is consistent.
10210 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
10211 up to date for undefined symbols.
10212
10213 2002-02-08 Eric Christopher <echristo@redhat.com>
10214
10215 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
10216
10217 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
10218 sections for the O32 ABI.
10219
10220 2002-02-08 Chris Demetriou <cgd@broadcom.com>
10221
10222 * elf32-arm.h: Fix formatting of _("...").
10223 * elf32-d10v.c: Likewise.
10224 * elf32-m68k.c: Likewise.
10225 * elf32-mips.c: Likewise.
10226
10227 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
10228
10229 * coff-or32.c: Fix compile time warning messages.
10230
10231 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
10232
10233 Contribute sh64-elf.
10234 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
10235 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
10236 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
10237 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
10238 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
10239 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
10240 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
10241 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
10242 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
10243 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
10244 New relocs.
10245 * libbfd.h, bfd-in2.h: Rebuilt.
10246 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
10247 (sh_reloc_map): Map them.
10248 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
10249 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
10250 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
10251 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
10252 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
10253 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
10254 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
10255 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
10256 datalabel_got_offset.
10257 (sh_elf_link_hash_newfunc): Initialize it.
10258 (sh_elf_relocate_section): Augment the scope of
10259 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
10260 GOT and GOTOFF handling to new SHmedia relocation types. Support
10261 GOT_BIAS.
10262 (sh_elf_check_relocs): Likewise.
10263 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
10264 PLT entries using movi_shori_putval. Support GOT_BIAS.
10265 (sh_elf_finish_dynamic_sections): Likewise.
10266 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
10267 relocation, it's now done by the caller.
10268 (GOT_BIAS): New.
10269 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
10270 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
10271 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
10272 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
10273 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
10274 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
10275 sh64_elf64_hash_table): New.
10276 (sh_elf64_howto_table): Introduce new relocs.
10277 (sh_elf64_info_to_howto): Accept new PIC relocs.
10278 (sh_elf64_relocate_section): Augment the scope of
10279 seen_stt_datalabel. Support new PIC relocs.
10280 (sh_elf64_check_relocs): Support new PIC relocs.
10281 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
10282 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
10283 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
10284 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
10285 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
10286 movi_shori_putval, movi_3shori_putval,
10287 sh64_elf64_create_dynamic_sections,
10288 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
10289 sh64_elf64_size_dynamic_sections,
10290 sh64_elf64_finish_dynamic_symbol,
10291 sh64_elf64_finish_dynamic_sections): New.
10292 (elf_backend_create_dynamic-sections,
10293 bfd_elf64_bfd_link_hash_table_create,
10294 elf_backend_adjust_dynamic_symbol,
10295 elf_backend_size_dynamic_sections,
10296 elf_backend_finish_dynamic_symbol,
10297 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10298 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10299 elf_backend_got_header_size, elf_backend_plt_header_size):
10300 Define.
10301 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10302 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10303 match official numbers and names; moved unmaching ones to the
10304 range 0xf2-0xff.
10305 * elf32-sh64.c, elf64-sh64.c: Likewise.
10306 2001-03-12 DJ Delorie <dj@redhat.com>
10307 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10308 sections.
10309 2001-03-12 DJ Delorie <dj@redhat.com>
10310 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10311 be aligned.
10312 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
10313 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
10314 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10315 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10316 .cranges section with SEC_SORT_ENTRIES set.
10317 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10318 incoming sorted .cranges section.
10319 (sh64_bfd_elf_copy_private_section_data): New.
10320 (sh64_elf_final_write_processing): Only sort .cranges and modify
10321 start address if called by linker.
10322 2001-01-08 Ben Elliston <bje@redhat.com>
10323 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
10324 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
10325 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
10326 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10327 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10328 line. Add comments before all entries.
10329 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10330 comment.
10331 (sh_elf64_reloc): Correct head comment.
10332 (sh_elf64_relocate_section): Correct spacing.
10333 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10334 instead call reloc_dangerous callback.
10335 <case R_SH_SHMEDIA_CODE>: New case.
10336 (sh_elf64_gc_mark_hook): Correct spacing.
10337 (sh_elf64_check_relocs): Ditto.
10338 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10339 New case.
10340 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10341 functions.
10342 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10343 clarify describing comment. Add comments before all entries.
10344 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10345 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
10346 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
10347 Sort .cranges section in final link. Prepare to set bit 0 on
10348 entry address.
10349 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10350 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10351 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10352 .cranges section.
10353 (sh64_backend_section_from_shdr): New, to recognize
10354 SHT_SH5_CR_SORTED on incoming .cranges section.
10355 (elf_backend_section_from_shdr): Define.
10356 (sh64_elf_final_write_processing): Sort outgoing .cranges
10357 section. (New, temporarily disabled:) Set bit 0 on entry address
10358 according to ISA type.
10359 (sh64_find_section_for_address): New.
10360 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10361 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10362 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10363 bfd_malloc, not xmalloc.
10364 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10365 global.
10366 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10367 temporarily disabled) setting bit 0 on entry address.
10368 (elf_backend_final_write_processing): Define.
10369 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
10370 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10371 be a proper relocation for PTA and PTB rather than a marker.
10372 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10373 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10374 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10375 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10376 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10377 Zero src_mask.
10378 * elf64-sh64.c: Ditto.
10379 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10380 * elf32-sh64.c: Include opcodes/sh64-opc.h
10381 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10382 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10383 parameters. No unused parameters. Caller changed.
10384 <case R_SH_PT_16>: New case.
10385 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10386 * Makefile.in: Regenerate.
10387 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
10388 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10389 all code sections.
10390 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10391 (sh64_elf_merge_private_data): Ditto.
10392 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10393 to access stored section flags.
10394 (sh64_elf_final_write_processing): Return immediately unless
10395 called by linker. Use sh64_elf_section_data (cranges) to get size
10396 of linker-generated cranges entries.
10397 (sh64_elf_copy_private_data): Add missing "return true".
10398 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10399 (sh_elf64_merge_private_data): Ditto.
10400 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
10401 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10402 elf64-sh64.c:sh64_elf_fake_sections.
10403 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
10404 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
10405 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10406 (sh64_elf_final_write_processing): New.
10407 (elf_backend_final_write_processing): Define.
10408 (sh64_elf_fake_sections): Get header flags from tdata field.
10409 (sh64_elf_copy_private_data): Do not call
10410 sh64_elf_copy_private_data_internal, just copy e_flags field.
10411 (sh64_elf_merge_private_data): Do not call
10412 sh64_elf_copy_private_data_internal.
10413 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
10414 Remove EF_SH64_ABI64, let ELF size make difference.
10415 Remove SH64-specific BFD section flag.
10416 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10417 containing SHmedia through elf_section_data (asect)->tdata
10418 non-zero, not using a BFD section flag.
10419 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10420 (sh64_elf_merge_private_data): Similar.
10421 (elf_backend_section_flags): Don't define.
10422 (sh64_elf_backend_section_flags): Delete.
10423 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10424 not EF_SH64_ABI64.
10425 (sh_elf64_merge_private_data): Similar.
10426 * section.c (Section flags definitions): Don't define
10427 SEC_SH_ISA_SHMEDIA.
10428 (bfd-in2.h): Regenerate.
10429 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
10430 Make DataLabel references work with partial linking.
10431 * elf32-sh64.c: Fix formatting.
10432 (sh64_elf_link_output_symbol_hook): New.
10433 (elf_backend_link_output_symbol_hook): Define to
10434 sh64_elf_link_output_symbol_hook.
10435 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10436 undefined if partial linking. Adjust sanity check.
10437 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10438 (elf_backend_link_output_symbol_hook): Define to
10439 sh64_elf64_link_output_symbol_hook.
10440 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10441 undefined if partial linking. Adjust sanity check.
10442 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
10443 Implement semantics for inter-file DataLabel references.
10444 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10445 (sh64_elf64_add_symbol_hook): New.
10446 (sh_elf64_relocate_section): If passing an indirect symbol with
10447 st_type STT_DATALABEL on the way to a symbol with st_other
10448 STO_SH5_ISA32, do not bitor 1 to the relocation.
10449 (elf_backend_add_symbol_hook): Define to
10450 sh64_elf64_add_symbol_hook.
10451 * elf64-sh32.c: Tweak comments.
10452 (DATALABEL_SUFFIX): Define.
10453 (sh64_elf_add_symbol_hook): New.
10454 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10455 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10456 symbol with st_type STT_DATALABEL on the way to a symbol with
10457 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
10458 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
10459 Pass through STT_DATALABEL.
10460 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10461 (elf_backend_get_symbol_type): Define.
10462 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10463 (elf_backend_get_symbol_type): Define.
10464 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
10465 * elf32-sh64.c: Tweak comments.
10466 (sh64_elf_copy_private_data_internal): Add prototype.
10467 (bfd_elf32_bfd_set_private_flags): Define.
10468 (sh64_elf_copy_private_data_internal): Compare machine name, not
10469 textual BFD target name, to check whether to copy section flag
10470 SHF_SH5_ISA32.
10471 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10472 Tweak section-contents-type-mismatch message.
10473 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10474 Validize reloc-types.
10475 * elf64-sh64.c: New file.
10476 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10477 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10478 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10479 Regenerate dependencies.
10480 * Makefile.in: Regenerate.
10481 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10482 bfd_elf64_sh64l_vec.
10483 * configure.in: Handle bfd_elf64_sh64_vec and
10484 bfd_elf64_sh64l_vec.
10485 * configure: Regenerate.
10486 * po/POTFILES.in: Regenerate.
10487 * po/bfd.pot: Regenerate.
10488 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
10489 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10490 anything else but EF_SH64 and EF_SH64_ABI64.
10491 (sh64_elf_merge_private_data): Emit error for anything else but
10492 EF_SH64 and EF_SH64_ABI64.
10493 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10494 from targ_selvecs.
10495 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10496 bfd_elf32_sh64l_vec as a temporary measure.
10497 * configure: Regenerate.
10498 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
10499 * cpu-sh.c (arch_info_struct): Include sh5 item
10500 unconditionalized.
10501 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10502 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10503 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10504 * elf32-sh64.c: Tweak comments.
10505 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10506 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10507 (sh64_elf_copy_private_data_internal): Wrap long line.
10508 (sh64_elf_merge_private_data): Rewrite to allow objects from
10509 SH64 subsets to be linked together.
10510 (INCLUDE_SHMEDIA): Define.
10511 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10512 Parenthesize plus-expression inside or-expression.
10513 <global symbol>: Ditto.
10514 (sh_elf_set_mach_from_flags): Remove code refusing
10515 deleted EF_SH64_32BIT_ABI flag.
10516 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
10517 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10518 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10519 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10520 (sh_elf_relocate_section) <local symbol>: Or 1 in
10521 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10522 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10523 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10524 relocation.
10525 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
10526 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10527 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10528 Regenerate dependencies.
10529 * Makefile.in: Regenerate.
10530 * archures.c: Add bfd_mach_sh5.
10531 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10532 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10533 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10534 * configure: Regenerate.
10535 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10536 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10537 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10538 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10539 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10540 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10541 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10542 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10543 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10544 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10545 in item for SH5.
10546 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10547 for SHmedia relocs.
10548 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10549 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10550 shmedia_prepare_reloc, goto final_link_relocate if it returns
10551 non-zero, else fail as before.
10552 (sh_elf_set_mach_from_flags): Provide function only if not defined
10553 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10554 (sh_elf_set_private_flags): Provide function only if not defined
10555 as a macro.
10556 (sh_elf_copy_private_data): Similar.
10557 (sh_elf_merge_private_data): Similar.
10558 * section.c (SEC_SH_ISA_SHMEDIA): New.
10559 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10560 * elf32-sh64.c: New file.
10561 * libbfd.h: Regenerate.
10562 * bfd-in2.h: Regenerate.
10563 * po/POTFILES.in: Regenerate.
10564 * po/bfd.pot: Regenerate.
10565 * bfd-in2.h: Regenerate.
10566 * libbfd.h: Regenerate.
10567
10568 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
10569
10570 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10571 been included, not drag it in.
10572 * bfd-in2.h: Regenerate.
10573
10574 2002-02-06 H.J. Lu (hjl@gnu.org)
10575
10576 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10577 the mach and ISA fields if necessary.
10578
10579 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10580
10581 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10582 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10583 be sure exactly which architecture this represents.
10584
10585 2002-02-05 Nick Clifton <nickc@redhat.com>
10586
10587 * po/tr.po: Updated translation.
10588
10589 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10590
10591 From Jimi X <jimix@watson.ibm.com>
10592 * archures (bfd_mach_ppc64): Define.
10593 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10594 (bfd_powerpc_arch): Define.
10595 * bfd-in2.h: Regenerate.
10596 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10597 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10598 (bfd_powerpc_archs): Add default powerpc64 arch.
10599
10600 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10601
10602 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10603 against section syms in readonly sections. Don't do the global
10604 sym check if we find one.
10605 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10606 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10607 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10608 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10609 (elf_s390_grok_prstatus): Add missing prototype.
10610
10611 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10612
10613 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10614 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10615 Call bfd_get_section_by_name only once. Initialize
10616 bpodata->n_bpo_relocs_this_section.
10617 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10618 referring to DSOs.
10619 (bpo_reloc_request_sort_fn): Don't use difference of values as
10620 return-value.
10621
10622 2002-02-02 David O'Brien <obrien@FreeBSD>
10623
10624 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10625 version 4.5 and later the same as 5-CURRENT.
10626 * configure: Re-generate.
10627
10628 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10629
10630 * config.bfd (hppa*-*-netbsd*): New target.
10631
10632 2002-01-31 Philipp Thomas <pthomas@suse.de>
10633
10634 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10635 to front of message. Unify messages with elf32-arm.h. Use
10636 commas where neccessary.
10637 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10638 ERROR in messages. Unify messages with coff-arm.c. Correct
10639 VFP/FPA error message.
10640 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10641 APCS-32 for translation.
10642
10643 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10644
10645 Perform on-demand global register allocation from
10646 R_MMIX_BASE_PLUS_OFFSET relocs.
10647 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10648 bpo_reloc_request, struct bpo_greg_section_info): New.
10649 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10650 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10651 _bfd_mmix_check_all_relocs,
10652 _bfd_mmix_prepare_linker_allocated_gregs,
10653 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10654 (elf_mmix_howto_table): Correct src_mask for most relocs.
10655 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10656 case.
10657 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10658 case. Fix typo in comment. New label do_mmix_reloc.
10659 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10660 store first object file with a base-plus-offset reloc. Call
10661 mmix_elf_check_common_relocs for the part common with mmo.
10662 (mmix_elf_final_link): Write out linker-allocated register
10663 contents section.
10664 (elf_backend_gc_sweep_hook): Define.
10665 (bfd_elf64_bfd_relax_section): Define.
10666
10667 * mmo.c: Don't include <ctype.h>
10668 (mmo_init): Correct init-once logic.
10669
10670 2002-02-01 Tom Rix <trix@redhat.com>
10671
10672 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10673
10674 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10675
10676 * Makefile.am: Run "make dep-am"
10677 * Makefile.in: Regenerate.
10678
10679 2002-01-31 David O'Brien <obrien@FreeBSD>
10680
10681 * configure.in: Recognize the differences in core files from FreeBSD
10682 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10683 5-CURRENT.
10684 * configure: Regenerate.
10685
10686 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10687
10688 * coff-or32.c: New file.
10689 * cpu-or32.c: New file.
10690 * elf32-or32.c: New file.
10691 * archures.c: Add support for or32.
10692 * targets.c: Add support for or32.
10693 * bfd-in2.h: Regenerate.
10694 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10695 coff_write_object_contents): Add support for or32.
10696 * config.bfd: Add target.
10697 * configure.in: Add support for or32.
10698 * configure: Regenerate.
10699 * Makefile.am: Add support for or32.
10700 * Makefile.in: Regenerate.
10701 * po/SRC-POTFILES.in: Add or32 files.
10702 * po/bfd.pot: Regenerate.
10703
10704 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10705 Don Lindsay <lindsayd@cisco.com>
10706
10707 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10708 false' with a return of a bfd_reloc_ error code.
10709
10710 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10711
10712 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10713 unexport unreferenced symbols when --export-dynamic. Call
10714 _bfd_elf_strtab_delref when unexporting.
10715
10716 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10717
10718 * bfd-in.h: Include <stdbool.h> if it is available.
10719 * bfd-in2.h: Regenerated.
10720
10721 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10722
10723 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10724 not go via the plt.
10725
10726 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10727
10728 * archures.c: Tidy up formatting of embedded comments.
10729 * bfd.c: Tidy up formatting of embedded comments.
10730 * bfd-in.h: Fix formatting of comments.
10731 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10732 * section.c: Tidy up formatting of embedded comments.
10733 * syms.c: Tidy up formatting of embedded comments.
10734 * targets.c: Tidy up formatting of embedded comments.
10735
10736 * bfd-in2.h: Regenerate.
10737
10738 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10739
10740 * vms-tir.c (cmd_name): New function.
10741 (tir_cmd_name): New function.
10742 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10743 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10744 Fix formatting.
10745
10746 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10747 translation.
10748 (pe_print_pdata): Rearrange message to aid in translation.
10749
10750 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10751 translation.
10752
10753 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10754
10755 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10756
10757 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10758 message to aid in translation.
10759
10760 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10761 to aid in translation.
10762
10763 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10764
10765 2002-01-30 Philipp Thomas <pthomas@suse.de>
10766
10767 * coff-arm.c, elf32-elf.h: Unify messages.
10768
10769 2002-01-30 Nick Clifton <nickc@redhat.com>
10770
10771 * po/sv.po: Updated translation.
10772
10773 2002-01-30 Philipp Thomas <pthomas@suse.de>
10774
10775 * dwarf2.c (read_abbrev): Use full section name in error message.
10776 (decode_line_info): Likewise.
10777
10778 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10779 message.
10780
10781 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10782
10783 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10784 descriptor symbols for undefined function code syms. Clear
10785 ELF_LINK_NON_ELF so that they can stay weak.
10786
10787 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10788 Mitch Lichtenberg <mpl@broadcom.com>
10789
10790 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10791 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10792 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10793 generation.
10794 * bfd-in2.h: Regenerate.
10795
10796 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10797
10798 * elf32-mips.c: Add additional comments about HI16 relocation
10799 processing.
10800 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10801 pc-relative relocations. (Reverts change made on 2001-10-31.)
10802 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10803 for pc-relative relocations.
10804 (mips_elf_calculate_relocation): Add a comment about a kludge
10805 in the R_MIPS_GNU_REL_HI16 handling.
10806 (_bfd_mips_elf_relocate_section): Implement that kludge;
10807 adjust pc-relative HI16 relocation for difference in HI16 and
10808 LO16 addresses, since it can't easily be done in
10809 mips_elf_calculate_relocation.
10810
10811 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10812
10813 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10814 relocations with PC32 relocations for undefined or weak symbols.
10815 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10816 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10817
10818 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10819
10820 * elfcore.h (elf_core_file_p): Improve comment for last change.
10821
10822 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10823
10824 * configure: Regenerated.
10825
10826 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10827
10828 * elfcore.h (elf_core_file_p): Set the machine architecture
10829 before processing the program headers.
10830
10831 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10832
10833 * configure.in <64-bit configuration>: If using gcc, check and
10834 emit error for egcs-1.1.2.
10835 * configure: Regenerate.
10836
10837 2002-01-26 Egor Duda <deo@logos-m.ru>
10838
10839 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10840 as possible to avoid stack corruption.
10841
10842 2002-01-26 Richard Henderson <rth@redhat.com>
10843
10844 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10845 for non-allocated sections.
10846
10847 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10848
10849 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10850 prstat.pr_reg even if it is a struct.
10851
10852 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10853
10854 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10855
10856 2002-01-25 Philipp Thomas <pthomas@suse.de>
10857
10858 * coffgen.c (coff_print_symbol): Don't mark info message
10859 for translation.
10860
10861 2002-01-25 Nick Clifton <nickc@redhat.com>
10862
10863 * po/fr.po: Updated translation.
10864 * po/es.po: Updated translation.
10865
10866 2002-01-25 Philipp Thomas <pthomas@suse.de>
10867
10868 * coff-alpha.c (alpha_relocate_section): Unify warning message
10869 for GP relative relocations without GP defined.
10870 * coff-mips.c (mips_relocate_section): Likewise.
10871
10872 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10873
10874 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10875 unsigned overflow when new_offset < old_offset.
10876
10877 2002-01-24 Philipp Thomas <pthomas@suse.de>
10878
10879 * bfd.c (_bfd_abort): Fix typo.
10880
10881 2002-01-23 Richard Henderson <rth@redhat.com>
10882
10883 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10884 plt entries for undefweak symbols.
10885
10886 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10887
10888 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10889 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10890 (bfd_elf32_h8300_vec): Ditto.
10891
10892 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10893
10894 * elf64-ppc.c: Remove stale part of ABI comment.
10895 (NO_OPD_RELOCS): Define.
10896 (ppc64_elf_check_relocs): Use it.
10897 (ppc64_elf_relocate_section): Here too.
10898 (build_one_stub): Don't point function syms at the stub. Instead,
10899 hijack plt.offset.
10900 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10901 really go to the stub. Make all dynamic relocs in opd against
10902 locals.
10903 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10904 plt.offset.
10905
10906 2002-01-22 Richard Henderson <rth@redhat.com>
10907
10908 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10909
10910 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10911
10912 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10913 TOC_BASE_OFF adjustment.
10914
10915 * Makefile.am: Run "make dep-am".
10916 * Makefile.in: Regenerate.
10917 * po/SRC-POTFILES.in: Regenerate.
10918
10919 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10920
10921 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10922 host defines.
10923
10924 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10925
10926 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10927 Check for and emit error if sgot is NULL at this point.
10928
10929 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10930
10931 * config.bfd (ia64*-*-netbsd*): New target.
10932
10933 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10934
10935 * som.c (som_write_space_strings): Comment typo fix.
10936
10937 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10938
10939 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10940 is_func_descriptor fields.
10941 (link_hash_newfunc): Init them.
10942 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10943 dot are candidates for plt entries. When processing .opd relocs,
10944 set function descriptor strings to point inside function code
10945 string, and set new ppc_link_hash_entry fields.
10946 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10947 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10948 function descriptors. It's now done in..
10949 (func_desc_adjust): New.
10950 (ppc64_elf_func_desc_adjust): New.
10951 (define elf_backend_always_size_sections): Define.
10952 (ppc64_elf_hide_symbol): New.
10953 (define elf_backend_hide_symbol): Define.
10954 (allocate_dynrelocs): Remove code looking up function descriptors
10955 as that has been done earlier.
10956 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10957 table.
10958 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10959 up function descriptor.
10960 (build_one_stub): Look up the function code sym. Check for
10961 invalid plt offsets.
10962 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10963 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10964
10965 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10966 boolean param.
10967 (_bfd_elf_link_hash_hide_symbol): Likewise.
10968 * elflink.h (elf_link_add_object_symbols): Adjust call to
10969 elf_backend_hide_symbol.
10970 (elf_fix_symbol_flags): Likewise.
10971 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10972 than bfd_alloc.
10973 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10974 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10975 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10976 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10977 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10978 and adjust to suit.
10979 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10980 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10981 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10982
10983 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10984
10985 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10986 dynamic function descriptor symbol, not the associated function
10987 symbol.
10988
10989 2002-01-17 Eric Christopher <echristo@redhat.com>
10990
10991 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10992
10993 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10994
10995 * po/bfd.pot: Regenerate.
10996 * po/fr.po: Regenerate.
10997
10998 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10999
11000 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
11001 Remove "Elf_Internal_Shdr *" param.
11002 (_bfd_mips_elf_section_from_bfd_section): Ditto.
11003 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
11004 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
11005 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
11006 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
11007 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
11008 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
11009 function to override special sections. Remove hdr arg from
11010 backend call, and don't loop.
11011
11012 2002-01-16 Eric Christopher <echristo@redhat.com>
11013
11014 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
11015 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
11016 relocations requiring gp0 and gp.
11017
11018 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
11019
11020 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
11021 EF_ARM_VFP_FLOAT.
11022 (elf32_arm_print_private_bfd_data): Likewise.
11023
11024 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
11025
11026 * po/tr.po: Import new version.
11027
11028 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11029
11030 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
11031 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
11032 (ORI_R0_R0_0): Correct.
11033
11034 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11035
11036 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
11037 when plt_not_loaded.
11038 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
11039 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
11040 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
11041 (ppc64_elf_glink_code): Delete.
11042 (PPC64_ELF_GLINK_SIZE): Delete.
11043 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
11044 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
11045 ORI_R0_R0_0): Define.
11046 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
11047 (struct ppc_link_hash_table): Add sstub and plt_overflow.
11048 (ppc64_elf_link_hash_table_create): Init them.
11049 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
11050 Don't copy to shared lib.
11051 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
11052 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
11053 (allocate_dynrelocs <plt>): Don't change function sym here. Make
11054 room for .stub and .glink code.
11055 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
11056 DT_PPC64_GLINK.
11057 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
11058 bfd_elf64_bfd_final_link.
11059 (bfd_elf64_bfd_final_link): Don't define.
11060 (ppc64_elf_size_stubs): New.
11061 (build_plt_stub): New.
11062 (build_one_stub): New.
11063 (ppc64_elf_build_stubs): New.
11064 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
11065 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
11066 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
11067 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
11068 case output sections not separate. Adjust DT_RELASZ to not
11069 include plt relocs. Set reserved got entry. Set got and plt
11070 entry size.
11071 (elf_backend_got_header_size): Set to 8.
11072 * elf64-ppc.h: New file.
11073
11074 2002-01-16 Alan Modra <amodra@bigpond.net.au>
11075
11076 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
11077 sections, use bfd_section_list_remove.
11078 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
11079 * elflink.h (elf_link_add_object_symbols): When removing all
11080 sections, use bfd_section_list_clear.
11081
11082 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11083
11084 * po/sv.po: New file: Swedish translation.
11085 * configure.in (ALL_LINGUAS): Add sv.
11086 * configure: Regenerate.
11087
11088 2002-01-15 Jakub Jelinek <jakub@redhat.com>
11089
11090 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
11091 * elf.c (merge_sections_remove_hook): New function.
11092 (_bfd_elf_merge_sections): Pass it as 3rd argument to
11093 _bfd_merge_sections.
11094 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
11095 * libbfd.h: Rebuilt.
11096 * merge.c (_bfd_merge_sections): Add remove_hook argument.
11097 Call remove_hook if a SEC_EXCLUDE section is encountered.
11098
11099 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
11100
11101 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
11102 (xstormy16_reloc_map): Initialise new field with correct howto
11103 table.
11104 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
11105 howto entry.
11106
11107 2002-01-10 Michael Snyder <msnyder@redhat.com>
11108
11109 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
11110 (elfcore_write_pstatus): Use long instead of pid_t;
11111 * elf-bfd.h: Change prototypes to use long instead of pid_t;
11112
11113 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
11114
11115 * elf.c: Update copyright years.
11116 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
11117 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
11118
11119 2002-01-08 Michael Snyder <msnyder@redhat.com>
11120
11121 Add capability to write corefile note sections, for gdb.
11122 * elf.c (elfcore_write_note): New function.
11123 (elfcore_write_prpsinfo): New function.
11124 (elfcore_write_prstatus): New function.
11125 (elfcore_write_pstatus): New function.
11126 (elfcore_write_prfpreg): New function.
11127 (elfcore_write_prxfpreg): New function.
11128 * elf-bfd.h: Add prototypes for above functions.
11129
11130 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
11131
11132 * elf.c (elf_fake_sections): Propagate errors from
11133 elf_backend_fake_section.
11134
11135 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
11136
11137 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
11138 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
11139 (elf32-sh-nbsd.lo): New rule.
11140 * Makefile.in: Regenerate.
11141 * config.bfd (sh*le-*-netbsdelf*): New target.
11142 (sh*-*-netbsdelf*): New target.
11143 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
11144 (bfd_elf32_shnbsd_vec): New vector.
11145 (bfd_elf32_shlnbsd_vec): New vector.
11146 * configure: Regenerate.
11147 * elf32-sh-nbsd.c: New file.
11148 * targets.c: Update copyright years.
11149 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
11150 bfd_elf32_shnbsd_vec.
11151
11152 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
11153
11154 * coff-rs6000.c (READ20): Use bfd_scan_vma.
11155
11156 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
11157
11158 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
11159 of a symbol in a section that will be deleted.
11160
11161 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
11162
11163 * po/es.po: New file: Spanish translation.
11164 * configure.in (ALL_LINGUAS): Add es.
11165 * configure: Regenerate.
11166
11167 2002-01-06 Steve Ellcey <sje@cup.hp.com>
11168
11169 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
11170 argument so we can handle HP-UX specially.
11171 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
11172 (elfNN_hpux_backend_section_from_bfd_section): New for support
11173 of SHN_IA_64_ANSI_COMMON.
11174 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
11175 (is_unwind_section_name): Add special HP-UX support.
11176 (elfNN_ia64_section_from_shdr): Add support for more sections.
11177 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
11178 add support for more sections.
11179 (elfNN_ia64_additional_program_headers): Modify
11180 is_unwind_section_name call.
11181 (elfNN_ia64_modify_segment_map): Remove assumption that there is
11182 only one unwind section in segment.
11183
11184 2002-01-06 Alan Modra <amodra@bigpond.net.au>
11185
11186 * syms.c (_bfd_generic_make_empty_symbol): New function.
11187 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
11188 _bfd_generic_make_empty_symbol.
11189 * libbfd.h: Regenerate.
11190 * bfd-in2.h: Regenerate.
11191 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
11192 (hppabsd_core_get_symtab_upper_bound): Don't define.
11193 (hppabsd_core_get_symtab): Likewise.
11194 (hppabsd_core_print_symbol): Likewise.
11195 (hppabsd_core_get_symbol_info): Likewise.
11196 (hppabsd_core_bfd_is_local_label_name): Likewise.
11197 (hppabsd_core_get_lineno): Likewise.
11198 (hppabsd_core_find_nearest_line): Likewise.
11199 (hppabsd_core_bfd_make_debug_symbol): Likewise.
11200 (hppabsd_core_read_minisymbols): Likewise.
11201 (hppabsd_core_minisymbol_to_symbol): Likewise.
11202 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
11203 Formatting fixes.
11204 * hpux-core.c: Similarly.
11205 * irix-core.c: Similarly.
11206 * osf-core.c: Similarly.
11207 * sco5-core.c: Similarly.
11208 * binary.c (binary_make_empty_symbol): Remove function, define as
11209 _bfd_generic_make_empty_symbol.
11210 * ihex.c (ihex_make_empty_symbol): Likewise.
11211 * mmo.c (mmo_make_empty_symbol): Likewise.
11212 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
11213 * srec.c (srec_make_empty_symbol): Likewise.
11214 * versados.c (versados_make_empty_symbol): Likewise.
11215 * vms.c (_bfd_vms_make_empty_symbol): Remove.
11216 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
11217 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
11218 rather than _bfd_vms_make_empty_symbol.
11219 * vms-misc.c (new_symbol): Likewise.
11220
11221 2002-01-05 Alan Modra <amodra@bigpond.net.au>
11222
11223 * section.c (bfd_section_init): Remove unnecessary initialisations.
11224 (bfd_section_list_clear): New function.
11225 (bfd_section_list_remove, bfd_section_list_insert): New macros.
11226 (_bfd_strip_section_from_output): Use them.
11227 * coffcode.h (coff_set_alignment_hook): Likewise.
11228 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
11229 * elf64-mips.c (mips_elf64_final_link): Likewise.
11230 * elf64-mmix.c (mmix_elf_final_link): Likewise.
11231 * sunos.c (sunos_add_dynamic_symbols): Likewise.
11232 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
11233 * bfd-in2.h: Regenerate.
11234
11235 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
11236 rather than doing our own section handling. Clean up after errors
11237 with bfd_release and bfd_section_list_clear. Handle unexpected
11238 flags.
11239 * aoutf1.h (sunos4_core_file_p): Likewise.
11240 * aix386-core.c (aix386_core_file_p): Likewise.
11241 * cisco-core.c (cisco_core_file_validate): Likewise.
11242 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
11243 * trad-core.c (trad_unix_core_file_p): Likewise.
11244
11245 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
11246 with bfd_release and bfd_section_list_clear.
11247 * hpux-core.c (hpux_core_core_file_p): Likewise.
11248 * irix-core.c (irix_core_core_file_p): Likewise.
11249 * lynx-core.c (lynx_core_file_p): Likewise.
11250 * osf-core.c (osf_core_core_file_p): Likewise.
11251 * rs6000-core.c (rs6000coff_core_p): Likewise.
11252 * sco5-core.c (sco5_core_file_p): Likewise.
11253
11254 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
11255 sign extension adjustments without conditionals.
11256
11257 2002-01-04 Jakub Jelinek <jakub@redhat.com>
11258
11259 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
11260 CIE at .eh_frame start is removed due to no FDEs referencing it.
11261
11262 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
11263
11264 * config.bfd (x86_64-*-netbsd*): New target.
11265 * configure.in (x86_64-*-netbsd*): Set COREFILE
11266 to netbsd-core.lo.
11267 * configure: Regenerated.
11268
11269 2002-01-03 Tom Rix <trix@redhat.com>
11270
11271 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
11272 for recent bfd_make_section_anyway change.
11273
11274 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
11275
11276 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
11277 R_ARM_THM_PC11 reloc.
11278
11279 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11280
11281 * configure.in (LINGUAS): Add ja.
11282 * configure: Regenerate.
11283 * po/ja.po: Import from translation project's web site.
11284
11285 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
11286
11287 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
11288 messages to ease translation into other languages.
11289
11290 For older changes see ChangeLog-0001
11291 \f
11292 Local Variables:
11293 mode: change-log
11294 left-margin: 8
11295 fill-column: 74
11296 version-control: never
11297 End:
This page took 0.260335 seconds and 4 git commands to generate.