merge from gcc
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-04-14 H.J. Lu <hjl@gnu.org>
2
3 * elflink.h (elf_link_add_object_symbols): Maintain maximum
4 alignment for common symbols. Warn reducing alignment for
5 common symbols. Report old filename when symbol size changes.
6
7 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
8
9 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
10 occurrences of the same test changed in the previous patch.
11 Optimize.
12
13 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
14
15 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
16 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
17 GOT_DISP/addend only if the symbol got a global GOT entry.
18
19 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
20
21 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
22 GOT_PAGE/GOT_OFST referencing overridable symbol to
23 GOT_DISP/addend.
24 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
25 global symbol as GOT_DISP.
26
27 2003-04-10 Bob Wilson <bob.wilson@acm.org>
28
29 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
30 next relocation on an undefined symbol.
31
32 2003-04-09 Richard Henderson <rth@redhat.com>
33
34 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
35 Ignore relocations against r_symndx == 0.
36
37 2003-04-09 H.J. Lu <hjl@gnu.org>
38
39 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
40 FALSE for undefined symbols.
41 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
42
43 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
44
45 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
46 and IRIX-specific shift-to-64-bit 4-byte lengths before following
47 addr_size.
48
49 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
50
51 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
52 pointer size from ABI, not arch_bits_per_address.
53
54 2003-04-07 Kevin Buettner <kevinb@redhat.com>
55
56 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
57 constants for n32 ABI.
58
59 2003-04-06 Andrew Cagney <cagney@redhat.com>
60
61 * simple.c (bfd_simple_get_relocated_section_contents): Disable
62 free that leads to GDB vs BFD memory corruption.
63
64 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
65
66 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
67 symbols that mark the end of the section.
68 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
69 converting to a relative branch so that the offset is computed after
70 the relaxation; also relocate a jsr into a bsr if possible but don't
71 relax them if they are to a far symbol as we need to call the
72 trampoline code.
73 (elf_m68hc11_howto_table): Set pcrel_offset to true.
74
75 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
76
77 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
78 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
79 * bfd-in2.h: Regenerate
80 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
81 * cpu-tic4x.c: Ditto
82
83 2003-04-03 Nick Clifton <nickc@redhat.com>
84
85 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
86 differently for object files and executables.
87 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
88 for object files or for executables who have not already
89 initialised the field.
90 * libpei.h (bfd_pe_executable_p): New macro. Return true if
91 the PE format bfd is an executable.
92
93 2003-04-03 Alan Modra <amodra@bigpond.net.au>
94
95 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
96 here as it's too early to reliably determine locality.
97 (ppc_elf_gc_sweep_hook): Likewise.
98 (SYMBOL_REFERENCES_LOCAL): Expand comment.
99
100 2003-04-02 Bob Wilson <bob.wilson@acm.org>
101
102 * xtensa-modules.c: Remove comment indicating that this is a
103 generated file.
104
105 2003-04-02 Alan Modra <amodra@bigpond.net.au>
106
107 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
108
109 2003-04-01 Bob Wilson <bob.wilson@acm.org>
110
111 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
112 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
113 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
114 xtensa-modules.lo.
115 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
116 xtensa-modules.c.
117 (cpu-xtensa.lo): New target.
118 (elf32-xtensa.lo): Likewise.
119 (xtensa-isa.lo): Likewise.
120 (xtensa-modules.lo): Likewise.
121 * Makefile.in: Regenerate.
122 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
123 (bfd_archures_list): Add bfd_xtensa_arch.
124 * config.bfd: Handle xtensa-*-*.
125 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
126 * configure: Regenerate.
127 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
128 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
129 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
130 (bfd_elf32_xtensa_le_vec): Likewise.
131 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
132 * cpu-xtensa.c: New file.
133 * elf32-xtensa.c: Likewise.
134 * xtensa-isa.c: Likewise.
135 * xtensa-modules.c: Likewise.
136 * libbfd.h: Regenerate.
137 * bfd-in2.h: Likewise.
138
139 2003-04-01 Nick Clifton <nickc@redhat.com>
140
141 * archures.c (bfd_mach_arm_unknown): Define.
142 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
143 bfd_arm_get_mach_from_notes): Prototype.
144 * bfd-in2.h: Regenerate.
145 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
146 bfd_arm_merge_machines.
147 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
148 * coffcode.h (coff_set_arch_mach_hook): Call
149 bfd_arm_get_mach_from_notes.
150 * coffgen.c (coff_real_object_p): Revert previous delta.
151 * cpu_arm.c (arm_check_note): New function. Examine a note in a
152 .note section.
153 (bfd_arm_merge_machines): New function: Handle the merging of ARM
154 binaries compiled for different architectures..
155 (bfd_arm_update_notes): New function: Update an ARM note section.
156 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
157 number from an ARM note section.
158 * elf32-arm.h (elf32_arm_object_p): Use
159 bfd_arm_get_mach_from_notes.
160 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
161 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
162
163 2003-04-01 Ben Elliston <bje@wasabisystems.com>
164
165 * dwarf2.c (read_attribute_value): Correct typo in comment.
166
167 2003-04-01 Nick Clifton <nickc@redhat.com>
168
169 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
170 instead of concat().
171 (decode_line_info): Only free filename if it is not NULL.
172 (add_line_info): Make a copy of the filename when storing it into
173 the info structure.
174
175 2003-03-31 Andreas Schwab <schwab@suse.de>
176 Daniel Jacobowitz <drow@mvista.com>
177
178 * simple.c (bfd_simple_get_relocated_section_contents): Add
179 parameter symbol_table. Optionally use it instead of the symbol
180 table from the bfd. Save and restore output offsets and output
181 sections around bfd_get_relocated_section_contents. Fix a memory
182 leak.
183 (simple_save_output_info, simple_restore_output_info): New
184 functions.
185 * bfd-in2.h: Regenerate.
186 * dwarf2.c (read_abbrevs): Use
187 bfd_simple_get_relocated_section_contents instead of
188 bfd_get_section_contents.
189 (decode_line_info): Likewise.
190 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
191 find_rela_addend.
192 (find_rela_addend): Remove.
193 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
194 debugging sections.
195 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
196 not bfd_zalloc.
197
198 2003-03-31 David Heine <dlheine@suif.stanford.edu>
199
200 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
201 bfd_alloc.
202 * dwarf2.c (concat_filename): Always allocate space for the
203 returned filename.
204 (decode_line_info): Free the allocated filename returned by
205 concat_filename.
206 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
207 * elf.c (copy_private_bfd_data): Likewise.
208 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
209 * elflink.h (elf_link_sort_relocs): Fix memory leak.
210 * format.c (bfd_check_format_matches): Likewise.
211 * linker.c (bfd_generic_final_link): Likewise.
212 * opncls.c (find_separate_debug_info): Likewise.
213 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
214
215 2003-03-28 H.J. Lu <hjl@gnu.org>
216
217 * elflink.h (elf_link_add_object_symbols): Correctly combine
218 visibilities.
219
220 2003-03-27 Jakub Jelinek <jakub@redhat.com>
221
222 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
223 to -1 before recomputing got offsets.
224
225 2003-03-26 Andreas Schwab <schwab@suse.de>
226
227 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
228 (elf_m68k_relocate_section): Use it to correctly handle symbols
229 forced to be local.
230 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
231 entries for symbols that are forced to be local.
232
233 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
234
235 * elfxx-mips.c (_bfd_mips_relax_section): New function.
236 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
237 * elfn32-mips.c, elf64-mips.c: Use it.
238
239 2003-03-25 Stan Cox <scox@redhat.com>
240 Nick Clifton <nickc@redhat.com>
241
242 Contribute support for Intel's iWMMXt chip - an ARM variant:
243
244 * archures.c: Add bfd_mach_arm_iWMMXt.
245 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
246 * bfd-in2.h: Regenerate.
247 * libbfd.h: Regenerate.
248 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
249 object files to be linked with XScale ones.
250 (coff_arm_final_link_postscript): Update note section.
251 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
252 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
253 after identifying a coff binary.
254 * cpu-arm.c (processors): Add iWMMXt.
255 (arch_inf): Likewise.
256 * elf32-arm.h (arm_object_p): Handle note section.
257 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
258 be linked with XScale ones.
259 (elf32_arm_section_flags): New function: Set flags on note section.
260 (elf32_arm_final_write_processing): Handle note section.
261
262 2003-03-21 DJ Delorie <dj@redhat.com>
263
264 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
265 _bfd_elf_rela_local_sym.
266
267 2003-03-20 H.J. Lu <hjl@gnu.org>
268
269 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
270 non-ELF outputs.
271
272 2003-03-20 Nick Clifton <nickc@redhat.com>
273
274 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
275 $idata5 in case bfd_coff_final_link is not called.
276
277 2003-03-19 Jakub Jelinek <jakub@redhat.com>
278
279 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
280 field.
281 (canon_reloc_count): Define.
282 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
283 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
284 reloc_count.
285 (sparc64_elf_canonicalize_reloc): New routine.
286 (bfd_elf64_canonicalize_reloc): Define.
287
288 2003-03-18 Jakub Jelinek <jakub@redhat.com>
289
290 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
291 againt mergeable sections. Take r_addend into account when caching
292 trampolines.
293
294 2003-03-18 Richard Henderson <rth@redhat.com>
295
296 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
297 local symbols that have no dyninfo.
298
299 2003-03-14 Gene Smith <gene.smith@siemens.com>
300
301 * ieee.c (ieee_write_expression): Handle the case where symbol is
302 NULL.
303 General formatting improvements.
304
305 2003-03-13 Nick Clifton <nickc@redhat.com>
306
307 * configure.in (LINGUAS): Add zh_CN.
308 * configure: Regenerate.
309 * po/zh_CN.po: New file.
310
311 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
312
313 * aout-cris.c (BYTES_IN_WORD): Don't define.
314 aout-encap.c: Likewise.
315 aout-ns32k.c: Likewise.
316 aout-tic30.c: Likewise.
317 hp300bsd.c: Likewise.
318 i386aout.c: Likewise.
319 i386dynix.c: Likewise.
320 i386linux.c: Likewise.
321 i386lynx.c: Likewise.
322 i386mach3.c: Likewise.
323 m68k4knetbsd.c: Likewise.
324 m68klinux.c: Likewise.
325 m68klynx.c: Likewise.
326 m68knetbsd.c: Likewise.
327 m88kmach3.c: Likewise.
328 mipsbsd.c: Likewise.
329 newsos3.c: Likewise.
330 sparclinux.c: Likewise.
331 sparclynx.c: Likewise.
332 sparcnetbsd.c: Likewise.
333 vaxbsd.c: Likewise. Fix comment formatting.
334
335 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
336
337 * Reverted 2003-03-02's patch.
338
339 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
340 overridable.
341 * elf64-mips.c (mips_elf64_canonicalize_reloc,
342 mips_elf64_get_dynamic_reloc_upper_bound,
343 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
344 (bfd_elf64_get_canonicalize_reloc,
345 bfd_elf64_get_dynamic_reloc_upper_bound,
346 bfd_elf64_canonicalize_dynamic_reloc): Define.
347 (mips_elf64_slurp_reloc_table): Support dynamic.
348 (mips_elf64_slurp_one_reloc_table): Adjust.
349
350 2003-03-12 Nick Clifton <nickc@redhat.com>
351
352 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
353 'index' to 'offset' in test for zero value.
354
355 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
356
357 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
358 dynamic relocations pointing to local or section symbols, use the
359 NULL symbol instead. Document the choice to not emit an
360 additional R_MIPS_64 relocation.
361
362 2003-03-11 Alan Modra <amodra@bigpond.net.au>
363
364 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
365 zero index dynamic tls relocs generated for the GOT. Tidy code.
366 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
367 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
368
369 2003-03-07 Alan Modra <amodra@bigpond.net.au>
370
371 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
372 a tls_get_addr call.
373
374 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
375 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
376 ELF_LINK_NON_GOT_REF from weakdef.
377 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
378 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
379 ELF_LINK_NON_GOT_REF from weakdef.
380 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
381 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
382 ELF_LINK_NON_GOT_REF from weakdef.
383
384 2003-03-06 Jakub Jelinek <jakub@redhat.com>
385 Andrew Haley <aph@redhat.com>
386
387 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
388 output is relocateable.
389
390 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
391
392 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
393 R_COMMENT.
394
395 2003-03-06 Alan Modra <amodra@bigpond.net.au>
396
397 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
398 error messages.
399 (ELIMINATE_COPY_RELOCS): Define to zero.
400 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
401 TLSLD relocs. Report reloc types on a number of errors. Optimize
402 LOCAL24PC check for non-local syms. Don't capitalize error messages.
403 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
404 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
405 calculating TLSLD relocs. Report reloc types on a number of errors.
406 Don't capitalize error messages.
407
408 2003-03-03 H.J. Lu <hjl@gnu.org>
409
410 * elfxx-ia64.c (USE_BRL): Removed.
411 (oor_ip): Removed.
412
413 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
414
415 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
416 relocation (no special function), and make it non-partial_inplace.
417 (sh_elf_relax_section): When creating a bsr, use a consistent value
418 no matter if the symbol is extern or not; set addend to -4.
419 Don't swap load / non-load instructions for SH4.
420 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
421 rather than if the symbol is external to determine if adjusting the
422 offset makes sense. Adjust the addend too if appropriate.
423 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
424 relocation.
425
426 2003-03-03 Nick Clifton <nickc@redhat.com>
427
428 * po/da.po: Installed latest translation.
429
430 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
431
432 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
433 R_MIPS_PC16 to rightshift 2.
434 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
435 (bfd_elf32_bfd_reloc_type_lookup): Support
436 BFD_RELOC_MIPSEMB_16_PCREL_S2.
437 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
438 R_MIPS_PC16 to rightshift 2.
439 (mips_elf64_howto_table_rela): Likewise.
440 (mips_reloc_map): Map to rightshifted BFD reloc.
441 * elfn32-mips.c: The same as in elf64-mips.c.
442 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
443 (mips_elf_calculate_relocation): Handle rightshifted addends for
444 R_MIPS_PC16.
445 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
446 MIPS Embedded PIC. Remove superfluous empty COMMENT.
447 * libbfd.h: Regenerate.
448 * bfd-in2.h: Regenerate.
449
450 2003-02-28 Richard Henderson <rth@redhat.com>
451
452 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
453 for ltoff22x relaxation.
454
455 2003-03-01 Alan Modra <amodra@bigpond.net.au>
456
457 * bfd-in.h (_bfd): Don't define.
458 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
459 * syms.c: Likewise.
460 * bfd-in2.h: Regenerate.
461
462 2003-02-27 Richard Henderson <rth@redhat.com>
463
464 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
465 (elfNN_ia64_check_relocs): Set it.
466 (allocate_global_data_got): Check it.
467 (allocate_local_got): Likewise.
468 (allocate_dynrel_entries): Likewise.
469 (elfNN_ia64_relax_ldxmov): New.
470 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
471 (elfNN_ia64_choose_gp): Split out from ...
472 (elfNN_ia64_final_link): ... here.
473
474 2003-02-27 Andrew Cagney <cagney@redhat.com>
475
476 * bfd.c (struct bfd): Rename "struct _bfd".
477 * bfd-in.h: Update copyright.
478 (struct bfd): Rename "struct _bfd".
479 (_bfd): Define for backward compatibility.
480 * bfd-in2.h: Regenerate.
481
482 2003-02-25 Alan Modra <amodra@bigpond.net.au>
483
484 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
485 and rel_hdr2 when initially counting input relocs rather than after
486 creating output reloc sections.
487 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
488 sizes.
489
490 * Makefile.am: Run "make dep-am".
491 * Makefile.in: Regenerate.
492
493 2003-02-24 Kris Warkentin <kewarken@qnx.com>
494
495 * elf.c (elfcore_read_notes): Add check for QNX style core file.
496 (elfcore_grog_nto_note): New function.
497 (elfcore_grog_nto_gregs): New function.
498 (elfcore_grog_nto_status): New function.
499
500 2003-02-24 Alan Modra <amodra@bigpond.net.au>
501
502 * elflink.c (_bfd_elf_create_got_section): Check existing .got
503 section flags before concluding that we've already been called.
504 Don't use register keyword.
505 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
506 (_bfd_elf_create_linker_section): Formatting.
507
508 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
509
510 * coff-h8300.c: Fix typo: intial -> initial.
511 * coff-ppc.c: Likewise.
512
513 2003-02-20 Alan Modra <amodra@bigpond.net.au>
514
515 * elf32-ppc.c: Formatting.
516 (allocate_dynrelocs): LD and GD relocs against the same sym need
517 separate GOT entries.
518 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
519 entries per symbol.
520
521 2003-02-19 Alan Modra <amodra@bigpond.net.au>
522
523 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
524 removal. Localize vars. Remove unnecessary dynobj test.
525 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
526 of INFO.
527 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
528 and optimize.
529 (elf_i386_relocate_section): Likewise.
530 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
531 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
532 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
533 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
534 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
535 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
536 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
537 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
538 Formatting.
539
540 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
541 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
542 test.
543 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
544 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
545 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
546 and optimize. Use ELIMINATE_COPY_RELOCS.
547 (ppc64_elf_relocate_section): Likewise.
548
549 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
550 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
551 (ELIMINATE_COPY_RELOCS): Define.
552 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
553 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
554 (MUST_BE_DYN_RELOC): Define.
555 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
556 and optimize. Trim dyn_relocs.
557 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
558 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
559 track of pc_rel dyn relocs.
560 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
561 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
562 allocate_dynrelocs. Don't recalculate "sec".
563
564 2003-02-18 Alan Modra <amodra@bigpond.net.au>
565
566 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
567 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
568 on invalid LD relocs.
569 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
570 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
571 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
572
573 * elf32-ppc.h: New file.
574 * elf32-ppc.c: Include elf32-ppc.h.
575 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
576 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
577 Add "tls_mask" field.
578 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
579 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
580 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
581 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
582 Make use of htab shortcuts throughout file.
583 (ppc_elf_link_hash_newfunc): Init tls_mask field.
584 (ppc_elf_link_hash_table_create): Init new fields.
585 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
586 (ppc_elf_howto_raw): Add tls relocs.
587 (ppc_elf_reloc_type_lookup): Handle them.
588 (ppc_elf_unhandled_reloc): New function.
589 (ppc_elf_create_got): Stash got section pointer in hash table,
590 return status. Make .rela.got too.
591 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
592 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
593 NON_GOT_REF set. Don't allocate space in .plt here..
594 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
595 not allocating plt entries unnecessarily. Allocate got entries here.
596 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
597 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
598 "info" during allocate_dynrelocs hash traversal. Use htab section
599 shortcuts rather than searching for named sections. Get rid of
600 "plt" and "strip" booleans.
601 (update_local_sym_info, bad_shared_reloc): New functions.
602 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
603 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
604 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
605 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
606 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
607 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
608 relocs that might use a plt entry. Set NON_GOT_REF too.
609 Enumerate all do-nothing relocs.
610 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
611 tls relocs and all plt relocs.
612 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
613 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
614 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
615 shortcuts.
616 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
617 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
618 entries and got relocs here. Warn on non-zero got reloc addend.
619 Split out branch taken/not taken reloc code into a separate switch
620 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
621 Split out HA reloc adjustments to separate switch statement. Don't
622 warn on reloc overflow if we've already warned about undefined.
623 Don't rebuild sym name when reporting errors. Report all possible
624 errors from _bfd_final_link_relocate.
625 (bfd_elf32_bfd_final_link): Don't define.
626
627 2003-02-18 Alan Modra <amodra@bigpond.net.au>
628
629 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
630 rebuild sym name when reporting errors.
631
632 2003-02-17 Nick Clifton <nickc@redhat.com>
633
634 * elflink.h (elf_link_output_extsym): Only check
635 allow_shlib_undefined for shared libraries.
636 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
637 of allow_shlib_undefined.
638 * elf32-cris.c (cris_elf_relocate_section): Likewise.
639 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
640 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
641 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
642 * elf32-s390.c (elf_s390_relocate_section): Likewise.
643 * elf32-sh.c (sh_elf_relocate_section): Likewise.
644 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
645 * elf32-vax.c (elf_vax_relocate_section): Likewise.
646 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
647 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
648 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
649 * elf64-s390.c (elf_s390_relocate_section): Likewise.
650 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
651 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
652 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
653 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
654
655 2003-02-17 Nick Clifton <nickc@redhat.com>
656
657 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
658 address field to use in the comparison.
659 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
660
661 2003-02-14 Bob Wilson <bob.wilson@acm.org>
662
663 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
664 backends when checking if the generic ELF target should be used.
665
666 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
667 outside of functions, treat values as absolute addresses.
668
669 * bfd.c: Change embedded documentation to use consistent indentation
670 and to split up long lines. Change informal style of description
671 for functions lacking real documentation.
672 * coffcode.h: Break up long lines in embedded documentation.
673 * format.c: Likewise.
674 * targets.c: Likewise.
675 * libcoff.h: Regenerate.
676 * bfd-in2.h: Regenerate.
677
678 2003-02-14 Alan Modra <amodra@bigpond.net.au>
679
680 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
681 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
682 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
683 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
684 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
685 (group_sections): Don't share a stub section if stubs are for a large
686 section. Adjust comment.
687 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
688 !stubs_always_before_branch.
689 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
690 treat undefined and undefweak specially when processing dyn relocs.
691
692 2003-02-13 Jakub Jelinek <jakub@redhat.com>
693
694 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
695
696 2003-02-13 Nick Clifton <nickc@redhat.com>
697
698 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
699 in computation of offset to insert into BL instruction.
700
701 2003-02-11 Uwe Stieber <uwe@wwws.de>
702
703 * config.bfd: Add support for kaOS as cross build target system.
704
705 2003-02-11 Alan Modra <amodra@bigpond.net.au>
706
707 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
708 .__tls_get_addr too.
709 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
710
711 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
712
713 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
714 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
715 (sh_elf_link_hash_newfunc): Remove the initialization of
716 tls_tpoff32 field.
717 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
718 for which tls_tpoff32 flag is set.
719 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
720 of the symbol includes the entry matched with the input_section
721 and having tls_tpoff32 flag on. When linking statically, set
722 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
723 is defined in this executable.
724 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
725
726 2003-02-10 Jakub Jelinek <jakub@redhat.com>
727
728 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
729 even if there is just non-empty .rela.plt.
730
731 2003-02-10 Nick Clifton <nickc@redhat.com>
732
733 * archures.c (bfd_mach_arm_ep9312): Define.
734 * bfd-in2.h: Regenerate.
735 * cpu-arm.c (processors[]): Add ep9312.
736 (bfd_arm_arch): Add ep9312.
737 * elf32-arm.h (elf32_arm_merge_private_data): Update error
738 messages and add test for Maverick floating point support.
739 (elf32_arm_print_private_bfd_data): Handle
740 EF_ARM_MAVERICK_FLOAT flag.
741 (elf32_arm_object_p): New function.
742 (elf_backend_object_p): Define.
743
744 2003-02-10 Alan Modra <amodra@bigpond.net.au>
745
746 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
747 variables, structure fields or function params to tls_mask or
748 similar to better reflect usage.
749 (struct got_entry): Comment.
750 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
751 (get_tls_mask): Rename from get_tls_type.
752
753 2003-02-09 Alan Modra <amodra@bigpond.net.au>
754
755 * elf64-ppc.c (TLS_GD_LD): Don't define..
756 (TLS_GD): ..define this instead and update all uses.
757 (TLS_TPRELGD): Define.
758 (ppc64_elf_link_hash_table_create): Tweak initialization of
759 init_refcount and init_offset.
760 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
761 Mark second slot of GD or LD toc entries.
762 (get_tls_type): Return an int. Distinguish toc GD and LD entries
763 from other tls types.
764 (ppc64_elf_tls_setup): New function, split out from..
765 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
766 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
767 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
768 return value to properly decide whether toc GD and LD entries can
769 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
770 to determine GD or LD rather than looking at TLS_LD flag. Don't
771 attempt to adjust got entry tls_type here..
772 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
773 look for possible merges.
774 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
775 optimization.
776 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
777 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
778 Make use of return value from get_tls_type to properly detect GD and
779 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
780 handle tls_get_addr removal when looking at REL24 relocs, do it when
781 looking at the previous reloc. Check reloc after DTPMOD64 to determine
782 GD or LD.
783 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
784
785 2003-02-08 Alan Modra <amodra@bigpond.net.au>
786
787 * elf32-hppa.c (group_sections): Don't share a stub section if
788 stubs are for a large section.
789
790 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
791 stubs if !stubs_always_before_branch.
792
793 2003-02-07 Nick Clifton <nickc@redhat.com>
794
795 * elf.c (swap_out_syms): Generate an error message if an
796 equivalent output section cannot be found for a symbol.
797
798 2003-02-07 Jakub Jelinek <jakub@redhat.com>
799
800 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
801 local_got_entries is NULL.
802
803 2003-02-06 Andreas Schwab <schwab@suse.de>
804
805 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
806 (read_value): Add parameter is_signed, use signed extraction if
807 the value is signed.
808 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
809 encoding to read_value.
810
811 2003-02-06 Alan Modra <amodra@bigpond.net.au>
812
813 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
814 plt info when called to transfer weak sym info.
815
816 2003-02-05 Alan Modra <amodra@bigpond.net.au>
817
818 * reloc.c: Add PPC and PPC64 TLS relocs.
819 * libbfd.h: Regenerate.
820 * bfd-in2.h: Regenerate.
821 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
822 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
823 against a 32 bit field.
824 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
825 (_ppc64_elf_section_data): Add t_symndx and comments.
826 (ppc64_elf_section_data): Use elf_section_data macro.
827 (ppc64_elf_new_section_hook): American spelling.
828 (struct got_entry, struct plt_entry): New.
829 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
830 (struct ppc_stub_hash_entry): Add "addend" field.
831 (struct ppc_link_hash_entry): Add "tls_type".
832 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
833 TLS_EXPLICIT): Define.
834 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
835 (link_hash_newfunc): Init new fields.
836 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
837 init_offset to NULL.
838 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
839 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
840 there.
841 (update_local_sym_info, update_plt_info): New functions.
842 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
843 handling to use got.glist rather than got.refcount. Likewise for PLT.
844 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
845 (func_desc_adjust): Adjust for new PLT list.
846 (ppc64_elf_adjust_dynamic_symbol): Likewise.
847 (get_sym_h, get_tls_type): New functions.
848 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
849 (ppc64_elf_tls_optimize): New function.
850 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
851 TLS relocs.
852 (ppc64_elf_size_dynamic_sections): Likewise.
853 (ppc_type_of_stub): Adjust for new PLT list.
854 (ppc_build_one_stub): Likewise.
855 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
856 calls specially.
857 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
858 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
859 init GOT entries that have a reloc. Generate GOT relocs here..
860 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
861 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
862
863 2003-02-04 Andreas Schwab <schwab@suse.de>
864
865 * elf32-m68k.c (elf_m68k_hash_entry): Define.
866 (elf_m68k_link_hash_traverse): Remove.
867 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
868 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
869 reduce casting.
870 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
871 casting.
872 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
873 instead of elf_m68k_link_hash_traverse.
874 (elf_m68k_discard_copies): Change first parameter to pointer to
875 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
876 elf_m68k_link_hash_entry is needed.
877
878 2003-02-04 Alan Modra <amodra@bigpond.net.au>
879
880 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
881 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
882 "got" union, and declare as gotplt_union. Use gotplt_uinion for
883 "plt" field.
884 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
885 Add "init_offset" field.
886 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
887 (elf_local_got_ents): Declare.
888 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
889 and "plt".
890 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
891 (_bfd_elf_link_hash_table_init): Set "init_offset".
892 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
893 from init_offset.
894 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
895
896 * elf.c (bfd_elf_local_sym_name): Split out from..
897 (group_signature): ..here.
898 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
899
900 2003-02-04 Alan Modra <amodra@bigpond.net.au>
901
902 * elf-bfd.h (enum elf_link_info_type): Remove.
903 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
904 to struct sec. Remove linkonce_p field.
905 (elf_linkonce_p): Delete.
906 (elf_discarded_section): Update for sec_info_type change.
907 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
908 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
909 (ELF_INFO_TYPE_NONE): Define.
910 (ELF_INFO_TYPE_STABS): Define.
911 (ELF_INFO_TYPE_MERGE): Define.
912 (ELF_INFO_TYPE_EH_FRAME): Define.
913 (ELF_INFO_TYPE_JUST_SYMS): Define.
914 (STD_SECTION): Update struct sec initializer.
915 * ecoff.c (bfd_debug_section): Likewise.
916 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
917 * elflink.h: Likewise.
918 * elf-eh-frame.c: Likewise.
919 * elf64-alpha.c: Likewise.
920 * elfxx-ia64.c: Likewise.
921 * elfxx-mips.c: Likewise.
922 * bfd-in2.h: Regenerate.
923
924 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
925 referring to used_by_bfd.
926 * elf64-sparc.c (sec_do_relax): Likewise.
927 * elf64-mmix.c (mmix_elf_section_data): Likewise.
928 * elfxx-mips.c (mips_elf_section_data): Likewise.
929 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
930 (ieee_get_section_contents): Likewise.
931 (ieee_new_section_hook): Formatting.
932 (ieee_canonicalize_reloc): Remove commented out code.
933 * mmo.c (mmo_section_data): Define. Use throughout file.
934 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
935
936 2003-01-31 Graydon Hoare <graydon@redhat.com>
937
938 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
939 * Makefile.in: Regenerate.
940 * opncls.c (calc_crc32, get_debug_link_info,
941 seperate_debug_file_exists, find_seperate_debug_file): New
942 internal functions.
943 (bfd_follow_gnu_debuglink): New function. Follow the pointer
944 contained inside a .gnu_debuglink section.
945 * bfd-in2.h: Regenerate.
946
947 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
948
949 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
950 entry->abfd when it's NULL.
951
952 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
953
954 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
955 _bfd_elf_section_offset returning -2 the same way as -1.
956
957 * elfxx-mips.c (mips_elf_multi_got): New function.
958 (struct mips_got_entry): Make symndx and gotidx signed. Moved
959 addend into union along with address and link hash entry.
960 (struct mips_got_info): Added bfd2got and next.
961 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
962 (mips_elf_got_section, mips_elf_create_got_section): Use
963 SEC_EXCLUDE bit to tell whether we really need the got
964 section. Take boolean arguments to disregard an excluded
965 section, or to create it as excluded. Adjust all callers.
966 Use mips_elf_got_section all over.
967 (mips_elf_local_got_index, mips_elf_got_page,
968 mips_elf_got16_entry): Take input bfd as argument, and pass it
969 on to mips_elf_create_local_got_entry.
970 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
971 Take input bfd as argument, and manage entries in the
972 appropriate GOT.
973 (mips_elf_got_offset_from_index): Take input bfd as argument,
974 and use it to adjust the GP offset of the bfd.
975 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
976 unreferenced GOT entries of global symbols to the end.
977 (mips_elf_record_global_got_symbol): Take input bfd as
978 argument. Add entries to the master GOT hash table.
979 (struct mips_elf_bfd2got_hash): New.
980 (struct mips_elf_got_per_bfd_arg): New.
981 (struct mips_elf_set_global_got_offset_arg): New.
982 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
983 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
984 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
985 mips_elf_merge_gots, mips_elf_set_global_got_offset,
986 mips_elf_resolve_final_got_entry,
987 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
988 mips_elf_got_for_ibfd): New functions.
989 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
990 (MIPS_ELF_GOT_MAX_SIZE): New macro.
991 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
992 (mips_elf_got_entry_hash): Take new fields into account. Use
993 mips_elf_hash_bfd_vma.
994 (mips_elf_got_entry_eq): Take new fields into account.
995 (mips_elf_create_got_section): Initialize new fields.
996 (mips_elf_calculate_relocation): Pass input_bfd to functions
997 that now take it. Adjust gp for the input_bfd.
998 (mips_elf_allocate_dynamic_relocation,
999 mips_elf_create_dynamic_relocation,
1000 _bfd_mips_elf_create_dynamic_sections): Use...
1001 (mips_elf_rel_dyn_section): New function. Borrow code from...
1002 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
1003 now take it. Create the got section if needed, even if
1004 excluded, before recording a global got symbol. Move some
1005 code to...
1006 (mips_elf_record_local_got_symbol): New fn.
1007 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
1008 Compute multi-got global entries offsets. Move GOT code to...
1009 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
1010 if the GOT is too big.
1011 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
1012 undefweak symbol to zero. Generate dynamic relocations for
1013 non-primary GOT entries for global symbols.
1014 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
1015 case. Generate dynamic relocations for local got entries.
1016 Sort dynamic relocations on N64 too, using...
1017 (sort_dynamic_relocs_64): New fns.
1018 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
1019 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
1020
1021 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
1022
1023 * bfd.c (struct _bfd): Added id field.
1024 * opncls.c (_bfd_id_counter): New static variable.
1025 (_bfd_new_bfd): Use it.
1026 * bfd-in2.h: Rebuilt.
1027
1028 2003-01-25 Alan Modra <amodra@bigpond.net.au>
1029
1030 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
1031
1032 2003-01-25 Jakub Jelinek <jakub@redhat.com>
1033
1034 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
1035 (elf32_sparc_rev32_howto): New variable.
1036 (sparc_reloc_map): Add TLS relocs.
1037 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
1038 Handle REV32.
1039 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
1040 New functions.
1041 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
1042 struct elf32_sparc_link_hash_table):
1043 New structures.
1044 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
1045 elf32_sparc_hash_table): Define.
1046 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
1047 create_got_section, elf32_sparc_create_dynamic_sections,
1048 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
1049 functions.
1050 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
1051 reference counting.
1052 (elf32_sparc_gc_sweep_hook): Likewise.
1053 (elf32_sparc_adjust_dynamic_symbol): Likewise.
1054 (elf32_sparc_size_dynamic_sections): Likewise.
1055 (elf32_sparc_relocate_section): Likewise.
1056 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
1057 New functions.
1058 (elf32_sparc_object_p): Allocate backend private object data.
1059 (bfd_elf32_bfd_link_hash_table_create,
1060 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
1061 elf_backend_can_refcount): Define.
1062 (elf_backend_create_dynamic_sections): Define to
1063 elf32_sparc_create_dynamic_sections.
1064 * reloc.c: Add SPARC TLS relocs.
1065 * bfd-in2.h, libbfd.h: Rebuilt.
1066 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
1067 (sparc_reloc_map): Likewise.
1068
1069 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
1070
1071 * bfd-in2.h: Regenerate.
1072 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
1073 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
1074 (elf_howto_table): Add TLS relocs.
1075 (elf_s390_reloc_type_lookup): Likewise.
1076 (elf_s390_link_hash_entry): Add tls_type.
1077 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
1078 New macros.
1079 (elf_s390_link_hash_table): Add tls_ldm_got.
1080 (link_hash_newfunc): Initialize tls_type.
1081 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
1082 (elf_s390_copy_indirect_symbol): Copy tls_type information.
1083 (elf_s390_check_relocs): Support TLS relocs.
1084 (elf_s390_gc_sweep_hook): Likewise.
1085 (allocate_dynrelocs): Likewise.
1086 (elf_s390_size_dynamic_sections): Likewise.
1087 (elf_s390_relocate_section): Likewise.
1088 (elf_s390_finish_dynamic_symbol): Likewise.
1089 (bfd_elf32_mkobject): Define for TLS.
1090 * elf64-s390.c: Same changes as for elf32-s390.c.
1091 * libbfd.h: Regenerate.
1092 * reloc.c: Add s390 TLS relocations.
1093
1094 2003-01-24 Charles Lepple clepple.ghz.cc
1095
1096 * aclocal.m4: Fix name of --enable-install-libbfd switch.
1097
1098 2003-01-23 Nick Clifton <nickc@redhat.com>
1099
1100 * Add sh2e support:
1101
1102 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
1103
1104 * archures.c (bfd_mach_sh2e): Added.
1105 * bfd-in2.h: Rebuilt.
1106 * cpu-sh.c (arch_info_struct): Added SH2e.
1107 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
1108
1109 2003-01-23 Alan Modra <amodra@bigpond.net.au>
1110
1111 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
1112 dynindx to an int. Rearrange for better packing.
1113 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
1114 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
1115 * elf32-sh64.h: New. Split out from include/elf/sh.h.
1116 (struct _sh64_elf_section_data): New struct.
1117 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
1118 * elf32-sh64-com.c: Include elf32-sh64.h.
1119 * elf32-sh64.c: Likewise.
1120 (sh64_elf_new_section_hook): New function.
1121 (bfd_elf32_new_section_hook): Define.
1122 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
1123 (sh64_bfd_elf_copy_private_section_data): Likewise.
1124 (sh64_elf_final_write_processing): Likewise.
1125 * elf32-sparc.c (struct elf32_sparc_section_data): New.
1126 (elf32_sparc_new_section_hook): New function.
1127 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1128 (sec_do_relax): Define.
1129 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
1130 (elf32_sparc_relocate_section): Likewise.
1131 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
1132 * elf64-mmix.c (struct _mmix_elf_section_data): New.
1133 (mmix_elf_section_data): Define. Use throughout file.
1134 (mmix_elf_new_section_hook): New function.
1135 (bfd_elf64_new_section_hook): Define.
1136 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
1137 (ppc64_elf_section_data): Define. Use throughout.
1138 (ppc64_elf_new_section_hook): New function.
1139 (bfd_elf64_new_section_hook): Define.
1140 * elf64-sparc.c (struct sparc64_elf_section_data): New.
1141 (sparc64_elf_new_section_hook): New function.
1142 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
1143 (sec_do_relax): Define.
1144 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
1145 (sparc64_elf_relocate_section): Likewise.
1146 (bfd_elf64_new_section_hook): Define.
1147 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
1148 * elfxx-mips.c (struct _mips_elf_section_data): New.
1149 (mips_elf_section_data): Define. Use throughout.
1150 (_bfd_mips_elf_new_section_hook): New function.
1151 (mips_elf_create_got_section): Don't alloc used_by_bfd.
1152 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
1153 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
1154 * Makefile.am: Run "make dep-am".
1155 * Makefile.in: Regenerate.
1156
1157 2003-01-21 Richard Henderson <rth@redhat.com>
1158
1159 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
1160 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
1161 (elf64_alpha_adjust_dynamic_symbol): Set them.
1162 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
1163 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
1164 symbol index when relaxing LDM to TPREL.
1165 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
1166 relocs, even if the target isn't locally defined.
1167 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
1168 (elf64_alpha_relocate_section): Likewise. Force TP-relative
1169 relocs vs symndx 0 to the tp base.
1170
1171 2003-01-21 Fabio Alemagna <falemagn@aros.org>
1172
1173 * config.bfd: Handle i[3456]86-*-aros*.
1174
1175 2003-01-21 Andreas Schwab <schwab@suse.de>
1176
1177 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
1178 (struct ppc_elf_link_hash_entry): Define.
1179 (ppc_elf_hash_entry): New function.
1180 (struct ppc_elf_link_hash_table): Define.
1181 (ppc_elf_hash_table): New function.
1182 (ppc_elf_link_hash_newfunc): New function.
1183 (ppc_elf_link_hash_table_create): New function.
1184 (ppc_elf_copy_indirect_symbol): New function.
1185 (allocate_dynrelocs): New function.
1186 (readonly_dynrelocs): New function.
1187 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
1188 relocs and determine DT_TEXTREL.
1189 (ppc_elf_check_relocs): Don't do that here, just count the
1190 dynamic relocs.
1191 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
1192 removed section.
1193 (bfd_elf32_bfd_link_hash_table_create): Define.
1194 (elf_backend_copy_indirect_symbol): Define.
1195
1196 2003-01-21 Richard Henderson <rth@redhat.com>
1197
1198 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
1199 TPREL also get a reloc if shared. Remove SREL support.
1200 (elf64_alpha_emit_dynrel): New.
1201 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1202 and GOTTPREL relocs to local symbols against the tp base.
1203 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
1204
1205 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
1206 use count before clobbering r_type.
1207 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
1208 ordering would mean dataflow inspection is necessary.
1209
1210 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
1211
1212 * coffcode.h (coff_set_flags): Added get/set arch hooks.
1213
1214 2003-01-20 Fabio Alemagna <falemagn@aros.org>
1215
1216 * elf32-sh.c: Treat elfNN_bed like other macros defined in
1217 elfxx-target.h and #undef it before #define'ing it.
1218 * elf32-i386.c: Likewise.
1219 * elf32-sh64.c: Likewise.
1220 * elf64-alpha.c: Likewise.
1221 * elf64-sh64.c: Likewise.
1222
1223 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
1224
1225 * bfd-in2.h: Regenerate.
1226 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
1227 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
1228 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
1229 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
1230 R_390_PLTOFF32 and R_390_PLTOFF64.
1231 (elf_s390_reloc_type_lookup): Likewise.
1232 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
1233 of GOTPLT references to a function.
1234 (link_hash_newfunc): Initialize gotplt_refcount.
1235 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
1236 and creation of the got section out of the main switch. Add support
1237 for the gotoff, gotplt and pltoff relocations.
1238 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
1239 and pltoff.
1240 (elf_s390_adjust_gotplt): New function.
1241 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
1242 plt entries.
1243 (allocate_dynrelocs): Add comment.
1244 (elf_s390_relocate_section): Change r_type to unsigned. Add support
1245 for gotoff, gotplt and pltoff relocations.
1246 * elf64-s390.c: Same changes as for elf32-s390.c.
1247 * libbfd.h: Regenerate.
1248 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
1249 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
1250 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
1251 and BFD_RELOC_390_PLTOFF64.
1252
1253 2003-01-18 Jakub Jelinek <jakub@redhat.com>
1254
1255 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
1256 R_IA64_TPREL64[LM]SB against non-global symbol properly.
1257
1258 2003-01-16 Jakub Jelinek <jakub@redhat.com>
1259
1260 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
1261 self_dtpmod_done and self_dtpmod_offset.
1262 (allocate_global_data_got): Only use one got entry for all
1263 dtpmod relocs against local symbols.
1264 (allocate_dynrel_entries): Only need .rela.got entry for
1265 dtpmod against global symbol.
1266 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
1267 Reserve space in .rela.got for the local dtpmod entry.
1268 (set_got_entry): Initialize the common local dtpmod .got entry.
1269 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
1270 and R_IA_64_DTPREL64MSB.
1271
1272 2003-01-16 Alan Modra <amodra@bigpond.net.au>
1273
1274 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
1275 (R_PPC_*): Rename all occurrences to R_PPC64_*.
1276 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
1277 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
1278 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
1279 relative relocs, not with absolute ones.
1280 * Makefile.am: Run "make dep-am".
1281 * Makefile.in: Regenerate.
1282 * po/SRC-POTFILES.in: Regenerate.
1283
1284 2003-01-15 Andreas Schwab <schwab@suse.de>
1285
1286 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
1287 relocation against a non-allocated readonly section.
1288
1289 2003-01-10 Alan Modra <amodra@bigpond.net.au>
1290
1291 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
1292 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
1293
1294 2002-01-08 Klee Dienes <kdienes@apple.com>
1295
1296 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
1297 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
1298 * Makefile.in: Regenerate.
1299
1300 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
1301
1302 * elfn32-mips.c (prev_reloc_section): New.
1303 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
1304 (SET_RELOC_ADDEND): Parenthesize macro argument.
1305
1306 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
1307
1308 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
1309 adjust addil instructions if the symbol has no section.
1310
1311 2003-01-07 DJ Delorie <dj@redhat.com>
1312
1313 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
1314 partial_inplace.
1315
1316 2003-01-07 Andreas Schwab <schwab@suse.de>
1317
1318 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
1319 PC relative relocations.
1320 (elf_m68k_discard_copies): Set it here instead.
1321
1322 2002-01-02 Ben Elliston <bje@redhat.com>
1323 Jeff Johnston <jjohnstn@redhat.com>
1324
1325 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
1326 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
1327 (BFD32_BACKENDS): Add elf32-iq2000.lo.
1328 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
1329 (cpu-iq2000.lo): New target.
1330 * Makefile.in: Regenerate.
1331 * config.bfd: Handle iq2000-*-elf.
1332 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
1333 (bfd_archures_list): Add bfd_iq2000_arch.
1334 * configure.in: Handle bfd_elf32_iq2000_vec.
1335 * configure: Regenerate.
1336 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
1337 and BFD_RELOC_IQ2000_UHI16.
1338 * targets.c (bfd_elf32_iq2000_vec): Declare.
1339 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
1340 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
1341 * cpu-iq2000.c: New file.
1342 * elf32-iq2000.c: Likewise.
1343 * libbfd.h: Regenerate.
1344 * bfd-in2.h: Likewise.
1345
1346 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
1347
1348 * elfxx-mips.c: Include libiberty.h.
1349 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
1350 (mips_set_isa_flags): New function, split out from...
1351 (_bfd_mips_elf_final_write_processing): ...here. Only call
1352 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
1353 (mips_mach_extensions): New array.
1354 (mips_32bit_flags_p): New function.
1355 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
1356 Use mips_32bit_flags_p to check if one binary is 32-bit and the
1357 other is 64-bit. When adopting IBFD's architecture, adopt the
1358 bfd_mach as well as the flags.
1359
1360 2003-01-02 Nick Kelsey <nickk@ubicom.com>
1361
1362 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
1363 fix internal errors, fix bad code generation, fix incorrect stabs
1364 information, and improve ability to eliminate redundant page
1365 instructions. Added code to ip2k_final_link_relocate to self-verify
1366 the linker relaxation. Fix formatting problems.
1367
1368 2002-12-30 Chris Demetriou <cgd@broadcom.com>
1369
1370 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
1371 * archures.c (bfd_mach_mipsisa32r2): New define.
1372 * bfd-in2.h: Regenerate.
1373 * cpu-mips.c (I_mipsisa32r2): New enum value.
1374 (arch_info_struct): Add entry for I_mipsisa32r2.
1375 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
1376 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
1377 (_bfd_mips_elf_final_write_processing): Add
1378 bfd_mach_mipsisa32r2 case.
1379 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
1380 binaries marked as using MIPS32 Release 2.
1381
1382 2002-12-30 Dmitry Diky <diwil@mail.ru>
1383
1384 * Makefile.am: Add msp430 target.
1385 * configure.in: Likewise.
1386 * Makefile.in: Regenerate.
1387 * configure: Regenerate.
1388 * archures.c: Add msp430 architecture vector.
1389 * config.bfd: Likewise.
1390 * reloc.c: Add msp430 relocs.
1391 * targets.c: Add msp320 target.
1392 * cpu-msp430.c: New file: msp430 cpu detection.
1393 * elf32-msp430.c: New file: msp430 reloc processing.
1394 * bfd-in2.h: Regenerate.
1395 * libbfd.h: Regenerate.
1396
1397 2002-12-28 Jakub Jelinek <jakub@redhat.com>
1398
1399 * elf.c (elf_sort_sections): Don't reorder .tbss.
1400 (assign_file_positions_for_segments): Only adjust off/voff
1401 for increased alignment in PT_LOAD or PT_NOTE segment,
1402 but adjust p_filesz for .tbss too. in PT_LOAD consider
1403 .tbss to have zero memory size.
1404 (copy_private_bfd_data) [SECTION_SIZE]: Define.
1405 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
1406 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
1407 into PT_TLS segment. Never put SHF_TLS sections in
1408 segments other than PT_TLS or PT_LOAD.
1409
1410 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
1411 sh_entsize.
1412
1413 2002-12-23 DJ Delorie <dj@redhat.com>
1414
1415 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
1416
1417 2002-12-23 Alan Modra <amodra@bigpond.net.au>
1418
1419 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
1420
1421 2002-12-23 Nick Clifton <nickc@redhat.com>
1422
1423 * archures.c (bfd_arch_get_compatible): Add third parameter
1424 'accept_unknowns'. Only accept unknown format BFDs if
1425 accept_unknowns is true, or if the format is "binary".
1426 * bfd-in2.h: Regenerate.
1427
1428 2002-12-21 Nick Clifton <nickc@redhat.com>
1429
1430 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
1431 that subtracted 8 from pc relative relocations.
1432
1433 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
1434
1435 * coff-h8300.c: Fix comment typos.
1436 * coffcode.h: Likewise.
1437 * cpu-cris.c: Likewise.
1438 * elf32-vax.c: Likewise.
1439 * genlink.h: Likewise.
1440 * linker.c: Likewise.
1441 * som.c: Likewise.
1442 * tekhex.c: Likewise.
1443 * vms-misc.c: Likewise.
1444
1445 2002-12-20 DJ Delorie <dj@redhat.com>
1446
1447 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
1448 * libbfd.h: Regenerate.
1449 * bfd-in2.h: Regenerate.
1450 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
1451 (xstormy16_reloc_map): Add R_XSTORMY16_12.
1452
1453 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
1454
1455 * doc/bfdint.texi: Fix typos.
1456
1457 2002-12-20 Paul Eggert <eggert@twinsun.com>
1458
1459 Port to POSIX 1003.1-2001.
1460 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
1461 * configure.in (build-warnings): Likewise.
1462 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
1463 * aclocal.m4: Regenerate.
1464 * config.in: Regenerate.
1465 * configure: Regenerate.
1466
1467 2002-12-19 Alan Modra <amodra@bigpond.net.au>
1468
1469 * coff-h8300.c: Include libiberty.h.
1470 (h8300_reloc16_extra_cases): Check the hash table creator before
1471 referencing h8300 specific fields. Stash the hash table pointer
1472 in a local var. Comment typo fixes.
1473 (h8300_bfd_link_add_symbols): Likewise.
1474
1475 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
1476 dst_mask comments.
1477 * bfd-in2.h: Regenerate.
1478
1479 2002-12-18 Alan Modra <amodra@bigpond.net.au>
1480
1481 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
1482 code a little. Comment on dynamic relocs against section symbols.
1483
1484 2002-12-17 Roger Sayle <roger@eyesopen.com>
1485
1486 * configure.host (ia64-*-hpux*): Support 64 bit targets using
1487 the HP compiler's "long long".
1488
1489 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
1490
1491 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
1492 and R_XSTORMY16_HI16) howto entries.
1493 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1494 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
1495 determine the start of the second reloc table.
1496
1497 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
1498
1499 * ecofflink.c: Fix the reading of the debugging information
1500 of Tru64/Alpha binaries that are produced by recent Compaq
1501 compilers.
1502 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
1503 table.
1504 (lookup_line): Because of the strange information sometimes
1505 generated by Compaq's recent compilers, change how the FDR
1506 table is searched so that PDRs (procedure descriptors) are
1507 correctly found. Note that this change is really more of a hack;
1508 however, I have included extensive documentation as to why
1509 this is the best solution short of an extensive rewrite or
1510 another hack.
1511 (fdrtab_lookup): Add comments to explain the algorithm.
1512
1513 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1514
1515 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
1516 initializers to match struct declaration.
1517
1518 2002-12-12 Alan Modra <amodra@bigpond.net.au>
1519
1520 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
1521 * elf.c (get_program_header_size): Likewise.
1522 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
1523 (m32r_elf_generic_reloc): Likewise.
1524 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
1525 * elflink.h (elf_bfd_discard_info): Likewise.
1526
1527 2002-12-12 Alan Modra <amodra@bigpond.net.au>
1528
1529 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
1530 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
1531 DT_RELSZ adjustment, not output section. Avoid writing tags when
1532 unchanged. Don't assume linker script is sane, adjust DT_REL too.
1533 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
1534 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
1535 DT_RELASZ adjustment, not output section. Avoid writing tags when
1536 unchanged. Adjust DT_RELA.
1537 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
1538 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
1539
1540 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1541
1542 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
1543 addend by 4.
1544
1545 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1546
1547 * elfxx-mips.c (struct mips_got_entry): New.
1548 (struct mips_got_info): Added got_entries field.
1549 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
1550 (mips_elf_local_got_index, mips_elf_got_page,
1551 mips_elf_got16_entry): Re-implement in terms of new...
1552 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
1553 Change return type.
1554 (mips_elf_highest): Warning clean-up.
1555 (mips_elf_create_got_section): Initialize got_entries.
1556 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
1557 local got size.
1558 (_bfd_mips_elf_size_dynamic_sections): Do not account for
1559 GOT_PAGE entries, since we now reuse GOT16 entries.
1560
1561 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
1562
1563 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
1564 read-only section that lies after .text and before .data to be
1565 written into the output file and included in a_text.
1566 (translate_to_native_sym_flags): If an otherwise unrepresentable
1567 section was merged with .text, convert its symbols to N_TEXT
1568 symbols.
1569 * libaout.h (aout_section_merge_with_text_p): New macro.
1570
1571 2002-12-08 Alan Modra <amodra@bigpond.net.au>
1572
1573 * bfd-in.h: Comment typo fix. Formatting.
1574 * bfd-in2.h: Regenerate.
1575 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
1576 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
1577 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
1578
1579 2002-12-05 Richard Henderson <rth@redhat.com>
1580
1581 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
1582 Only send PCREL21B though the plt. Fix installed reloc type.
1583 (elfNN_ia64_relocate_section): Give error for dynamic reloc
1584 against PCREL22 or PCREL64I; clean up error messages for
1585 branch relocs.
1586
1587 2002-12-04 Kevin Buettner <kevinb@redhat.com>
1588
1589 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
1590 New functions.
1591 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
1592
1593 2002-12-04 David Mosberger <davidm@hpl.hp.com>
1594
1595 * cpu-ia64-opc.c: Add operand constant "ar.csd".
1596
1597 2002-12-04 H.J. Lu <hjl@gnu.org>
1598
1599 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
1600 BFD address when constructing local name.
1601
1602 2002-12-04 Andreas Schwab <schwab@suse.de>
1603
1604 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
1605 member.
1606 (elf_m68k_link_hash_table_create): Initialize it.
1607 (elf_m68k_check_relocs): Handle symbols that are forced to be
1608 local due to visibility changes.
1609 (elf_m68k_adjust_dynamic_symbol): Likewise.
1610 (elf_m68k_size_dynamic_sections): Likewise.
1611 (elf_m68k_discard_copies): Likewise.
1612 (elf_m68k_relocate_section): Likewise.
1613
1614 2002-12-04 Alan Modra <amodra@bigpond.net.au>
1615
1616 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
1617
1618 2002-12-04 Alan Modra <amodra@bigpond.net.au>
1619
1620 * srec.c (srec_write_symbols): Restore '$' prefix to address
1621 accidentally removed in 2002-04-04 change.
1622 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
1623
1624 2002-12-03 Nick Clifton <nickc@redhat.com>
1625
1626 * elf32-ppc.c (apuinfo_list_init): New function.
1627 (apuinfo_list_add): New function: Add a value to the list.
1628 (apuinfo_list_length): New function: Return the number of
1629 values on the list.
1630 (apuinfo_list_element): New function: Return a value on the
1631 list.
1632 (apuinfo_list_finish): New function: Free the resources used
1633 by the list.
1634 (ppc_elf_begin_write_processing): New function. Scan the
1635 input bfds for apuinfo sections.
1636 (ppc_elf_write_section): New function: Delay the creation of
1637 the contents of an apuinfo section in an output bfd.
1638 (ppc_elf_final_write_processing): New function. Create the
1639 contents of an apuinfo section in an output bfd.
1640 (elf_backend_begin_write_processing): Define.
1641 (elf_backend_final_write_processing): Define.
1642 (elf_backend_write_section): Define.
1643
1644 2002-12-03 Richard Henderson <rth@redhat.com>
1645
1646 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
1647
1648 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1649
1650 Fix PR savannah/1417:
1651 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
1652 branch if it goes to the start of the deleted region.
1653
1654 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
1655
1656 * bfd-in2.h (bfd_mach_m6812): Rebuild.
1657 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
1658 bfd_mach_m6812s): Declare.
1659
1660 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
1661 (_bfd_m68hc12_elf_set_private_flags): Call it.
1662 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
1663 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
1664 report microcontroller incompatibilities (HC12 vs HCS12).
1665 (elf_backend_object_p): Update.
1666
1667 2002-11-30 Alan Modra <amodra@bigpond.net.au>
1668
1669 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
1670 (enum bfd_boolean, boolean): Delete.
1671 (bfd_boolean): Typedef to an int.
1672 (FALSE, TRUE): Define.
1673 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
1674 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
1675 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
1676 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
1677 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
1678 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
1679 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
1680 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
1681 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
1682 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
1683 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
1684 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
1685 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
1686 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
1687 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
1688 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
1689 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
1690 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
1691 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
1692 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
1693 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
1694 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
1695 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
1696 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
1697 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
1698 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1699 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1700 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1701 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
1702 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
1703 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1704 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
1705 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
1706 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
1707 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
1708 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
1709 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
1710 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
1711 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
1712 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
1713 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
1714 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
1715 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
1716 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
1717 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
1718 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
1719 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
1720 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
1721 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
1722 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
1723 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
1724 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
1725 of bfd_boolean vars with TRUE/FALSE. Formatting.
1726 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
1727
1728 2002-11-28 Alan Modra <amodra@bigpond.net.au>
1729
1730 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
1731 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
1732 with Elf_Internal_Rela.
1733 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
1734 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
1735 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
1736 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
1737 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
1738 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
1739 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
1740 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
1741 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1742 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
1743 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
1744 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
1745 throughout instead.
1746 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
1747 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
1748 Remove INLINE keyword.
1749 (elf_swap_reloc_in): Likewise. Also clear r_addend.
1750 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
1751 as a bfd_byte *.
1752 (elf_write_relocs): Consolidate REL and RELA code.
1753 (elf_slurp_reloc_table_from_section): Simplify REL code.
1754 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
1755 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
1756 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
1757 RELA code.
1758 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
1759 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
1760 (elf_link_output_relocs): Likewise.
1761 (elf_reloc_link_order): Likewise.
1762 (elf_finish_pointer_linker_section): Likewise.
1763 (struct elf_link_sort_rela): Remove union.
1764 (elf_link_sort_cmp1): Update to suit.
1765 (elf_link_sort_cmp2): Here too.
1766 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
1767 over-allocation for int_rels_per_ext_rel != 1 case.
1768 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
1769 * elf32-i386.c: Likewise.
1770 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
1771 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
1772 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
1773 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
1774 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
1775 elf64-sparc.c, elf64-x86-64.c: Likewise.
1776 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
1777 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
1778 bfd_elf32_swap_reloc_in.
1779
1780 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
1781 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
1782 (mips_elf64_swap_reloc_in): Zero r_addend.
1783 (mips_elf64_be_swap_reloc_in): Likewise.
1784 (mips_elf64_slurp_one_reloc_table): Simplify.
1785
1786 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
1787 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1788 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1789
1790 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1791
1792 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
1793 unresolved debugging relocs in dynamic applications.
1794 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1795
1796 2002-11-26 Alan Modra <amodra@bigpond.net.au>
1797
1798 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
1799 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
1800 on a relocatable link. Comment typos.
1801 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
1802 in the order they are declared. Clear elf_hash_value too.
1803 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
1804 eh_info and tls_segment.
1805 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
1806 sorted when discarding relocs by turning them into R_*_NONE.
1807
1808 * libbfd.c (warn_deprecated): Comment spelling.
1809 * po/SRC-POTFILES.in: Regenerate.
1810
1811 2002-11-21 Richard Henderson <rth@redhat.com>
1812
1813 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
1814 arch's st_other bits when merging visibilities.
1815 (elf_link_output_extsym): Tidy clearing of visibility field.
1816
1817 2002-11-21 Alan Modra <amodra@bigpond.net.au>
1818
1819 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
1820 (SWAP_OUT_RELOC_OFFSET): Define.
1821
1822 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
1823
1824 * elf.c (_bfd_elf_link_hash_table_init): Make sure
1825 can_refcount is properly extended to the type of
1826 init_refcount.
1827
1828 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
1829
1830 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
1831 (_bfd_mips_elf_relocate_section): Use it.
1832
1833 * elfxx-mips.c (MNAME): New macro.
1834 (_bfd_mips_elf_check_relocs): Use it.
1835 (_bfd_mips_elf_discard_info): Likewise.
1836 (_bfd_mips_elf_final_link): Likewise.
1837
1838 2002-11-19 Alan Modra <amodra@bigpond.net.au>
1839
1840 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
1841 rel_hdr.sh_size too.
1842
1843 2002-11-18 Klee Dienes <kdienes@apple.com>
1844
1845 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
1846 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
1847 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
1848 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
1849 Add dependencies for bfdwin.c, bfdio.c.
1850 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
1851 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
1852 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
1853 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
1854 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
1855 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
1856 bfd_get_size (moved from libbfd.c and bfd.c).
1857 * bfdwin.c New file. Contains _bfd_window_internal,
1858 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
1859 libbfd.c and bfd.c).
1860 * po/SRC-POTFILES.in: Regenerate.
1861 * po/bfd.pot: Regenerate.
1862 * libbfd.h: Regenerate.
1863 * bfd-in2.h: Regenerate.
1864 * aclocal.m4: Regenerate.
1865 * Makefile.in: Regenerate.
1866 * configure: Regenerate.
1867
1868 2002-11-18 Klee Dienes <kdienes@apple.com>
1869
1870 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
1871
1872 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
1873
1874 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
1875 jsr after a short jump.
1876 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1877
1878 2002-11-15 Klee Dienes <kdienes@apple.com>
1879
1880 * pef.c (bfd_pef_convert_architecture): Move declaration of
1881 ARCH_POWERPC and ARCH_M68K to the start of the function.
1882
1883 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
1884
1885 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
1886
1887 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
1888
1889 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
1890 For bpo_gregs_section->contents, allocate _raw_size, not
1891 _cooked_size.
1892
1893 2002-11-13 Klee Dienes <kdienes@apple.com>
1894
1895 * config.bfd: Add entries for powerpc-*-darwin and cousins.
1896
1897 2002-11-13 H.J. Lu <hjl@gnu.org>
1898
1899 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
1900
1901 2002-11-13 Klee Dienes <kdienes@apple.com>
1902 Alan Modra <amodra@bigpond.net.au>
1903
1904 * bfd.c (struct bfd_preserve): New.
1905 (bfd_preserve_save): New function.
1906 (bfd_preserve_restore): Ditto.
1907 (bfd_preserve_finish): Ditto.
1908 * bfd-in2.h: Regenerate.
1909 * mach-o.c: Formatting.
1910 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
1911 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
1912 (bfd_mach_o_core_p): Ditto.
1913 (bfd_mach_o_scan): Pass in mdata.
1914 * mach-o.h (bfd_mach_o_scan): Update prototype.
1915 * pef.c: Formatting.
1916 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
1917 (bfd_pef_xlib_object_p): Ditto.
1918 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
1919 * pef.h (bfd_pef_scan): Update prototype.
1920 * xsym.c: Formatting, K&R fixes.
1921 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
1922 (bfd_sym_scan): New function split out from bfd_sym_object_p.
1923 * xsym.h (bfd_sym_scan): Declare.
1924 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
1925 * elfcore.h (elf_core_file_p): Likewise.
1926 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
1927
1928 2002-11-12 Nick Clifton <nickc@redhat.com>
1929
1930 * po/da.po: Updated Danish translation.
1931
1932 2002-11-12 Alan Modra <amodra@bigpond.net.au>
1933
1934 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
1935 relocatable link too.
1936 (elf_link_input_bfd): When emitting relocs, adjust offsets for
1937 eh_frame and stab sections. Zap deleted relocs.
1938 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
1939 (elf_bfd_discard_info): Run for relocatable link too.
1940 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
1941 Handle ld -r case.
1942 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
1943 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
1944
1945 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
1946 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
1947 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
1948 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
1949 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
1950 (struct elf_link_hash_table): Add eh_info.
1951 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
1952 (_bfd_elf_discard_section_eh_frame): Update prototype.
1953 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
1954 (_bfd_elf_write_section_eh_frame): Likewise.
1955 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
1956 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
1957 param. Get "hdr_info" from link hash table.
1958 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
1959 header section from link hash table. Save header section to elf_tdata.
1960 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
1961 header section from link hash table. Don't alloc hdr_info. Clear
1962 hdr_sec instead of setting "strip".
1963 (_bfd_elf_eh_frame_section_offset): Formatting.
1964 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
1965 Get header section from link hash table.
1966 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
1967 Get header section from link hash table.
1968 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
1969 (get_program_header_size): Likewise.
1970 (_bfd_elf_section_offset): Formatting.
1971 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
1972 section pointer in link hash table.
1973 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
1974 and _bfd_elf_write_section_eh_frame calls. Update comment about
1975 eh_frame entries.
1976 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
1977 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
1978
1979 * po/SRC-POTFILES.in: Regenerate.
1980
1981 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
1982 relocs for discarded FDEs. Remove dead code.
1983 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
1984 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
1985 Tidy conditions under which stabs are edited. Formatting.
1986 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
1987 from discarded relocs.
1988 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
1989 section adjustments after testing magic values.
1990
1991 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
1992
1993 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
1994 references to large plt symbols.
1995
1996 2002-11-12 Klee Dienes <kdienes@apple.com>
1997
1998 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
1999 looking for an unused section name.
2000
2001 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
2002
2003 * coff-h8300.c: Fix formatting.
2004 * elf32-h8300.c: Likewise.
2005 * reloc16.c: Likewise.
2006
2007 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
2008
2009 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
2010 section when dynamic section unused; _bfd_strip_section_from_output
2011 instead.
2012
2013 2002-11-08 Alan Modra <amodra@bigpond.net.au>
2014
2015 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
2016 and sym_vec.
2017
2018 * dwarf2.c: Revert last change.
2019
2020 2002-11-07 Michal Ludvig <mludvig@suse.cz>
2021
2022 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2023 _bfd_dwarf2_find_nearest_line): Use
2024 bfd_simple_get_relocated_section_contents() instead of
2025 bfd_get_section_contents().
2026 * reloc.c (bfd_perform_relocation): Add sanity check.
2027 * simple.c (simple_get_relocated_section_contents): If the section
2028 does not have any relocs associated with it, just return the
2029 unadjusted contents.
2030
2031 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
2032
2033 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
2034 case R_CRIS_32_GOT>: Correct test for filling in constant .got
2035 contents, enabling for a non-DSO, for symbols defined in the
2036 program with --export-dynamic.
2037
2038 2002-11-07 Alan Modra <amodra@bigpond.net.au>
2039
2040 * elf64-ppc.c: Comment typo fixes.
2041 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
2042
2043 2002-11-07 Nick Clifton <nickc@redhat.com>
2044
2045 * po/da.po: Updated Danish translation.
2046
2047 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
2048
2049 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
2050 exactly three internal relocs per external reloc. Set reloc_count
2051 to the external reloc count.
2052
2053 2002-11-06 Klee Dienes <kdienes@apple.com>
2054
2055 * coff-stgo32.c (stub_bytes): Mark as const.
2056 Fix comment formatting.
2057
2058 2002-11-06 Klee Dienes <kdienes@apple.com>
2059
2060 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
2061 xsym.lo.
2062 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
2063 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
2064 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
2065 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
2066 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
2067 sym.
2068 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
2069 * Makefile.in: Regenerate.
2070 * doc/Makefile.in: Regenerate.
2071 * bfd-in2.h: Regenerate.
2072 * xsym.c: New file. Contains support for the Apple/Metrowerks
2073 xSYM debugging format.
2074 * xsym.h: New file.
2075 * pef.c: New file. Contains support for the Apple Code Fragment
2076 Manager Preferred Executable Format
2077 * pef.h: New file.
2078 * pef-traceback.h: New file. Contains support for parsing PowerPC
2079 traceback tables as used by PEF executables (and perhaps other
2080 systems as well).
2081 * mach-o.c: New file. Contains support for the Mach-O object file
2082 format.
2083 * mach-o.h: New file.
2084 * mach-o-target.c: New file. Declares the mach-o targets
2085 themselves. Included three times by mach-o.c; each time with a
2086 different set of macros set.
2087
2088 2002-11-06 Graeme Peterson <gp@qnx.com>
2089
2090 * Makefile.am: Remove entries for elf32-qnx.[ch].
2091 * Makefile.in: Regenerate.
2092 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
2093 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
2094 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2095 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
2096 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
2097 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
2098 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
2099 * configure: Regenerate.
2100 * elf32-qnx.c: Remove.
2101 * elf32-qnx.h: Remove.
2102 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
2103 is_contained_by_filepos, and copy_private_bfd_data_p.
2104 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
2105 is_contained_by_filepos, and copy_private_bfd_data_p.
2106 * elf32-i386.c: Remove QNX extended bfd support.
2107 * elf32-ppc.c: Remove QNX extended bfd support.
2108 * elf32-sh.c: Remove QNX extended bfd support.
2109 * elfarm-nabi.c: Remove QNX extended bfd support.
2110 * targets.c: Remove qnx vectors.
2111 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
2112 (elf_backend_is_contained_by_filepos): Remove.
2113 (elf_backend_copy_private_bfd_data_p): Remove.
2114 * po/SRC-POTFILES.in: Regenerate.
2115
2116 2002-11-06 David O'Brien <obrien@FreeBSD.org>
2117 Alan Modra <amodra@bigpond.net.au>
2118
2119 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
2120 dynamic relocs against section symbols for the output section vma.
2121
2122 2002-11-05 Alan Modra <amodra@bigpond.net.au>
2123
2124 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
2125 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
2126
2127 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2128 Alan Modra <amodra@bigpond.net.au>
2129
2130 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
2131 vectors in target_selvecs.
2132 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
2133 in target_selvecs.
2134 (sh-*-netbsdelf*): Likewise.
2135 * configure.in (assocvecs): New variable. Handle assocvecs like
2136 selvecs.
2137 * configure: Regenerate.
2138 * format.c (bfd_check_format_matches): Store bfd_target pointers
2139 in matching_vector instead of target names. Select first target
2140 from bfd_associated_vector that matches a list of ambiguous targets.
2141 * targets.c (_bfd_associated_vector): New array.
2142 (bfd_associated_vector): New variable.
2143 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
2144 * libbfd-in.h (bfd_associated_vector): Declare.
2145 * libbfd.h: Regenerate.
2146
2147 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
2148
2149 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
2150 non-NULL before dereferencing.
2151
2152 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2153
2154 * vms.c (vms_object_p): Restore the start address when returning
2155 NULL.
2156
2157 2002-11-04 Alan Modra <amodra@bigpond.net.au>
2158 Hans-Peter Nilsson <hp@axis.com>
2159
2160 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
2161 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
2162 Set up a larger symshndxbuf, and write it out. Free it on
2163 exit rather than freeing symbuf twice. Correct section index
2164 on output section symbol loop.
2165 (elf_link_output_sym): Accumulate symbol extension section
2166 indices, reallocating symshndxbuf rather than writing it out.
2167 (elf_link_flush_output_syms): Don't flush symshndxbuf.
2168 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
2169 Use bfd_zalloc to clear i_shdrp[0] too.
2170
2171 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
2172
2173 * elf32-sh64-com.c (sh64_address_in_cranges): Use
2174 _raw_size of cranges section if _cooked_size not yet set.
2175
2176 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
2177
2178 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
2179 for bfd_elf32_swap_symbol_out.
2180
2181 2002-10-31 David O'Brien <obrien@FreeBSD.org>
2182
2183 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
2184 signed and unsigned in comparison.
2185
2186 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
2187
2188 * coffcode.h: Remove extraneous '\'.
2189
2190 2002-10-28 H.J. Lu <hjl@gnu.org>
2191
2192 * Makefile.am (targets.lo): Depend on Makefile instead of
2193 config.status.
2194 (archures.lo): Likewise.
2195 * Makefile.in: Regenerated.
2196
2197 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
2198
2199 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
2200 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
2201 targ_selvecs.
2202
2203 2002-10-25 Jim Wilson <wilson@redhat.com>
2204
2205 * elf64-sh64.c (sh_elf64_relocate_section): Call
2206 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
2207 of SHF_MERGE section.
2208
2209 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
2210
2211 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
2212
2213 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
2214
2215 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
2216 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
2217 unsigned int.
2218 (NAME(aout,final_link)): Cast enum used in assignment.
2219 (aout_link_write_symbols): Cast enums in comparisons, int values to
2220 boolean, enums in assignments to int.
2221 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
2222 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
2223 with unsigned ints.
2224 (aout_link_reloc_link_order): Cast enum to int in assignment.
2225 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
2226 calls to char *.
2227 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
2228 assignment.
2229 * bfd-in2.h (bfd_set_section_vma): Likewise.
2230 * bfd.c (bfd_record_phdr): Cast enums in assignments.
2231 * binary.c (bfd_alloc): Cast enum to long.
2232 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
2233 * dwarf2.c (read_abbrevs): Add casts to enum types.
2234 (read_attribute_value): Likewise.
2235 (arange_add): Cast result of bfd_zalloc call.
2236 (comp_unit_contains_address): Return true and false.
2237 (comp_unit_find_nearest_line): Cast return to boolean.
2238 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
2239 * gen-aout.c: define macro '_' if not defined.
2240 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
2241 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
2242 (bfd_write_bigendian_4byte_int): Cast return to boolean.
2243 (bfd_seek): Cast bfd_realloc to bfd_byte *.
2244 (bfd_generic_is_local_label_name): Cast return to boolean.
2245 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
2246 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
2247 struct bfd_hash_entry *.
2248 (_bfd_generic_link_hash_newfunc): likewise.
2249 (_bfd_generic_final_link): Cast enum to unsigned int.
2250 * merge.c (sec_merge_emit): Cast return to boolean.
2251 (merge_strings): Add casts to const unsigned char *.
2252 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
2253 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
2254 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
2255 struct bfd_hash_entry *.
2256 (bfd_set_section_content): Add cast to PTR in comparison.
2257 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
2258 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
2259 simple_dummy_unattached_reloc,
2260 bfd_simple_get_relocated_section_contents): Add K&R declarations and
2261 function definitions.
2262 * srec.c (S3Forced): Initialize to false.
2263 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
2264 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
2265 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
2266 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
2267 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
2268 comparisons.
2269
2270 2002-10-23 Jakub Jelinek <jakub@redhat.com>
2271
2272 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
2273 relocs into shared lib non-allocated reloc sections.
2274
2275 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2276
2277 * dwarf2.c (add_line_info): Ensure that the line_info_table is
2278 sorted even when given an out-of-order line sequence.
2279 (lookup_address_in_line_info_table): When an exact VMA match is
2280 not found, return line information with the closest VMA.
2281
2282 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
2283
2284 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
2285 HPUX 11.00 patch PHSS_26559.
2286
2287 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
2288
2289 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
2290 the options section into a separate section unless IRIX 6
2291 compatibility is enabled.
2292
2293 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
2294
2295 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
2296 into arrays.
2297 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
2298 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
2299 into account.
2300 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
2301 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
2302
2303 2002-10-21 Graeme Peterson <gp@qnx.com>
2304
2305 * targets.c (_bfd_target_vector): Add missing qnx vectors.
2306
2307 2002-10-21 Alan Modra <amodra@bigpond.net.au>
2308
2309 * targets.c (bfd_target_list): Don't return the default target twice.
2310
2311 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
2312
2313 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
2314 perror with bfd_perror.
2315
2316 2002-10-19 H.J. Lu <hjl@gnu.org>
2317
2318 * elflink.h (elf_link_add_object_symbols): Correctly handle
2319 DT_RPATH and DT_RUNPATH.
2320
2321 2002-10-19 Mark Kettenis <kettenis@gnu.org>
2322
2323 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
2324
2325 2002-10-17 Denis Chertykov <denisc@overta.ru>
2326
2327 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
2328 for ip2k port.
2329
2330 2002-10-17 Alan Modra <amodra@bigpond.net.au>
2331
2332 * elfxx-target.h (USE_REL): Don't define as 1.
2333 * elf32-arm.h (USE_REL): Provide a default define of 0.
2334 Use #if rather than #ifdef when testing USE_REL.
2335 * elf32-m32r.c: Likewise.
2336
2337 * elf32-arc.c (USE_REL): Define as 1.
2338 * elf32-d10v.c (USE_REL): Likewise.
2339 * elf32-m32r.c (USE_REL): Likewise.
2340 * elf32-m68hc11.c (USE_REL): Likewise.
2341 * elf32-m68hc12.c (USE_REL): Likewise.
2342 * elf32-or32.c (USE_REL): Likewise.
2343 * elfarm-nabi.c (USE_REL): Likewise.
2344
2345 2002-10-16 Jakub Jelinek <jakub@redhat.com>
2346
2347 * config.bfd (s390-*-linux*): Add targ64_selvecs.
2348 (s390x-*-linux*): Add targ_selvecs.
2349
2350 2002-10-16 Alan Modra <amodra@bigpond.net.au>
2351
2352 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
2353 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2354 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
2355 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
2356 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
2357 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
2358 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
2359 (SOURCE_HFILES): Add elf32-qnx.h.
2360 (BUILD_HFILES): Add bfdver.h.
2361 Run "make dep-am".
2362 * Makefile.in: Regenerate.
2363 * configure.in Update bfd vector dependencies.
2364 * configure: Regenerate.
2365 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
2366 * elf32-i386qnx.c: Likewise.
2367 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
2368 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
2369 * elf32-sh-lin.c: Likewise.
2370 * elf32-shqnx.c: Likewise.
2371 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
2372 * elf32-sh64-nbsd.c: Likewise.
2373 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
2374 * elf64-sh64-nbsd.c: Likewise.
2375 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
2376 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
2377 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
2378 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
2379 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
2380 (elf_backend_is_contained_by_filepos): Likewise.
2381 (elf_backend_copy_private_bfd_data_p): Likewise.
2382 Globalize and move functions to..
2383 * elf32-qnx.c: ..here. New file.
2384 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
2385 emit target vectors when INCLUDE_SHMEDIA.
2386 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
2387 end of file.
2388 * elf64-sh64.c: Remove ELF_ARCH test.
2389 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
2390 * po/BLD-POTFILES.in: Regenerate.
2391 * po/SRC-POTFILES.in: Regenerate.
2392
2393 2002-10-16 Alan Modra <amodra@bigpond.net.au>
2394
2395 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
2396 loaded with --just-symbols.
2397
2398 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
2399 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2400 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2401 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
2402
2403 2002-10-15 Richard Henderson <rth@redhat.com>
2404
2405 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
2406 (BFD64_BACKENDS_CFILES): Likewise.
2407 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
2408 * elf64-alpha-fbsd.c: Remove file, move code ...
2409 * elf64-alpha.c: ... here.
2410 * Makefile.in, configure: Rebuild.
2411
2412 2002-10-14 Richard Henderson <rth@redhat.com>
2413
2414 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
2415 VALUE, not ADDEND.
2416
2417 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
2418
2419 * elf32-sh.c (elf_sh_link_hash_entry): Replace
2420 datalabel_got_offset with union of datalabel_got
2421 offset and refcount.
2422 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
2423 (allocate_dynrelocs): Delete unnecessary code for
2424 STT_DATALABEL type. Create entry in got for
2425 datalabel version of symbol if datalabel_got.refcount > 0.
2426 (sh_elf_relocate_section): Use datalabel_got union.
2427 (sh_elf_gc_sweep_hook): Pull common code to initialize
2428 h and eh out of switch statement. Declare seen_stt_datalabel.
2429 Initialize it. Decrement datalabel_got.refcount for
2430 got relocs when seen_stt_datalabel is true.
2431 Decrement local_got_refcounts entry for datalabel got relocs
2432 of local symbols.
2433 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
2434 (sh_elf_check_relocs): Declare seen_stt_datalabel.
2435 Initialize it. When seen_stt_datalabel is true, increment
2436 datalabel_got refcount rather than got.refcount.
2437 (sh_elf_finish_dynamic_symbol): Create relocs to
2438 initialize got entry for datalabel version of symbol.
2439
2440 2002-10-14 Alan Modra <amodra@bigpond.net.au>
2441
2442 * Makefile.am: Run "make dep-am".
2443 (BFD_H_FILES): Remove version.h.
2444 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
2445 * version.h: ..to here.
2446 * configure.in (bfd_version_date): Remove.
2447 (AC_OUTPUT): Make bfdver.h from version.h.
2448 * bfd.c: #include "bfdver.h".
2449 * vms-hdr.c: Likewise.
2450 * Makefile.in: Regenerate.
2451 * bfd-in2.h: Regenerate.
2452 * configure: Regenerate.
2453 * po/SRC-POTFILES.in: Regenerate.
2454
2455 2002-10-14 Alan Modra <amodra@bigpond.net.au>
2456
2457 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
2458 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
2459 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
2460 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
2461 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
2462 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
2463 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
2464 bfd_mach_ip2022, bfd_mach_ip2022ext,
2465 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
2466 * bfd-in2.h: Regenerate.
2467
2468 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2469
2470 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
2471 endian vector to targ_selvecs.
2472
2473 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
2474
2475 * elfxx-mips.c (mips_elf_calculate_relocation): Take
2476 save_addend argument. Don't apply the 32-bit mask to a
2477 GPREL32 value if it's to be used in another relocation. Don't
2478 use forced-check computation of local_p to decide whether to
2479 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
2480 of the addend of a non-in-place GPREL16 relocation.
2481 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
2482 mips_elf_calculate_relocation().
2483
2484 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2485
2486 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
2487 with symbols in other sections if we relaxed something; the sections
2488 output offsets must be re-computed before.
2489
2490 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
2491
2492 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
2493 handling to use Elf_Internal_Sym.
2494 (m68hc11_elf_relax_delete_bytes): Likewise.
2495
2496 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2497
2498 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
2499 sh_elf_object_p, dtpoff_base): New functions.
2500 (sh_elf_howto_table): Add TLS relocs.
2501 (sh_reloc_map): Likewise.
2502 (sh_elf_info_to_howto): Support TLS relocs.
2503 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
2504 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
2505 New macros.
2506 (sh_elf_obj_tdata): New.
2507 (elf_sh_link_hash_table): Add tls_ldm_got.
2508 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
2509 (allocate_dynrelocs): Support TLS relocs.
2510 (sh_elf_size_dynamic_sections): Likewise.
2511 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
2512 .rela.got section when found already. Return false after printing
2513 error about unresolvable relocation.
2514 (sh_elf_gc_sweep_hook): Support TLS relocs.
2515 (sh_elf_check_relocs): Likewise.
2516 (sh_elf_finish_dynamic_symbol): Likewise.
2517 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
2518 * reloc.c: Add SH TLS relocs.
2519 * bfd-in2.h, libbfd.h: Regenerate.
2520
2521 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
2522
2523 * Makefile.in: Regenerated.
2524
2525 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
2526
2527 * Makefile.am: Run dep-am.
2528 (BFD_H_DEP): Add simple.c and linker.c.
2529 (BFD32_LIBS): Add simple.lo.
2530 (BFD32_LIBS_CFILES): Add simple.c.
2531 * Makefile.in: Regenerated.
2532 * bfd-in2.h: Regenerated.
2533 * simple.c: New file.
2534
2535 2002-10-11 Alan Modra <amodra@bigpond.net.au>
2536
2537 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
2538 (record_thumb_to_arm_glue): Likewise.
2539 * ecoff.c (ecoff_link_add_externals): Likewise.
2540 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
2541 (record_thumb_to_arm_glue): Likewise.
2542 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
2543 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
2544 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2545 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
2546 * elf64-ppc.c (func_desc_adjust): Likewise.
2547 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2548 (sh64_elf64_create_dynamic_sections): Likewise.
2549 * elflink.c (_bfd_elf_create_got_section): Likewise.
2550 (_bfd_elf_create_dynamic_sections): Likewise.
2551 (_bfd_elf_create_linker_section): Likewise.
2552 * elflink.h (elf_add_default_symbol): Likewise.
2553 (elf_link_create_dynamic_sections): Likewise.
2554 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2555 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
2556 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
2557 (_bfd_mips_elf_add_symbol_hook): Likewise.
2558 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2559 * linker.c (generic_link_add_symbol_list): Likewise.
2560 * xcofflink.c (xcoff_link_add_symbols): Likewise.
2561
2562 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
2563
2564 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
2565 completely removed. Correct local sym adjustment.
2566
2567 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
2568
2569 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
2570 Correct mistake in calculation of address of .got.
2571 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
2572 elf_sh64_pic_plt_entry_le): Likewise.
2573
2574 2002-10-09 Richard Shann <richard.shann@superh.com>
2575 Stephen Clarke <stephen.clarke@superh.com>
2576
2577 * Makefile.am: Add entries for elf32-sh64-lin.c and
2578 elf64-sh64-lin.c. Regenerate.
2579 * Makefile.in: Regenerate.
2580 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
2581 to use sh64 vectors rather than sh vectors.
2582 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2583 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2584 * configure: Regenerate.
2585 * elf32-sh64-lin.c: New file.
2586 * elf64-sh64-lin.c: New file.
2587 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
2588 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
2589
2590 2002-10-08 H.J. Lu <hjl@gnu.org>
2591
2592 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
2593 IE->LE transition for R_386_TLS_IE.
2594
2595 2002-10-08 Alan Modra <amodra@bigpond.net.au>
2596
2597 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
2598
2599 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
2600
2601 * cofflink.c (mark_relocs): Don't mark relocations in excluded
2602 sections.
2603
2604 2002-10-07 Alan Modra <amodra@bigpond.net.au>
2605
2606 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
2607 code.
2608
2609 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
2610
2611 2002-10-06 Alan Modra <amodra@bigpond.net.au>
2612
2613 * opncls.c: Formatting.
2614 (_bfd_new_bfd): Use a smaller section hash table.
2615
2616 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
2617
2618 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
2619 of the other two relocations packed with a REL32 to NONE.
2620
2621 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
2622
2623 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
2624 (sh_elf_link_hash_newfunc): Initialize it.
2625 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
2626 to got.refcount for symbols that are forced local or when
2627 we have direct got refs.
2628 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
2629 to correctly adjust got.refcount and plt.refcount.
2630 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
2631 (sh_elf_check_relocs): Increment gotplt_refcount.
2632
2633 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2634
2635 * elf32-i386.c (elf_i386_relocate_section): Fix
2636 movl foo@indntpoff, %eax IE->LE transition.
2637
2638 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2639
2640 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
2641 sequence and its transitions.
2642
2643 2002-10-01 Jakub Jelinek <jakub@redhat.com>
2644
2645 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
2646 to st_value + addend in non-code sections.
2647 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
2648 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
2649
2650 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
2651 Ken Raeburn <raeburn@cygnus.com>
2652 Aldy Hernandez <aldyh@redhat.com>
2653 Eric Christopher <echristo@redhat.com>
2654 Richard Sandiford <rsandifo@redhat.com>
2655
2656 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
2657 (bfd_mach_mips5500): New.
2658 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
2659 (arch_info_struct): Add corresponding entries here.
2660 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
2661 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
2662 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
2663 bfd_mach_mips5400 and bfd_mach_mips5500.
2664 (_bfd_mips_elf_mach_extends_p): New function.
2665 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
2666 the EF_MIPS_MACH flags.
2667 * bfd-in2.h: Regenerate.
2668
2669 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
2670
2671 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
2672 .got sections.
2673
2674 2002-09-28 Alan Modra <amodra@bigpond.net.au>
2675
2676 * elf.c (map_sections_to_segments): Correct test for start of
2677 writable section in the same page as end of read-only section.
2678
2679 2002-09-27 Matt Thomas <matt@3am-software.com>
2680
2681 * elf32-vax.c (elf_vax_check_relocs): Remove unused
2682 local_got_refcounts usage. Remove allocation of got slot.
2683 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
2684 Remove de-allocation of got slot.
2685 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
2686 traversal for elf_vax_instantiate_got_entries. Allow empty .got
2687 sections to be GC'ed.
2688 (elf_vax_instantiate_got_entries): New function.
2689 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
2690 tests that are now handled by elf_vax_instantiate_got_entries.
2691 Assert GOT entry falls within .got section size. Remove redundant
2692 comparisions. Fix comments.
2693
2694 2002-09-27 Jakub Jelinek <jakub@redhat.com>
2695
2696 * reloc.c: Add x86-64 TLS relocs.
2697 * bfd-in2.h, libbfd.h: Rebuilt.
2698 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
2699 relocs. Add TLS relocs.
2700 (x86_64_reloc_map): Add TLS relocs.
2701 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
2702 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
2703 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
2704 (elf64_x86_64_hash_entry): Define.
2705 (struct elf64_x86_64_obj_tdata): New.
2706 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
2707 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
2708 (link_hash_newfunc): Initialize tls_type.
2709 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
2710 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
2711 (elf64_x86_64_mkobject): New.
2712 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
2713 (elf64_x86_64_tls_transition): New.
2714 (elf64_x86_64_check_relocs): Add r_type variable and use it.
2715 Handle TLS relocs.
2716 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
2717 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
2718 (elf64_x86_64_size_dynamic_sections): Likewise.
2719 (dtpoff_base, tpoff): New.
2720 (elf64_x86_64_relocate_section): Handle TLS relocs.
2721 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
2722 entries.
2723 (bfd_elf64_mkobject): Define.
2724
2725 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
2726 DF_STATIC_TLS if shared.
2727
2728 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2729
2730 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
2731 empty relocation sections.
2732
2733 2002-09-26 Alan Modra <amodra@bigpond.net.au>
2734
2735 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
2736 (ppc64_elf_build_stubs): Build them here instead.
2737
2738 2002-09-24 Jakub Jelinek <jakub@redhat.com>
2739
2740 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
2741 addend into r_addend, not *r_offset.
2742 (elf32_sparc_finish_dynamic_symbol): Likewise.
2743 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
2744 R_SPARC_RELATIVE's r_offset.
2745
2746 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
2747
2748 * dwarf2.c (decode_line_info): Update to correctly decode
2749 the (non-standard DWARF2) out-of-order address sequences
2750 generated by the Intel C++ 6.0 compiler for ia64-Linux.
2751
2752 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
2753
2754 * config.bfd: For DJGPP targets, match with any cpu and any machine.
2755
2756 2002-09-23 Alan Modra <amodra@bigpond.net.au>
2757
2758 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
2759 for discarded FDEs. Remove redundant assignment.
2760 * elflink.h (elf_bfd_discard_info): Save edited relocs.
2761
2762 2002-09-22 H.J. Lu <hjl@gnu.org>
2763
2764 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
2765 the relocation count between different .reloc sections.
2766
2767 2002-09-21 Alan Modra <amodra@bigpond.net.au>
2768
2769 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
2770 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
2771 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
2772 R_PPC_EMB_RELSDA.
2773
2774 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
2775 unsigned. Move "symcount" assignment out of loop.
2776 * Makefile.am: Run "make dep-am".
2777 * Makefile.in: Regenerate.
2778 * configure: Regenerate.
2779 * po/SRC-POTFILES.in: Regnerate.
2780
2781 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2782
2783 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
2784 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
2785 (e.g. IRIX64).
2786
2787 2002-09-19 Jakub Jelinek <jakub@redhat.com>
2788
2789 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
2790 even if generating R_PPC_RELATIVE reloc.
2791 (ppc_elf_relocate_section): Make sure relocation is performed
2792 if skip == -2. Clear memory at r_offset when creating dynamic
2793 relocation.
2794
2795 2002-09-19 Jakub Jelinek <jakub@redhat.com>
2796
2797 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
2798 BFD_RELOC_386_TLS_GOTIE): Add.
2799 * bfd-in2.h, libbfd.h: Rebuilt.
2800 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
2801 and R_386_TLS_GOTIE.
2802 (elf_i386_reloc_type_lookup): Handle it.
2803 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
2804 char instead of enum, change GOT_* into defines.
2805 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
2806 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2807 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
2808 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
2809 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
2810 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2811 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2812 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2813 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
2814 tls_type is GOT_TLS_IE_BOTH.
2815 (elf_i386_size_dynamic_sections): Likewise.
2816 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
2817 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
2818 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
2819 all 4 GOT_TLS_* TLS types.
2820
2821 2002-09-19 Nick Clifton <nickc@redhat.com>
2822
2823 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
2824 follow indirect links.
2825
2826 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
2827
2828 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
2829 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
2830 on 64 bit machines.
2831 (ecoff_swap_sym_in) <iss>: Likewise.
2832 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
2833 ECOFF information: 'ioptMax' refers to the actual *size*
2834 of the optimization symtab, not the number of entries.
2835
2836 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
2837
2838 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
2839 ELF_LINK_HASH_NEEDS_PLT logic.
2840
2841 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
2842
2843 * elfcode.h (elf_slurp_reloc_table_from_section): Check
2844 correct relocation count.
2845
2846 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
2847
2848 * bfd-in.h (bfd_get_dynamic_symcount): Define.
2849 * bfd.c (struct _bfd): Add dynsymcount.
2850 * bfd-in2.h: Regenerated.
2851 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
2852 abfd->dynsymcount.
2853 * elfcode.h (elf_slurp_reloc_table_from_section): Check
2854 for overflow.
2855
2856 2002-09-17 Stan Cox <scox@redhat.com>
2857
2858 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
2859 (mips_elf64_final_gp): Don't make up gp value.
2860 * elfn32-mips.c (mips_elf_final_gp): Likewise.
2861 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
2862 .MIPS.options/.options section.
2863
2864 2002-09-17 David O'Brien <obrien@FreeBSD.org>
2865
2866 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
2867 It is benign for FreeBSD < 4.1. Minor reformatting.
2868 * elf64-alpha-fbsd.c: Likewise.
2869
2870 2002-09-17 Jakub Jelinek <jakub@redhat.com>
2871
2872 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
2873 addend.
2874
2875 2002-09-17 Alan Modra <amodra@bigpond.net.au>
2876
2877 * elf64-alpha.c (alpha_elf_size_info): Make static.
2878
2879 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
2880
2881 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
2882 * cpu-tic4x.c: Ditto.
2883
2884 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2885
2886 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
2887 duplicate define.
2888
2889 2002-09-16 Bruno Haible <bruno@clisp.org>
2890
2891 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
2892 by a target variant implementation.
2893 * elf64-alpha.c: Likewise.
2894 * elf32-i386-fbsd.c: New file.
2895 * elf64-alpha-fbsd.c: New file.
2896 * targets.c: Support bfd_elf32_i386_freebsd_vec and
2897 bfd_elf64_alpha_freebsd_vec.
2898 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
2899 bfd_elf64_alpha_freebsd_vec.
2900 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
2901 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
2902 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
2903 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
2904 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
2905 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
2906 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
2907
2908 2002-09-12 Jakub Jelinek <jakub@redhat.com>
2909
2910 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
2911 NULL.
2912 (elf_i386_relocate_section): Return false after printing error about
2913 unresolvable relocation.
2914
2915 2002-09-12 Nick Clifton <nickc@redhat.com>
2916
2917 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
2918 R_ARM_THM_PC11.
2919
2920 2002-09-11 Jeffrey Law <law@redhat.com>
2921
2922 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
2923
2924 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
2925
2926 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
2927 line_ptr before deciding we've found a symbol.
2928
2929 2002-09-11 Nick Clifton <nickc@redhat.com>
2930
2931 * po/da.po: New Danish translation file.
2932 * configure.in (LINGUAS): Add 'da'.
2933 * configure: Regenerate.
2934
2935 2002-09-10 Michael Snyder <msnyder@redhat.com>
2936
2937 * irix-core.c (do_sections, do_sections64): New functions.
2938 (irix_core_core_file_p): Call new functions do_sections,
2939 do_sections64, depending on corefile (32-bit or 64-bit).
2940
2941 2002-09-09 Richard Henderson <rth@redhat.com>
2942
2943 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
2944 and PCREL21F like PCREL21B.
2945
2946 2002-09-04 Kevin Buettner <kevinb@redhat.com>
2947
2948 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
2949 vector.
2950
2951 2002-09-02 Nick Clifton <nickc@redhat.com>
2952
2953 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
2954 names instead of cryptically overloaded bfd_reloc error
2955 codes.
2956 (v850_elf_relocate_section): Likewise.
2957 (v850_elf_relax_section): Replace caching of external symbols
2958 with caching of internal symbols obtained from calling
2959 bfd_elf_get_elf_syms().
2960 Fixup problems with freeing cached allocated memory blocks.
2961
2962 2002-09-02 Alan Modra <amodra@bigpond.net.au>
2963
2964 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
2965 (bfd_pj_arch): Use bfd_default_scan.
2966 * cpu-v850.c (scan): Remove.
2967 (N): Use bfd_default_scan.
2968 * cpu-z8k.c (scan_mach): Remove.
2969 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
2970 first. Use bfd_default_scan.
2971
2972 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
2973 bfd_mach constants.
2974 (ecoff_get_magic): Likewise.
2975 * elf32-v850.c (v850_elf_object_p): Likewise.
2976 (v850_elf_final_write_processing): Likewise.
2977 * mipsbsd.c (MY(set_arch_mach)): Likewise.
2978 (MY(write_object_contents)): Likewise.
2979 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
2980 * coffcode.h (coff_write_object_contents): Likewise.
2981 (coff_set_arch_mach_hook): Add comment describing machine == 0.
2982 Remove unnecessary "machine" assignments.
2983 (coff_write_relocs): Test for the absolute section sym by testing
2984 section and flags.
2985
2986 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
2987 and bfd_mach_i386_i386_intel_syntax.
2988 * pdp11.c (NAME(aout,machine_type)): Likewise.
2989
2990 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
2991
2992 * bfd-in.h (align_power): Cast constants to bfd_vma type.
2993 * bfd-in2.h (align_power): Likewise.
2994
2995 2002-08-30 Alan Modra <amodra@bigpond.net.au>
2996
2997 * Makefile.am: Run "make dep-am".
2998 * Makefile.in: Regenerate.
2999
3000 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
3001 * cpu-powerpc.c (powerpc_compatible): Likewise.
3002 * cpu-rs6000.c (rs6000_compatible): Likewise.
3003
3004 2002-08-28 Catherine Moore <clm@redhat.com>
3005
3006 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
3007 (v850-elf-reloc): Don't resolve pc relative relocs.
3008 (v850_elf_ignore_reloc): New routine.
3009 (v850_elf_final_link_relocate): Handle new relocs.
3010 (v850_elf_relax_delete_bytes ): New routine.
3011 (v850_elf_relax_section): New routine.
3012 (bfd_elf32_bfd_relax_section): Define.
3013 (HOWTO): New entries for new relocs.
3014 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
3015 (BFD_RELOC_V850_LONGJUMP): New reloc.
3016 (BFD_RELOC_V850_ALIGN): New reloc.
3017 * archures.c: Remove redundant v850ea architecture.
3018 * cpu-v850.c: Remove redundant v850ea support.
3019 * libbfd.h: Regenerate.
3020 * bfd-in2.h: Regenerated.
3021
3022 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
3023
3024 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
3025 * configure.in: Add tic4x_coff vector files.
3026 * configure: Regenerate.
3027 * Makefile.am: Add tic4x target.
3028 * Makefile.in: Regenerate.
3029
3030 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
3031
3032 * archures.c: Add the BFD arch type tic4x.
3033 * bfd-in.h: Add BFD_IN_MEMORY flag.
3034 * coff-tic4x.c: New file.
3035 * coffswap.h (coff_swap_sym_out): Add preadjuster.
3036 * cpu-tic4x.c: New file.
3037 * targets.c: Added tic4x- in list of xvecs.
3038 * ticoff.h: New file.
3039 * bfd-in2.h: Regenerate.
3040
3041 2002-08-27 Adam Nemet <anemet@lnxw.com>
3042
3043 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
3044 bit of DT_INIT and DT_FINI for Thumb functions.
3045
3046 2002-08-26 Alan Modra <amodra@bigpond.net.au>
3047
3048 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
3049
3050 2002-08-26 Alan Modra <amodra@bigpond.net.au>
3051
3052 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
3053
3054 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3055
3056 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
3057 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
3058 Likewise.
3059 (struct elf_sh_pcrel_relocs_copied): Removed.
3060 (struct elf_sh_dyn_relocs): New.
3061 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
3062 field with dyn_relocs.
3063 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
3064 sections and sym_sec.
3065 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
3066 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
3067 (sh_elf_create_dynamic_sections): Use create_got_section instead
3068 of _bfd_elf_create_got_section.
3069 (sh_elf_check_relocs): Likewise.
3070 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
3071 sections.
3072 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
3073 sh_elf_relocate_section, sh_elf_check_relocs,
3074 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
3075 Likewise.
3076 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
3077 dynamic relocations and avoiding the copy relocation when we
3078 didn't find any dynamic relocations in the section which has
3079 contents or is read-only.
3080 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3081 (sh_elf_size_dynamic_sections): Don't reset the size of
3082 .rela.got section even if dynamic_sections_created flag is off.
3083 Don't use sh_elf_discard_copies. Scan all input bfd and use
3084 allocate_dynrelocs. Call readonly_dynrelocs to determine
3085 whether we need DT_TEXTREL.
3086 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
3087 whether the symbol was never referred to.
3088 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
3089 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
3090 (sh_elf_check_relocs): Call create_got_section if the short-cut
3091 to .got is null. Increment reference counters only instead of
3092 allocating space on dynamic sections here. Don't conditionalize
3093 uninitialized got.offset value when marking the symbol as a
3094 global offset table entry. Keep relocations for symbols satisfied
3095 by a dynamic library to avoid copy relocations for the symbol.
3096 Set dynobj field of an elf hash table if needed.
3097 (sh_elf_finish_dynamic_sections): Handle null section pointer
3098 correctly.
3099 (elf_backend_copy_indirect_symbol): Defined.
3100 (elf_backend_can_refcount): Defined.
3101
3102 2002-08-23 Nick Clifton <nickc@redhat.com>
3103
3104 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
3105 previous change. Add comment explaining why.
3106
3107 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3108
3109 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
3110 contents of .got.plt[2] to tr0, not address of .got.plt.
3111 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
3112 patching absolute plt entry. For shmedia plt entry, set bottom bit
3113 of branch to plt0 as this is a branch to an shmedia instruction.
3114 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
3115 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
3116 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
3117 branch to plt0.
3118 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
3119 patching absolute plt entry. For shmedia plt entry, branch to
3120 plt0 is now ptrel, so use relative offset. Set bottom bit of
3121 branch target as it is a branch to an shmedia instruction.
3122
3123 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
3124 Richard Shann <richard.shann@superh.com>
3125
3126 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
3127 value if .init is an SHmedia function. Similarly for DT_FINI.
3128 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
3129
3130 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
3131
3132 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
3133 dynamic section.
3134 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
3135
3136 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3137
3138 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
3139 byte read when reading the return address register column.
3140
3141 2002-08-22 Nick Clifton <nickc@redhat.com>
3142
3143 * config.bfd: Add powepc64-*-*bsd* target.
3144
3145 2002-08-22 Graeme Peterson <gp@qnx.com>
3146
3147 * Makefile.am: Add entries for elf32-shqnx.c
3148 * Makefile.in: Regenerate.
3149 * config.bfd: Add support sh-*-nto* target.
3150 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
3151 * configure: Regenerate.
3152 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
3153 * elf32-sh.c: Do not include elf32-target.h if
3154 ELF32_SH_C_INCLUDED is defined.
3155 * elf32-shqnx.c: New file: Support for QNX.
3156 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
3157
3158 2002-08-22 Nick Clifton <nickc@redhat.com>
3159
3160 * po/tr.po: Updated Turkish translation.
3161
3162 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
3163 symbols are not read.
3164
3165 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3166
3167 * elf32-m68hc11.c: Formatting fixes.
3168 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3169 * elf32-m68hc12.c: Formatting fixes.
3170 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
3171
3172 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3173
3174 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
3175 SEC_DATA.
3176 (pmac_xcoff_vec): Likewise.
3177 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3178 (aix5coff64_vec): Likewise.
3179
3180 2002-08-22 Alan Modra <amodra@bigpond.net.au>
3181
3182 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
3183 param to elf_backend_copy_indirect_symbol.
3184 (_bfd_elf_link_hash_copy_indirect): Likewise.
3185 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
3186 calls to copy_indirect_symbol.
3187 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
3188 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
3189 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3190 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3191 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
3192 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
3193 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
3194 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3195 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
3196 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
3197 test refcounts for "used" values.
3198
3199 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
3200
3201 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
3202 argument declaration.
3203
3204 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
3205
3206 * archures.c (bfd_mach_ppc_e500): Added.
3207 * bfd-in2.h: Rebuilt.
3208 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
3209
3210 2002-08-19 Alan Modra <amodra@bigpond.net.au>
3211
3212 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
3213
3214 2002-08-17 Andrew Cagney <ac131313@redhat.com>
3215
3216 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
3217 `bfd_byte'.
3218
3219 2002-08-17 Stan Cox <scox@redhat.com>
3220
3221 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
3222 IRIX 6 segment layout for NEWABI.
3223
3224 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
3225
3226 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
3227 symbols when looking for section referred to by a relocation.
3228 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
3229
3230 2002-08-15 Alan Modra <amodra@bigpond.net.au>
3231
3232 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
3233
3234 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
3235
3236 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
3237 missing check for whether the symbol is referenced by DSO before
3238 unexporting it as an unneeded dynamic symbol.
3239
3240 2002-08-14 H.J. Lu <hjl@gnu.org>
3241
3242 * libbfd.h: Regenerate.
3243
3244 2002-08-14 H.J. Lu <hjl@gnu.org>
3245
3246 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
3247
3248 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
3249
3250 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
3251 instructions.
3252 (m68hc11_direct_relax): New to define table of relaxable instructions.
3253 (find_relaxable_insn): New, find a relaxable insn.
3254 (compare_reloc): New to compare two relocs.
3255 (m68hc11_elf_relax_section): New, relax text sections.
3256 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
3257 (elf32_m68hc11_check_relocs): New function for GC support.
3258 (elf32_m68hc11_relocate_section): New function for GC support.
3259 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
3260 (elf_backend_check_relocs): Likewise.
3261 (elf_backend_relocate_section): Likewise.
3262
3263 2002-08-13 H.J. Lu <hjl@gnu.org>
3264
3265 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
3266 definitions in shared objects when checking symbol with
3267 undefined version.
3268
3269 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3270
3271 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
3272 (elf32_m68hc11_gc_sweep_hook): Likewise.
3273 (elf_backend_gc_mark_hook): Define for GC section support.
3274 (elf_backend_gc_sweep_hook): Likewise.
3275 (elf_backend_can_gc_sections): Likewise.
3276
3277 * elf32-m68hc12.c: Likewise.
3278
3279 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3280
3281 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
3282 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
3283 (_bfd_m68hc11_elf_set_private_flags): New function.
3284 Use them to set/check/print ELF flags specific to 68HC11.
3285
3286 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
3287 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
3288 (_bfd_m68hc12_elf_set_private_flags): New function.
3289 Use them to set/check/print ELF flags specific to 68HC12.
3290
3291 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3292
3293 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
3294 fix masks for PC-rel relocs.
3295 (m68hc11_elf_ignore_reloc): New function.
3296
3297 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
3298 68HC12 banked addressing relocs.
3299 (m68hc12_phys_addr): New to compute physical address of banked memory.
3300 (m68hc12_phys_page): Likewise for page.
3301 (m68hc12_addr_is_banked): New to see if address is in banked area.
3302 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
3303
3304 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
3305
3306 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
3307 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
3308 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
3309 * bfd-in2.h: Regenerate.
3310
3311 2002-08-12 H.J. Lu <hjl@gnu.org>
3312
3313 * elflink.h (elf_add_default_symbol): Preserve section across
3314 elf_merge_symbol.
3315
3316 2002-08-09 Graeme Peterson <gp@qnx.com>
3317
3318 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
3319 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
3320 * Makefile.in: Regenerate.
3321 * config.bfd: Add support for powerpc{le}-*-nto targets.
3322 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
3323 * configure: Regenerate.
3324 * elf32-i386qnx.c: Moved backend functions into a QNX specific
3325 common file "elf32-qnx.h", and now include that file.
3326 * elf32-qnx.h: New file: QNX specific common elf backend.
3327 * elf32-ppc.c: Do not include elf32-target.h if
3328 ELF32_PPC_C_INCLUDED is defined.
3329 * elf32-ppcqnx.c: New file: Support for QNX.
3330 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
3331 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
3332
3333 2002-08-09 Nick Clifton <nickc@redhat.com>
3334
3335 * po/sv.po: Updated Swedish translation.
3336
3337 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3338
3339 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
3340 g->global_gotsym is NULL.
3341
3342 2002-08-08 H.J. Lu <hjl@gnu.org>
3343
3344 * elflink.h (elf_add_default_symbol): Don't warn if a definition
3345 overrides an indirect versioned symbol.
3346
3347 2002-08-08 Jakub Jelinek <jakub@redhat.com>
3348
3349 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
3350 for R_386_TLS_TPOFF32 relocs against symndx 0.
3351
3352 2002-08-07 H.J. Lu <hjl@gnu.org>
3353
3354 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
3355 with undefined version if needed.
3356 (elf_link_assign_sym_version): Match a default symbol with a
3357 version without definition. No need to hide the default
3358 definition separately.
3359
3360 2002-08-08 Alan Modra <amodra@bigpond.net.au>
3361
3362 * elflink.h (elf_link_output_extsym): Don't output symbols from
3363 SEC_EXCLUDE sections.
3364
3365 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
3366
3367 2002-08-07 Alan Modra <amodra@bigpond.net.au>
3368
3369 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
3370 entries.
3371
3372 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3373
3374 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
3375 mismatch.
3376
3377 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3378
3379 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
3380
3381 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3382
3383 * elf32-mips.c (mips_reloc_map): Fix typo.
3384
3385 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3386
3387 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
3388
3389 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3390
3391 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
3392
3393 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3394
3395 * libxcoff.h: Use PARAMS on function declarations.
3396 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
3397 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
3398
3399 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
3400 addend.
3401 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
3402
3403 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3404
3405 * coff-rs6000.c: Formatting fixes.
3406 (xcoff_calculate_relocation): Use PARAMS in declaration.
3407 (xcoff_complain_overflow): Likewise.
3408 (xcoff_ppc_relocate_section): Use old-style function pointer call.
3409 (bfd_xcoff_backend_data): Remove useless comments.
3410 (rs6000coff_vec): Likewise.
3411 (bfd_pmac_xcoff_backend_data): Likewise.
3412 (pmac_xcoff_vec): Likewise.
3413
3414 * coff64-rs6000.c: Formatting fixes.
3415 (xcoff64_calculate_relocation): Use PARAMS in declaration.
3416 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
3417 (bfd_xcoff_backend_data): Remove useless comments.
3418 (rs6000coff64_vec): Likewise.
3419 (bfd_xcoff_aix5_backend_data): Likewise.
3420 (aix5coff64_vec): Likewise.
3421
3422 2002-08-06 Alan Modra <amodra@bigpond.net.au>
3423
3424 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
3425 mask entries. Use complain_overflow_dont for R_REF.
3426 (xcoff_reloc_type_ba): Revert last change.
3427 (xcoff_reloc_type_br): Likewise.
3428 (xcoff_reloc_type_crel): Likewise.
3429 (xcoff_ppc_relocate_section): Likewise.
3430 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
3431 (xcoff64_ppc_relocate_section): Likewise.
3432 (xcoff64_howto_table): Revert some of last change to mask entries.
3433 Use complain_overflow_dont for R_REF.
3434
3435 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
3436 relocs with bitsize == 16 have size = 1.
3437 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
3438 (xcoff_reloc_type_br): Likewise.
3439 (xcoff_reloc_type_crel): Likewise.
3440 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3441 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
3442 dst_mask adjustment.
3443 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
3444 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
3445 bitsize == 16 have size = 1.
3446
3447 2002-08-01 Denis Chertykov <denisc@overta.ru>
3448
3449 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
3450 (struct misc): New field isymbuf. All free_* fields removed.
3451 (symbol_value): Pass in internal syms. No need to swap syms in.
3452 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
3453 possibly cached info.
3454 (tidyup_after_error): Removed.
3455 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
3456 misc. Use new field.
3457 (adjust_all_relocations): Use internal syms. No need to swap syms
3458 in and out.
3459 (add_page_insn): Don't use removed fields of struct misc.
3460
3461 2002-08-01 Nick Clifton <nickc@redhat.com>
3462
3463 * elf32-arm.h: Revert previous delta.
3464
3465 2002-08-01 Nick Clifton <nickc@redhat.com>
3466
3467 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
3468 * configure: Regenerate.
3469
3470 2002-07-31 H.J. Lu <hjl@gnu.org>
3471
3472 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
3473 selected.
3474
3475 2002-07-31 H.J. Lu <hjl@gnu.org>
3476
3477 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
3478 is selected.
3479
3480 2002-07-31 Jakub Jelinek <jakub@redhat.com>
3481
3482 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
3483 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
3484
3485 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3486
3487 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
3488 There is no 8 byte relocation type for this architecture.
3489 (do_ns32k_reloc): Use bfd_vma instead of native types.
3490 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
3491 returns void.
3492 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
3493 rely on generic code to do that.
3494 * aout-ns32k.c (howto_table): Add appropriate overflow detection
3495 to all table entries.
3496 (_bfd_ns32k_relocate_contents): put_data returns void.
3497 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
3498 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
3499 return void.
3500
3501 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
3502
3503 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
3504 archive object is target dependant.
3505
3506 2002-07-31 Adam Nemet <anemet@lnxw.com>
3507
3508 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
3509 (THUMB_PLT_ENTRY_SIZE): New macro.
3510 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
3511 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
3512 ARM_PLT_ENTRY_SIZE.
3513 (elf32_arm_plt_entry): Likewise.
3514 (elf_backend_plt_header_size): Likewise.
3515 (elf32_thumb_plt0_entry): New global.
3516 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
3517 into .plt.thumb.
3518 (elf32_thumb_plt_entry): New global.
3519 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
3520 Thumb entries. Set the bottom bit of the corresponding GOT entry
3521 for a Thumb PLT entry.
3522 (struct elf32_arm_plt_entry_info): New structure.
3523 (struct elf32_arm_link_hash_entry, plt_info): New member of this
3524 type.
3525 (elf32_arm_link_hash_newfunc): Initialize new member.
3526 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
3527 relocations against the PLT.
3528 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
3529 first_rel_type if this is the first time we encounter the symbol.
3530 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
3531 Determine if relocation needs a PLT entry. Set first_rel_type if
3532 this is the first time we encounter the symbol
3533 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
3534 functions as well.
3535 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
3536 (elf32_arm_create_dynamic_sections): New function. Create the
3537 .plt.thumb section.
3538 (elf_backend_create_dynamic_sections): Call it.
3539
3540 2002-07-31 Nick Clifton <nickc@redhat.com>
3541
3542 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
3543 'alternative' in order to avoid shadowing global symbol of the
3544 same name.
3545 * bfd-in2.h: Regenerate.
3546 * libbfd.h: Regenerate.
3547 * libcoff.h: Regenerate.
3548
3549 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3550
3551 * Makefile.am: Add n32 ABI support.
3552 * Makefile.in: Regenerate.
3553 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
3554 bit vectors for mips*-*-linux targets as optional.
3555 * configure.in: Add n32 ABI vectors.
3556 * configure: Regenerate.
3557 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
3558 * elfn32-mips.c: New file, n32 ABI support.
3559 * targets.c: Add n32 ABI vectors.
3560
3561 2002-07-30 Graeme Peterson <gp@qnx.com>
3562
3563 * elfarmqnx-nabi.c: New file: Support for QNX.
3564 * config.bfd: Add support for arm-*-nto target.
3565 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
3566 * configure: Regenerate.
3567 * Makefile.am: Add entries for elfarmqnx-nabi.c.
3568 * Makefile.in: Regenerate.
3569 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
3570 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
3571 * elfarm-nabi.c: Do not include elf32-arm.h if
3572 ELFARM_NABI_C_INCLUDED is defined.
3573 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
3574
3575 2002-07-30 Nick Clifton <nickc@redhat.com>
3576
3577 * po/sv.po: Updated Swedish translation.
3578
3579 2002-07-30 Jakub Jelinek <jakub@redhat.com>
3580
3581 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
3582
3583 2002-07-30 Alan Modra <amodra@bigpond.net.au>
3584
3585 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
3586 * archive.c (bfd_generic_archive_p): Likewise.
3587 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
3588 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
3589 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
3590 (xcoff64_archive_p): Likewise.
3591 (xcoff64_openr_next_archived_file): Likewise.
3592 (xcoff64_archive_p): Clean up tdata properly on error.
3593 * coffgen.c (coff_real_object_p): Likewise.
3594 (coff_object_p): Release filehdr and opthdr.
3595 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
3596 * ieee.c (ieee_archive_p): Likewise.
3597 * ihex.c (ihex_object_p): Likewise.
3598 (ihex_mkobject): Always allocate tdata.
3599 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
3600 * srec.c (srec_mkobject): Always allocate tdata.
3601 (srec_object_p): Clean up tdata properly on error.
3602 (symbolsrec_object_p): Likewise.
3603 * versados.c (versados_object_p): Likewise.
3604 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
3605 and bfd_realloc instead of realloc.
3606 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
3607 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
3608 place of bfd_malloc, simplifying error freeing. Free hash table too.
3609 (vms_object_p): Clean up tdata on error.
3610 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
3611 (vms_close_and_cleanup): Adjust for bfd_alloc use.
3612
3613 2002-07-30 Alan Modra <amodra@bigpond.net.au>
3614
3615 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
3616
3617 2002-07-26 Chris Demetriou <cgd@broadcom.com>
3618
3619 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
3620 flags into resulting BFD.
3621
3622 2002-07-26 Alan Modra <amodra@bigpond.net.au>
3623
3624 From John Reiser <jreiser@BitWagon.com>
3625 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
3626 tls_ldm_got.refcount.
3627
3628 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3629
3630 * elf64-mips.c: Update TODO comment.
3631 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
3632 mips_elf64_gprel16_reloca): Remove prototypes.
3633 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
3634 (UNUSED_RELOC): Replace by EMPTY_RELOC.
3635 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
3636 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
3637 R_MIPS_HIGHEST.
3638 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
3639 R_MIPS_GOT16. Remove wrong comments.
3640 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
3641 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
3642 from elf32-mips.c.
3643 (mips_elf64_hi16_reloc): Fix formatting.
3644 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
3645 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
3646 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
3647 (mips_elf64_gprel16_reloc): Make static. Add check for
3648 partial_inplace.
3649 (mips_elf64_gprel16_reloca): Remove.
3650 (mips_elf64_literal_reloc): New function.
3651 (mips_elf64_gprel32_reloc): Fix formatting.
3652 (mips_elf64_shift6_reloc): Fix comment. Make static.
3653 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
3654 elf32-mips.c.
3655 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
3656 elf32-mips.c
3657 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
3658 specific relocations.
3659 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
3660 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
3661 (ELF_MAXPAGESIZE): Add comment.
3662
3663 2002-07-25 Nick Clifton <nickc@redhat.com>
3664
3665 * po/sv.po: Updated Swedish translation.
3666 * po/es.po: Updated Spanish translation.
3667 * po/fr.po: Updated French translation.
3668
3669 2002-07-25 Alan Modra <amodra@bigpond.net.au>
3670
3671 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
3672 as elf_link_record_local_dynamic_symbol.
3673 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
3674 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
3675 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
3676 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
3677 attempt is made to record a symbol in a discarded section, and
3678 return `2' in that case.
3679
3680 2002-07-24 Nick Clifton <nickc@redhat.com>
3681
3682 * po/sv.po: Updated Swedish translation.
3683 * po/es.po: Updated Spanish translation.
3684
3685 2002-07-23 Alan Modra <amodra@bigpond.net.au>
3686
3687 * po/SRC-POTFILES.in: Regenerate.
3688
3689 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
3690 immediately. Remove code handling relocatable linking.
3691 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3692 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3693 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
3694 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3695 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3696 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3697 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3698 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3699 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3700 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3701 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3702 * elf32-avr.c (elf_backend_rela_normal): Define.
3703 * elf32-cris.c: Likewise.
3704 * elf32-fr30.c: Likewise.
3705 * elf32-frv.c: Likewise.
3706 * elf32-h8300.c: Likewise.
3707 * elf32-hppa.c: Likewise.
3708 * elf32-ip2k.c: Likewise.
3709 * elf32-sparc.c: Likewise.
3710 * elf32-v850.c: Likewise.
3711 * elf32-vax.c: Likewise.
3712 * elf64-hppa.c: Likewise.
3713 * elf64-sparc.c: Likewise.
3714 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
3715 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3716 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3717 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3718 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3719 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3720 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3721 * elf-m10200.c (USE_RELA): Don't define.
3722 * elf-m10300.c: Likewise.
3723 * elfarm-oabi.c: Likewise.
3724 * elf32-i370.c: Likewise.
3725 * elf32-ip2k.c: Likewise.
3726 * elf32-m68k.c: Likewise.
3727 * elf32-mcore.c: Likewise.
3728 * elf32-ppc.c: Likewise.
3729 * elf32-s390.c: Likewise.
3730 * elf32-vax.c: Likewise.
3731 * elf64-ppc.c: Likewise.
3732 * elf64-s390.c: Likewise.
3733 * elf64-x86-64.c: Likewise.
3734 * elfxx-ia64.c: Likewise.
3735 * elf32-avr.c (USE_REL): Don't undef.
3736 * elf32-ip2k.c: Likewise.
3737
3738 2002-07-23 Nick Clifton <nickc@redhat.com>
3739
3740 * elf-bfd.h (struct elf_backend_data): Add new bitfield
3741 'want_p_paddr_set_to_zero'.
3742 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
3743 to false;
3744 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
3745 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
3746
3747 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
3748
3749 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
3750 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
3751 show the Copyright string.
3752 Minor formatting tidy ups.
3753
3754 2002-07-23 Nick Clifton <nickc@redhat.com>
3755
3756 * po/fr.po: Updated French translation.
3757 * po/sv.po: Updated Swedish translation.
3758
3759 2002-07-23 Alan Modra <amodra@bigpond.net.au>
3760
3761 * elflink.h (elf_link_input_bfd): Don't change internal symbols
3762 when outputting relocs.
3763
3764 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
3765
3766 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
3767 DT_PLTGOT into the dynamic section if there is a PLT.
3768
3769 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3770
3771 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
3772 elf32-mips.c.
3773 (_bfd_mips_elf_write_section): Likewise.
3774 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
3775 (_bfd_mips_elf_write_section): Likewise.
3776 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
3777 (elf32_mips_write_section): Likewise.
3778 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
3779 (_bfd_mips_elf_write_section): Likewise.
3780
3781 2002-07-19 Alan Modra <amodra@bigpond.net.au>
3782
3783 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
3784 PT_IA_64_UNWIND segments for a given section.
3785
3786 2002-07-17 H.J. Lu <hjl@gnu.org>
3787
3788 * Makefile.am: Fix a typo.
3789 * Makefile.in: Regenerate.
3790
3791 2002-07-15 Denis Chertykov <denisc@overta.ru>
3792 Frank Ch. Eigler <fche@redhat.com>
3793 Ben Elliston <bje@redhat.com>
3794 Alan Lehotsky <alehotsky@cygnus.com>
3795 John Healy <jhealy@redhat.com>
3796 Graham Stott <grahams@redhat.com>
3797 Jeff Johnston <jjohnstn@redhat.com>
3798
3799 * Makefile.am: Add support for ip2k.
3800 * Makefile.in: Regenerate.
3801 * doc/Makefile.in: Regenerate.
3802 * archures.c: Add support for ip2k.
3803 * config.bfd: Add support for ip2k.
3804 * configure.in: Add support for ip2k.
3805 * configure: Regenerate.
3806 * reloc.c: Add support for ip2k.
3807 * targets.c: Add support for ip2k.
3808 * bfd-in2.h: Regenerate.
3809 * libbfd.h: Regenerate.
3810 * cpu-ip2k.c: New file.
3811 * elf32-ip2k.c: New file.
3812
3813 2002-07-17 Ian Rickards <irickard@arm.com>
3814
3815 * dwarf2.c (concat_filename): If we can't establish the directory
3816 just return the filename.
3817
3818 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
3819
3820 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
3821
3822 2002-07-16 Alan Modra <amodra@bigpond.net.au>
3823
3824 * elflink.h: Formatting fixes, tidy prototypes.
3825 (elf_link_assign_sym_version): Move common code out of loop.
3826
3827 2002-07-16 Alan Modra <amodra@bigpond.net.au>
3828
3829 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
3830 reloc section size is zero. Correct reloc output location.
3831
3832 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
3833
3834 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
3835 the final type for the e_fsel selector when generating PA2.0W code.
3836 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
3837 relocations.
3838
3839 2002-07-14 H.J. Lu <hjl@gnu.org>
3840
3841 * elflink.h (elf_link_assign_sym_version): Hide the default
3842 definition if there is a hidden versioned definition.
3843
3844 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
3845
3846 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
3847 dynamic reference test in assertion when initializing GOT with
3848 static contents. Just assert that there are either no dynamic
3849 sections, the symbol is defined in the regular objects or that the
3850 symbol is undef weak. Tweak comment.
3851 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
3852 only if the symbol isn't defined in the program and isn't undef
3853 weak.
3854 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
3855 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
3856 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
3857 (elf_cris_discard_excess_program_dynamics): Don't consider
3858 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
3859
3860 2002-07-11 Alan Modra <amodra@bigpond.net.au>
3861
3862 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
3863 unresolved debugging relocs in dynamic applications.
3864 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3865 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3866 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3867 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3868 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3869 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3870
3871 2002-07-10 Alan Modra <amodra@bigpond.net.au>
3872
3873 * elf64-ppc.c (ONES): Define.
3874 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
3875 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
3876 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
3877
3878 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
3879 (ppc64_elf_set_private_flags): Delete.
3880 (ppc64_elf_section_from_shdr): Delete.
3881 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
3882 (ppc64_elf_fake_sections): Delete.
3883 (bfd_elf64_bfd_set_private_flags): Don't define.
3884 (bfd_elf64_get_symbol_info): Likewise.
3885 (elf_backend_section_from_shdr): Likewise.
3886 (elf_backend_fake_sections): Likewise.
3887
3888 2002-07-10 Marco Walther <Marco.Walther@sun.com>
3889
3890 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
3891 when not already set.
3892 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
3893 (elf_backend_fake_sections): Define.
3894
3895 2002-07-10 Alan Modra <amodra@bigpond.net.au>
3896
3897 * merge.c (_bfd_merge_section): Remove redundant output_section check.
3898 Formatting.
3899 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
3900
3901 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
3902
3903 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
3904 NULL sym_hashes to just before use.
3905 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
3906 symbol with non-default visibility.
3907 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
3908 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3909 Ditto.
3910 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
3911 symbol with non-default visibility.
3912 (cris_elf_check_relocs): At tests for local symbol before
3913 increasing h->plt.refcount, also check for non-default
3914 visibility. Ditto when checking for local symbol to eliminate
3915 pc-relative runtime relocs.
3916
3917 2002-07-08 Alan Modra <amodra@bigpond.net.au>
3918
3919 * elf.c: Formatting.
3920 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
3921 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
3922 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
3923 segments.
3924
3925 2002-07-07 Mark Mitchell <mark@codesourcery.com>
3926 Alan Modra <amodra@bigpond.net.au>
3927
3928 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
3929 account the impact of relocation count overflow when computing
3930 section offsets.
3931 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
3932 or not to apply the PE COFF reloc overflow handling. Fix a
3933 fencepost error in deciding whether or not to use that technique.
3934
3935 2002-07-07 Alan Modra <amodra@bigpond.net.au>
3936
3937 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
3938 change type of locsyms.
3939 (bfd_elf_get_elf_syms): Declare.
3940 * elf.c (bfd_elf_get_elf_syms): New function.
3941 (group_signature): Use bfd_elf_get_elf_syms.
3942 (bfd_section_from_r_symndx): Likewise.
3943 * elfcode.h (elf_slurp_symbol_table): Likewise.
3944 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
3945 (elf_link_add_object_symbols): Likewise. Reorganise to increase
3946 locality of various data structures. Properly free internal relocs.
3947 (elf_bfd_final_link): Properly free internal relocs.
3948 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
3949 (elf_link_input_bfd): Likewise.
3950 (elf_gc_mark): Likewise. Properly free internal relocs.
3951 (elf_gc_sweep): Properly free internal relocs.
3952 (elf_reloc_symbol_deleted_p): No need to swap syms in.
3953 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
3954 internal relocs.
3955 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
3956 Properly free possibly cached info.
3957 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
3958 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
3959 symbol swapping code.
3960 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
3961 Properly free possibly cached info.
3962 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
3963 (mn10300_elf_relax_delete_bytes): Likewise.
3964 (mn10300_elf_symbol_address_p): Likewise.
3965 (mn10300_elf_get_relocated_section_contents): Likewise.
3966 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
3967 (elf32_h8_relax_delete_bytes): Likewise.
3968 (elf32_h8_symbol_address_p): Likewise.
3969 (elf32_h8_get_relocated_section_contents): Likewise.
3970 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
3971 (m32r_elf_relax_delete_bytes): Likewise.
3972 (m32r_elf_get_relocated_section_contents): Likewise.
3973 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
3974 elf_section_data to determine whether cached.
3975 (sh_elf_relax_section): As above for elf-m10200.c.
3976 (sh_elf_relax_delete_bytes): Likewise.
3977 (sh_elf_get_relocated_section_contents): Likewise.
3978 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
3979 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
3980 reading of local syms.
3981 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
3982 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
3983 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
3984 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
3985 relocs.
3986 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
3987 free internal relocs and section contents. Don't read symbols.
3988 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
3989 (elf32_hppa_size_stubs): Don't free local syms.
3990 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
3991 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
3992 possibly cached info.
3993 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
3994 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
3995 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
3996 all_local_syms.
3997 (get_local_syms): Delete function.
3998 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
3999 on exit.
4000 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
4001
4002 2002-07-05 Jim Wilson <wilson@redhat.com>
4003
4004 * syms.c (decode_section_type): New.
4005 (bfd_decode_symclass): Call decode_section_type.
4006
4007 2002-07-04 Jakub Jelinek <jakub@redhat.com>
4008
4009 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
4010 section content start.
4011 Reported by Michael Schumacher <mike@hightec-rt.com>.
4012
4013 2002-07-04 Alan Modra <amodra@bigpond.net.au>
4014
4015 * section.c (_bfd_strip_section_from_output): Remove unnecessary
4016 link order code. Don't actually remove the output section here;
4017 Just set a flag for the linker to do so.
4018 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
4019 sections when setting up output section dynsyms.
4020
4021 2002-07-04 Alan Modra <amodra@bigpond.net.au>
4022
4023 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
4024 fudge.
4025 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
4026 libs here instead.
4027
4028 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
4029
4030 * elf64-s390.c (create_got_section): Set .got section alignment to
4031 8 bytes.
4032 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
4033
4034 2002-07-02 Alan Modra <amodra@bigpond.net.au>
4035
4036 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
4037
4038 2002-07-01 Matt Thomas <matt@3am-software.com>
4039
4040 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
4041 to EF_VAX_*.
4042
4043 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4044
4045 * elfxx-mips.c (ABI_64_P): Fix comment.
4046 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
4047 new section names for N64 ABI.
4048 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
4049 (mips_elf_calculate_relocation): Code formatting.
4050 (mips_elf_create_dynamic_relocation): Likewise.
4051 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
4052 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
4053 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
4054 in any NewABI.
4055 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
4056 for NewABI.
4057 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
4058 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
4059 here, too.
4060
4061 2002-07-01 Andreas Schwab <schwab@suse.de>
4062
4063 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
4064 R_X86_64_64 to R_X86_64_RELATIVE.
4065
4066 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
4067
4068 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
4069 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
4070 Run "make dep-am".
4071 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
4072 host_aout_vec.
4073 * configure.in (vaxbsd_vec): Add.
4074 * targets.c (vaxbsd_vec): Add.
4075 * Makefile.in: Rebuild.
4076 * configure: Rebuild.
4077 * po/SRC-POTFILES.in: Rebuild.
4078
4079 2002-07-01 Alan Modra <amodra@bigpond.net.au>
4080
4081 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
4082 examining to gc_mark_hook, rather than the bfd.
4083 (elf_gc_sections): Adjust.
4084 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
4085 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
4086 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
4087 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
4088 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
4089 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
4090 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
4091 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
4092 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
4093 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
4094 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
4095 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
4096 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
4097 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
4098 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
4099 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
4100 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
4101 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
4102 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
4103 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
4104 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
4105 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
4106 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
4107 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4108 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
4109 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
4110 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
4111 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
4112 redundant local sym tests.
4113 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
4114 (link_hash_newfunc): Init is_entry.
4115 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
4116 (ppc64_elf_link_hash_table_create): Init all_local_syms.
4117 (create_linkage_sections): Use bfd_make_section_anyway rather than
4118 bfd_make_section.
4119 (ppc64_elf_mark_entry_syms): New function.
4120 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
4121 up opd entry to function section map.
4122 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
4123 relocs that reference the opd section.
4124 (edit_opd): New function.
4125 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
4126 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
4127 (get_local_syms): Do so here. Exit if we already have local syms.
4128 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
4129 read local syms on non-ELF input.
4130 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
4131 than duplicating it's function here. Adjust free of internal
4132 relocs to suit.
4133 (ppc64_elf_relocate_section): Adjust local syms in opd section.
4134 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
4135 * elf32-hppa.c (elf32_hppa_size_stubs): Call
4136 _bfd_elf32_link_read_relocs rather than duplicating it's function
4137 here. Adjust free of internal relocs to suit.
4138
4139 2002-07-01 Andreas Jaeger <aj@suse.de>
4140
4141 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
4142 are not allowed in shared libs code, enforce -fPIC.
4143
4144 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
4145
4146 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
4147 trailing zero-sequences when there's previous left-over data.
4148
4149 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
4150
4151 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
4152 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
4153 and opd_rel_sec in order for starting rela section. Check _raw_size.
4154 (elf_backend_reloc_type_class): Define.
4155
4156 2002-06-27 Kevin Buettner <kevinb@redhat.com>
4157
4158 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
4159 DWARF2 formats.
4160
4161 2002-06-27 Alan Modra <amodra@bigpond.net.au>
4162
4163 * cpu-powerpc.c: Comment on ordering of arch_info.
4164 * elf32-ppc.c (ppc_elf_object_p): New function.
4165 (elf_backend_object_p): Define.
4166 * elf64-ppc.c (ppc64_elf_object_p): New function.
4167 (elf_backend_object_p): Define.
4168
4169 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
4170
4171 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
4172 * configure: Regenerate.
4173
4174 2002-06-25 Jason Eckhardt <jle@rice.edu>
4175
4176 * dwarf2.c (decode_line_info): Check unit->addr_size
4177 to read in the proper number of prologue bytes.
4178
4179 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
4180
4181 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
4182 aix5coff64_vec if 64-bit bfd support has been enabled.
4183 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
4184 been enabled.
4185
4186 * targets.c (_bfd_target_vector[]): Only include
4187 aix5coff64_vec if 64-bit bfd support has been enabled.
4188
4189 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4190
4191 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
4192 * elf32-hppa.c (hppa_add_stub): Likewise.
4193 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
4194 * elflink.h (elf_add_default_symbol): Fix comment typo.
4195 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
4196 (elf_link_add_object_symbols): Likewise.
4197 (elf_link_assign_sym_version): Likewise.
4198 * hash.c (bfd_hash_lookup): Likewise.
4199 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
4200 * section.c (bfd_get_unique_section_name): Likewise.
4201 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
4202 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
4203 (assign_section_numbers): Likewise.
4204 (_bfd_elfcore_make_pseudosection): Likewise.
4205 (elfcore_grok_lwpstatus): Likewise.
4206 (elfcore_grok_win32pstatus): Likewise.
4207 (elfcore_write_note): Constify input params. Use PTR instead of
4208 void *. Include terminating NUL in namesz. Correct padding.
4209 Support NULL "name" param. Use memcpy instead of strcpy.
4210 (elfcore_write_prpsinfo): Constify input params.
4211 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
4212 (elfcore_write_lwpstatus): Likewise.
4213 (elfcore_write_pstatus): Likewise.
4214 (elfcore_write_prfpreg): Likewise.
4215 (elfcore_write_prxfpreg): Likewise.
4216 * elf-bfd.h (elfcore_write_note): Update declaration.
4217 (elfcore_write_prpsinfo): Likewise.
4218 (elfcore_write_prstatus): Likewise.
4219 (elfcore_write_pstatus): Likewise.
4220 (elfcore_write_prfpreg): Likewise.
4221 (elfcore_write_prxfpreg): Likewise.
4222 (elfcore_write_lwpstatus): Likewise.
4223
4224 2002-06-25 Jason Eckhardt <jle@rice.edu>
4225
4226 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
4227 symbols of type stProc and stStaticProc.
4228
4229 2002-06-25 Nick Clifton <nickc@redhat.com>
4230
4231 * ecoff.c: VArious formatting fixes.
4232
4233 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4234
4235 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
4236
4237 2002-06-25 Alan Modra <amodra@bigpond.net.au>
4238
4239 * aout-adobe.c: Don't compare against "true" or "false.
4240 * aout-target.h: Likewise.
4241 * aoutx.h: Likewise.
4242 * archive.c: Likewise.
4243 * bout.c: Likewise.
4244 * cache.c: Likewise.
4245 * coff-a29k.c: Likewise.
4246 * coff-alpha.c: Likewise.
4247 * coff-i386.c: Likewise.
4248 * coff-mips.c: Likewise.
4249 * coff-or32.c: Likewise.
4250 * coff64-rs6000.c: Likewise.
4251 * coffcode.h: Likewise.
4252 * coffgen.c: Likewise.
4253 * cpu-ns32k.c: Likewise.
4254 * ecoff.c: Likewise.
4255 * ecofflink.c: Likewise.
4256 * elf.c: Likewise.
4257 * elf32-arm.h: Likewise.
4258 * elf32-cris.c: Likewise.
4259 * elf32-d30v.c: Likewise.
4260 * elf32-i386.c: Likewise.
4261 * elf32-mcore.c: Likewise.
4262 * elf32-ppc.c: Likewise.
4263 * elf32-sh.c: Likewise.
4264 * elf32-sh64.c: Likewise.
4265 * elf32-v850.c: Likewise.
4266 * elf64-alpha.c: Likewise.
4267 * elf64-sh64.c: Likewise.
4268 * elfcode.h: Likewise.
4269 * elfcore.h: Likewise.
4270 * elflink.h: Likewise.
4271 * elfxx-mips.c: Likewise.
4272 * i386os9k.c: Likewise.
4273 * ieee.c: Likewise.
4274 * libbfd.c: Likewise.
4275 * linker.c: Likewise.
4276 * mmo.c: Likewise.
4277 * nlm32-alpha.c: Likewise.
4278 * nlm32-i386.c: Likewise.
4279 * nlm32-ppc.c: Likewise.
4280 * nlm32-sparc.c: Likewise.
4281 * nlmcode.h: Likewise.
4282 * oasys.c: Likewise.
4283 * pdp11.c: Likewise.
4284 * peicode.h: Likewise.
4285 * reloc.c: Likewise.
4286 * som.c: Likewise.
4287 * srec.c: Likewise.
4288 * tekhex.c: Likewise.
4289 * vms.c: Likewise.
4290 * xcofflink.c: Likewise.
4291 * elf64-sparc.c: Edit comment to not use "== false".
4292
4293 * aoutf1.h: Don't use "? true : false".
4294 * ecoff.c: Likewise.
4295 * format.c: Likewise.
4296 * ieee.c: Likewise.
4297 * linker.c: Likewise.
4298 * mmo.c: Likewise.
4299 * oasys.c: Likewise.
4300
4301 2002-06-23 H.J. Lu <hjl@gnu.org>
4302
4303 * elflink.h (elf_link_add_archive_symbols): For the default
4304 version, check references with only one `@' first.
4305
4306 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
4307
4308 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
4309 function.
4310 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
4311 symbol table.
4312 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
4313 (elf64_hppa_size_dynamic_sections): Revise to use
4314 elf64_hppa_mark_milli_and_exported_functions.
4315 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
4316 symbols out of dynamic symbol table.
4317
4318 2002-06-23 Alan Modra <amodra@bigpond.net.au>
4319
4320 * Makefile.in: Regenerate.
4321 * libbfd.h: Regenerate.
4322 * bfd-in2.h: Regenerate.
4323 * configure: Regenerate.
4324 * po/SRC-POTFILES.in: Regenerate.
4325
4326 * elflink.h: Comment typo fixes.
4327
4328 2002-06-23 H.J. Lu <hjl@gnu.org>
4329
4330 * elf-bfd.h (elf_link_loaded_list): New structure.
4331 (elf_link_hash_table): Add "loaded".
4332 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
4333 * elflink.h (elf_link_check_versioned_symbol): New function.
4334 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
4335
4336 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
4337
4338 * elflink.h (size_dynamic_sections): If the target does not
4339 support an ELF style hash table, return true, indicating that
4340 nothing needed to be done, rather than false, indicating that the
4341 section's size could not be computed.
4342
4343 2002-06-18 Dave Brolley <brolley@redhat.com>
4344
4345 From Catherine Moore, Michael Meissner, Dave Brolley:
4346 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
4347 * targets.c: Support bfd_elf32_frv_vec.
4348 * reloc.c: Add FRV relocs.
4349 * configure.in: Add support for bfd-elf32-frv-vec.
4350 * config.bfd (targ_cpu): Add support for frv-*-elf.
4351 * archures.c: Add frv arch and machines.
4352 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
4353 (ALL_MACHINES_CFILES): Add cpu-frv.c.
4354 (BFD32_BACKENDS): Add elf32-frv.lo.
4355 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
4356 (cpu-frv.lo): New target.
4357 (elf32-frv.lo): New target.
4358 * cpu-frv.c: New file.
4359 * elf32-frv.c: New file.
4360
4361 2002-06-18 Jakub Jelinek <jakub@redhat.com>
4362
4363 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
4364 e_shnum == 0.
4365 Only read the first section header if e_shoff is non-zero.
4366 Don't consider e_shstrndx if there are no sections.
4367
4368 2002-06-17 Tom Rix <trix@redhat.com>
4369
4370 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
4371 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
4372 complain_overflow_bitfield.
4373
4374 2002-06-17 Alan Modra <amodra@bigpond.net.au>
4375
4376 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
4377 (bfd_fdopenr): Likewise.
4378 (bfd_openstreamr): Likewise.
4379 (bfd_openw): Likewise.
4380
4381 * targets.c: Sort target vecs.
4382 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
4383 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
4384 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
4385 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
4386 * configure.in: Sort target vecs. Add m88kmach3_vec.
4387 * configure: Regenerate.
4388
4389 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
4390
4391 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
4392 bpo_reloc_no to break sort order ties, not address of items.
4393
4394 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4395
4396 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
4397 Skip excluded sections in determing __gp value.
4398 (elf_hppa_final_link_relocate): Use the symbol's address in
4399 R_PARISC_FPTR64 relocations that don't need an opd entry.
4400 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
4401 (elf64_hppa_finalize_dynreloc): Likewise.
4402 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
4403 (elf64_hppa_finish_dynamic_symbol): Break up assert.
4404
4405 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
4406
4407 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4408 alignment for .bss, .data and .text sections so that sse and sse2
4409 code will work.
4410 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4411
4412 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
4413
4414 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
4415 sh[1234]*-elf*.
4416
4417 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4418
4419 * elflink.h (elf_bfd_final_link): Improve error handling for missing
4420 dynamic sections.
4421
4422 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
4423 for a symbol that has no output section.
4424 (allocate_dynrel_entries): Correct comment.
4425 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
4426 unless we want one.
4427 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
4428 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
4429 with no section. Remove unnecessary parentheses.
4430
4431 2002-06-11 Tom Rix <trix@redhat.com>
4432
4433 * coffcode.h (coff_compute_section_file_positions): Add data
4434 section to AIX loader alignment check.
4435
4436 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
4437 alignment to 4 bytes.
4438 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
4439 power accessor macro.
4440 (do_shared_object_padding): Remove invalid assertion.
4441
4442 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
4443
4444 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
4445 for removed output sections.
4446
4447 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
4448
4449 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
4450 htab_alloc.
4451 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
4452
4453 2002-06-08 H.J. Lu <hjl@gnu.org>
4454
4455 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
4456 work around a long long bug in gcc 2.96 on mips.
4457
4458 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
4459
4460 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
4461 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
4462 Regenerate dependency lists.
4463 * Makefile.in: Regenerate.
4464 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
4465 vax1knetbsd_vec to targ_selvecs.
4466 * configure.in: Add vax1knetbsd_vec.
4467 * configure: Regenerate.
4468 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
4469 * vax1knetbsd.c: New file.
4470 * vaxnetbsd.c: Update copyright years.
4471 (TARGET_PAGE_SIZE): Set to 0x1000.
4472 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
4473
4474 2002-06-08 Matt Thomas <matt@3am-software.com>
4475
4476 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
4477
4478 2002-06-08 Alan Modra <amodra@bigpond.net.au>
4479
4480 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
4481
4482 2002-06-08 Alan Modra <amodra@bigpond.net.au>
4483
4484 * Makefile.am: Run "make dep-am".
4485 * Makefile.in: Regenerate.
4486
4487 * armnetbsd.c: Replace CONST with const.
4488 * corefile.c: Likewise.
4489 * elf32-dlx.c: Likewise.
4490 * elf64-mips.c: Likewise.
4491 * mmo.c: Likewise.
4492 * ns32knetbsd.c: Likewise.
4493
4494 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
4495 table is elf64-sparc.
4496
4497 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4498
4499 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
4500 Fix RELA addends to get not shifted in the result. Don't do special
4501 handling of R_MIPS_64 for NewABI.
4502
4503 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4504
4505 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4506 (NAME(aout,slurp_reloc_table)): Likewise.
4507 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
4508 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
4509 (xcoff_write_archive_contents_big): Likewise.
4510 (xcoff_generate_rtinit): Likewise.
4511 (xcoff_generate_rtinit): Likewise, and check error return.
4512 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4513 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
4514 (coff_get_normalized_symtab): Likewise.
4515 (coff_make_empty_symbol): Likewise.
4516 (bfd_coff_set_symbol_class): Likewise.
4517 * cofflink.c (coff_link_add_symbols): Likewise.
4518 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
4519 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
4520 (bfd_ecoff_write_accumulated_debug): Likewise.
4521 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
4522 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
4523 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
4524 * ieee.c (do_with_relocs): Use bfd_zalloc.
4525 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
4526 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
4527 (NAME(aout,slurp_reloc_table)): Likewise.
4528 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
4529 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
4530 * som.c (som_build_and_write_symbol_table): Likewise.
4531 (som_slurp_string_table): Likewise.
4532 (som_slurp_symbol_table): Likewise.
4533 (som_bfd_ar_write_symbol_stuff): Likewise.
4534 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
4535 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
4536 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
4537 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
4538 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
4539
4540 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4541
4542 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
4543 "group" union.
4544 (elf_group_name): Update.
4545 (elf_group_id): Define.
4546 (bfd_elf_set_group_contents): Declare.
4547 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
4548 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
4549 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
4550 that sym for the signature.
4551 (_bfd_elf_compute_section_file_positions): Don't call
4552 set_group_contents for "ld -r" case.
4553 (swap_out_syms): Use bfd_zalloc.
4554 * elflink.h (elf_link_add_archive_symbols): Likewise.
4555 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4556 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
4557
4558 2002-06-07 Alan Modra <amodra@bigpond.net.au>
4559
4560 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
4561 relocs in opd for non-shared too.
4562
4563 2002-06-06 Jeffrey Law <law@redhat.com>
4564
4565 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
4566 relocations.
4567
4568 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
4569
4570 * merge.c: Include libiberty.h.
4571 * elf-strtab.c: Include libiberty.h.
4572
4573 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
4574
4575 * peXXigen.c (pe_print_idata): Remove unused variable.
4576
4577 2002-06-06 David Heine <dlheine@tensilica.com>
4578
4579 * elf.c (assign_file_positions_for_segments): Remove unallocated
4580 sections from the section to segment mapping for PT_LOAD segments.
4581 Update comment about empty loadable segments.
4582
4583 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
4584
4585 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
4586 is within the .stabstr section.
4587
4588 2002-06-06 Alan Modra <amodra@bigpond.net.au>
4589
4590 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
4591 are "const PTR", not "const PTR *".
4592 (bfd_elf32_swap_symbol_in): Likewise.
4593 (bfd_elf64_swap_symbol_in): Likewise.
4594 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
4595 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4596 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4597 (elf_link_add_object_symbols): Likewise.
4598 (elf_link_record_local_dynamic_symbol): Likewise.
4599 (elf_link_input_bfd): Likewise.
4600 (elf_gc_mark): Likewise.
4601 (elf_reloc_symbol_deleted_p): Likewise.
4602 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4603 (mn10200_elf_relax_delete_bytes): Likewise.
4604 (mn10200_elf_symbol_address_p): Likewise.
4605 (mn10200_elf_get_relocated_section_contents): Likewise.
4606 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4607 (mn10300_elf_relax_section): Likewise.
4608 (mn10300_elf_relax_delete_bytes): Likewise.
4609 (mn10300_elf_symbol_address_p): Likewise.
4610 (mn10300_elf_get_relocated_section_contents): Likewise.
4611 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4612 (elf32_h8_relax_delete_bytes): Likewise.
4613 (elf32_h8_symbol_address_p): Likewise.
4614 (elf32_h8_get_relocated_section_contents): Likewise.
4615 * elf32-hppa.c (get_local_syms): Likewise.
4616 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4617 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4618 * elf32-sh.c (sh_elf_relax_section): Likewise.
4619 (sh_elf_relax_delete_bytes): Likewise.
4620 (sh_elf_get_relocated_section_contents): Likewise.
4621 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4622 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4623 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4624 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4625 * elf64-ppc.c (get_local_syms): Likewise.
4626 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4627 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4628
4629 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
4630
4631 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
4632
4633 2002-06-05 Alan Modra <amodra@bigpond.net.au>
4634
4635 * elf.c (group_signature): Swap in the whole symbol, and handle
4636 extracting section symbol names.
4637 (setup_group): Add comment.
4638 (set_group_contents): When called from objcopy or ld, arrange for
4639 section contents to be written. Write group member output section
4640 indices to allow objcopy to reorganize sections.
4641 (_bfd_elf_copy_private_section_data): Copy group info.
4642
4643 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
4644 (bfd_elf32_swap_symbol_in): Update prototype.
4645 (bfd_elf64_swap_symbol_in): Likewise.
4646 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
4647 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
4648 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4649 (elf_link_add_object_symbols): Likewise.
4650 (elf_link_record_local_dynamic_symbol): Likewise.
4651 (elf_link_input_bfd): Likewise.
4652 (elf_gc_mark): Likewise.
4653 (elf_reloc_symbol_deleted_p): Likewise.
4654 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
4655 (mn10200_elf_relax_delete_bytes): Likewise.
4656 (mn10200_elf_symbol_address_p): Likewise.
4657 (mn10200_elf_get_relocated_section_contents): Likewise.
4658 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
4659 (mn10300_elf_relax_section): Likewise.
4660 (mn10300_elf_relax_delete_bytes): Likewise.
4661 (mn10300_elf_symbol_address_p): Likewise.
4662 (mn10300_elf_get_relocated_section_contents): Likewise.
4663 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4664 (elf32_h8_relax_delete_bytes): Likewise.
4665 (elf32_h8_symbol_address_p): Likewise.
4666 (elf32_h8_get_relocated_section_contents): Likewise.
4667 * elf32-hppa.c (get_local_syms): Likewise.
4668 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
4669 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4670 * elf32-sh.c (sh_elf_relax_section): Likewise.
4671 (sh_elf_relax_delete_bytes): Likewise.
4672 (sh_elf_get_relocated_section_contents): Likewise.
4673 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
4674 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
4675 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
4676 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4677 * elf64-ppc.c (get_local_syms): Likewise.
4678 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
4679 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
4680 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
4681 * elf64-alpha.c (alpha_elf_size_info): Likewise.
4682 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4683 * elf64-mips.c (mips_elf64_size_info): Likewise.
4684 * elf64-s390.c (s390_elf64_size_info): Likewise.
4685 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4686
4687 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4688
4689 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
4690 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
4691 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
4692 _bfd_mips_elf_ignore_discarded_relocs.
4693 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
4694
4695 2002-06-05 H.J. Lu <hjl@gnu.org>
4696
4697 * elfxx-mips.c (mips_elf_calculate_relocation): Call
4698 _bfd_elf_rel_local_sym for STT_SECTION relocations against
4699 the SEC_MERGE section.
4700
4701 2002-06-05 Alan Modra <amodra@bigpond.net.au>
4702
4703 * coff-alpha.c: Update copyright date.
4704 * coff-mips.c: Likewise.
4705 * xcoff-target.h: Likewise.
4706
4707 * bfd-in.h: Remove "taken from the source" comment.
4708 * libbfd-in.h: Likewise.
4709 * libcoff-in.h: Likewise.
4710 * bfd-in2.h: Regenerate.
4711 * libbfd.h: Regenerate.
4712 * libcoff.h: Regenerate.
4713
4714 * elf.c (bfd_elf_discard_group): Return true.
4715 * elf-bfd.h (bfd_elf_discard_group): Declare.
4716 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
4717 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
4718 * bfd.c (bfd_discard_group): Define.
4719 * targets.c (struct bfd_target): Add _bfd_discard_group.
4720 (BFD_JUMP_TABLE_LINK): Here too.
4721 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
4722 * aout-adobe.c (aout_32_bfd_discard_group): Define.
4723 * aout-target.h (MY_bfd_discard_group): Define.
4724 * aout-tic30.c (MY_bfd_discard_group): Define.
4725 * binary.c (binary_bfd_discard_group): Define.
4726 * bout.c (b_out_bfd_discard_group): Define.
4727 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
4728 * coffcode.h (coff_bfd_discard_group): Define.
4729 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
4730 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
4731 * i386msdos.c (msdos_bfd_discard_group): Define.
4732 * i386os9k.c (os9k_bfd_discard_group): Define.
4733 * ieee.c (ieee_bfd_discard_group): Define.
4734 * ihex.c (ihex_bfd_discard_group): Define.
4735 * mmo.c (mmo_bfd_discard_group): Define.
4736 * nlm-target.h (nlm_bfd_discard_group): Define.
4737 * oasys.c (oasys_bfd_discard_group): Define.
4738 * ppcboot.c (ppcboot_bfd_discard_group): Define.
4739 * som.c (som_bfd_discard_group): Define.
4740 * srec.c (srec_bfd_discard_group): Define.
4741 * tekhex.c (tekhex_bfd_discard_group): Define.
4742 * versados.c (versados_bfd_discard_group): Define.
4743 * vms.c (vms_bfd_discard_group): Define.
4744 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
4745 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
4746 (aix5coff64_vec): Likewise.
4747 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
4748
4749 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4750
4751 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
4752 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
4753 (elf32-sh64-com.lo): New dependency list.
4754 * Makefile.in: Regenerate.
4755 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
4756 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
4757 elf32-sh64-com.lo.
4758 * configure: Regenerate.
4759 * elf32-sh64.c (sh64_address_in_cranges)
4760 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
4761 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
4762 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
4763 * elf32-sh64-com.c: ...here. New file.
4764
4765 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4766
4767 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
4768 ATTRIBUTE_UNUSED on used params.
4769 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
4770 before calling bfd_section_from_elf_index on local syms.
4771 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
4772
4773 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
4774
4775 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
4776 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
4777 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
4778 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
4779 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
4780 * Makefile.in: Regenerate.
4781 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
4782 (sh64-*-netbsd*): New targets.
4783 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
4784 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
4785 * configure: Regenerate.
4786 * elf32-sh64-nbsd.c: New file.
4787 * elf64-sh64-nbsd.c: New file.
4788 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
4789 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
4790 bfd_elf64_sh64lnbsd_vec.
4791
4792 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4793
4794 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
4795 (bfd_section_from_shdr): Likewise. Set section name of group
4796 sections from signature.
4797 (group_signature): Split out from setup_group. Ensure symbol table
4798 is available.
4799 (bfd_elf_discard_group): New function.
4800 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
4801 .gnu.linkonce* sections if they are members of a group.
4802 (set_group_contents): Set GRP_COMDAT flag.
4803 * section.c (bfd_discard_group): New function.
4804 * bfd-in.h (bfd_elf_discard_group): Declare.
4805 * bfd-in2.h: Regenerate.
4806 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
4807 (elf_linkonce_p): Define.
4808
4809 2002-06-04 Alan Modra <amodra@bigpond.net.au>
4810
4811 * elf.c (bfd_section_from_shdr): Make "name" const.
4812 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
4813 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
4814 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
4815 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
4816 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
4817 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
4818 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
4819 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
4820 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
4821 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
4822 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
4823
4824 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4825
4826 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
4827 ABI.
4828
4829 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
4830
4831 * elf32-arc.c: Fix formatting.
4832 * elf32-arm.h: Likewise.
4833 * elf32-cris.c: Likewise.
4834 * elf32-dlx.c: Likewise.
4835 * elf32-hppa.c: Likewise.
4836 * elf32-i386.c: Likewise.
4837 * elf32-i386qnx.c: Likewise.
4838 * elf32-or32.c: Likewise.
4839 * elf32-s390.c: Likewise.
4840 * elf32-sh64.c: Likewise.
4841 * elf32-vax.c: Likewise.
4842 * elf32-xstormy16.c: Likewise.
4843 * elf64-alpha.c: Likewise.
4844 * elf64-mmix.c: Likewise.
4845 * elf64-ppc.c: Likewise.
4846 * elf64-s390.c: Likewise.
4847 * elf64-sh64.c: Likewise.
4848 * elf64-x86-64.c: Likewise.
4849
4850 2002-06-02 Richard Henderson <rth@redhat.com>
4851
4852 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
4853 null when there are no got entries for a symbol.
4854 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
4855 uninitialized variable warning.
4856
4857 2002-06-01 Richard Henderson <rth@redhat.com>
4858
4859 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
4860 undefined symbols here.
4861 (elf64_alpha_relax_section): Do it here. Also test for not
4862 defined in the current module.
4863 (elf64_alpha_relocate_section_r): Split out of ...
4864 (elf64_alpha_relocate_section): ... here. Don't dereference
4865 NULL when looking up local got entries.
4866
4867 2002-06-01 Richard Henderson <rth@redhat.com>
4868
4869 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
4870 symbols from JSR relaxation.
4871 (elf64_alpha_size_plt_section_1): New.
4872 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
4873 (elf64_alpha_size_rela_got_1): ... here.
4874 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
4875 (elf64_alpha_size_rela_got_section): ... here.
4876 (elf64_alpha_size_plt_section): New.
4877 (elf64_alpha_relax_section): Call them.
4878 (elf64_alpha_size_got_sections): Remove output_bfd arg.
4879 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
4880
4881 2002-06-01 Richard Henderson <rth@redhat.com>
4882
4883 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
4884 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
4885 in shared libraries. Fix DTPRELHI and TPRELHI value.
4886 (INSN_ADDQ, INSN_RDUNIQ): New.
4887 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
4888 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
4889 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
4890 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
4891 Handle GOTDTPREL and GOTTPREL relocations.
4892 (elf64_alpha_relax_gprelhilo): New.
4893 (elf64_alpha_relax_tls_get_addr): New.
4894 (elf64_alpha_relax_find_tls_segment): New.
4895 (elf64_alpha_relax_section): Handle TLS relocations.
4896 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
4897 (elf64_alpha_check_relocs): Set it.
4898
4899 2002-06-01 Richard Henderson <rth@redhat.com>
4900
4901 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
4902
4903 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
4904 check; don't suppress dynamic relocs for non-allocated sections.
4905
4906 * elf64-alpha.c: Remove dead code.
4907
4908 2002-05-31 Alan Modra <amodra@bigpond.net.au>
4909
4910 * bfd-in2.h: Regenerate.
4911 * libbfd.h: Regenerate.
4912 * po/SRC-POTFILES.in: Regenerate.
4913
4914 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
4915 space for bss .plt.
4916
4917 2002-05-31 Graeme Peterson <gp@qnx.com>
4918
4919 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
4920 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
4921 Run "make dep-am".
4922 * Makefile.in: Regenerate.
4923 * config.bfd: Add i[3456]86-*-nto-qnx* support.
4924 * configure.in: Add bfd_elf32_i386qnx_vec support.
4925 * configure: Regenerate.
4926 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
4927 is_contained_by_filepos, and copy_private_bfd_data_p.
4928 * elf.c (assign_file_positions_for_segments): Call backend
4929 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
4930 (IS_CONTAINED_BY_FILEPOS): Define.
4931 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
4932 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
4933 Fix non-K&R call to _bfd_error_handler.
4934 (_bfd_elf_copy_private_section_data): Use backend
4935 copy_private_bfd_data_p.
4936 * elf32-i386.c: Don't include elfxx-target.h when
4937 ELF32_I386_C_INCLUDED is defined.
4938 * elf32-i386qnx.c: New QNX elf backend file.
4939 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
4940 elf_backend_is_contained_by_filepos, and
4941 elf_backend_do_copy_private_bfd_data.
4942 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
4943
4944 2002-05-31 Alan Modra <amodra@bigpond.net.au>
4945
4946 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
4947 Move other similar defines to start of file.
4948
4949 2002-05-30 Tom Rix <trix@redhat.com>
4950
4951 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
4952 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
4953
4954 2002-05-30 Richard Henderson <rth@redhat.com>
4955
4956 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
4957 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
4958 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
4959 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
4960 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
4961 (struct alpha_elf_obj_tdata): Rename total_got_entries and
4962 n_local_got_entries to total_got_size and local_got_size.
4963 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
4964 (alpha_got_entry_size): New.
4965 (elf64_alpha_relax_with_lituse): Use it.
4966 (elf64_alpha_relax_without_lituse): Likewise.
4967 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
4968 (get_got_entry): New.
4969 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
4970 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
4971 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
4972 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
4973 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
4974 (elf64_alpha_calc_got_offsets): Likewise.
4975 (alpha_dynamic_entries_for_reloc): New.
4976 (elf64_alpha_calc_dynrel_sizes): Use it.
4977 (elf64_alpha_size_dynamic_sections): Likewise.
4978 (elf64_alpha_relocate_section): Handle TLS relocations.
4979 * reloc.c: Add Alpha TLS relocations.
4980 * bfd-in2.h, libbfd.h: Rebuild.
4981
4982 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
4983
4984 * peXXigen.c (pe_print_idata): Remove double printed
4985 import table lines; add Bound-To comment.
4986
4987 2002-05-29 Matt Thomas <matt@3am-software.com>
4988
4989 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
4990 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
4991 (elf32-vax.lo): New rule.
4992 * Makefile.in: Regenerate.
4993 * configure.in (bfd_elf32_vax_vec)
4994 (vaxnetbsd_vec): New vectors.
4995 * configure: Regenerate.
4996 * config.bfd (vax-*-netbsdelf*)
4997 (vax-*-netbsdaout*)
4998 (vax-*-netbsd*): New targets.
4999 * elf32-vax.c: New file.
5000 * reloc.c: Add VAX relocations.
5001 * bfd-in2.h: Regenerate.
5002 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
5003
5004 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
5005
5006 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
5007 and bfd_elf32_bigarm_vec to targ_selvecs.
5008
5009 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5010
5011 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
5012 with auto-imported symbols.
5013
5014 2002-05-29 Adam Nemet <anemet@lnxw.com>
5015
5016 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
5017 sections only record bfd.
5018 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
5019 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
5020 * bfd-in2.h: Regenerate.
5021
5022 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
5023
5024 * syms.c (_bfd_stab_section_find_nearest_line): Move
5025 declaration and initialisation of saw_line and saw_func out of
5026 for loop.
5027
5028 2002-05-29 Alan Modra <amodra@bigpond.net.au>
5029
5030 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
5031 (bfd_elf64_get_symbol_info): Define.
5032 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
5033
5034 2002-05-29 Andrey Volkov <avolkov@transas.com>
5035
5036 * cpu-h8300.c: Make default h8300 machine first in machine list.
5037
5038 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
5039
5040 * config.bfd: Added DLX configuraton.
5041 * Makefile.am: Added DLX configuraton.
5042 * configure.in: Added DLX configuraton.
5043 * archures.c: Add DLX architecure.
5044 * reloc.c: Add DLX relocs.
5045 * targets.c: Added DLX target vector.
5046 * configure: Regenerate.
5047 * Makefile.in: Regenreate.
5048 * bfd-in2.h: Regenreate.
5049 * elf32-dlx.c: New file: Support DLX target.
5050 * cpu-dlx.c: New file: Support DLX target.
5051
5052 2002-05-25 Alan Modra <amodra@bigpond.net.au>
5053
5054 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
5055
5056 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
5057 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
5058 strings to point inside function code sym string.
5059 (func_desc_adjust): Likewise.
5060 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
5061
5062 2002-05-24 Michal Ludvig <mludvig@suse.cz>
5063
5064 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
5065 (elf64_x86_64_grok_psinfo): Added.
5066
5067 2002-05-24 TAMURA Kent <kent@netbsd.org>
5068
5069 * config.bfd: Add a target for i386-netbsdpe.
5070
5071 2002-05-24 Alan Modra <amodra@bigpond.net.au>
5072
5073 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
5074 and is_func_descriptor.
5075 (func_desc_adjust): Hide function code sym in shared libs unless
5076 there is a matching exported function descriptor sym.
5077
5078 2002-05-23 Jakub Jelinek <jakub@redhat.com>
5079
5080 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
5081 for symbols from SHF_TLS section.
5082 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
5083 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
5084 (map_sections_to_segments): Build PT_TLS segment if necessary.
5085 (assign_file_positions_for_segments): Likewise.
5086 (get_program_header_size): Account for PT_TLS segment.
5087 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
5088 SEC_THREAD_LOCAL sections to STT_TLS.
5089 * reloc.c: Add 386 and IA-64 TLS relocs.
5090 * section.c (SEC_THREAD_LOCAL): Define.
5091 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
5092 Remove.
5093 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
5094 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
5095 unconditionally.
5096 (struct elf_final_link_info): Add first_tls_sec.
5097 (elf_bfd_final_link): Set first_tls_sec.
5098 Compute elf_hash_table (info)->tls_segment.
5099 (elf_link_output_extsym): Handle STT_TLS symbols.
5100 (elf_link_input_bfd): Likewise.
5101 * syms.c (BSF_THREAD_LOCAL): Define.
5102 * bfd-in2.h: Rebuilt.
5103 * libbfd.h: Rebuilt.
5104 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
5105 elf_i386_mkobject, elf_i386_object_p): New functions.
5106 (elf_howto_table): Add TLS relocs.
5107 (elf_i386_reloc_type_lookup): Support TLS relocs.
5108 (elf_i386_info_to_howto_rel): Likewise.
5109 (struct elf_i386_link_hash_entry): Add tls_type.
5110 (struct elf_i386_obj_tdata): New.
5111 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
5112 New macros.
5113 (struct elf_i386_link_hash_table): Add tls_ldm_got.
5114 (link_hash_newfunc): Clear tls_type.
5115 (elf_i386_check_relocs): Support TLS relocs.
5116 (elf_i386_gc_sweep_hook): Likewise.
5117 (allocate_dynrelocs): Likewise.
5118 (elf_i386_size_dynamic_sections): Likewise.
5119 (elf_i386_relocate_section): Likewise.
5120 (elf_i386_finish_dynamic_symbol): Likewise.
5121 (bfd_elf32_mkobject, elf_backend_object_p): Define.
5122 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
5123 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
5124 want_tprel, want_dtpmod, want_dtprel.
5125 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
5126 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
5127 R_IA64_LTOFF_TPREL22.
5128 (elf_code_to_howto_index): Add TLS relocs.
5129 (elfNN_ia64_check_relocs): Support TLS relocs.
5130 (allocate_global_data_got): Account for TLS .got data.
5131 (allocate_dynrel_entries): Account for TLS dynamic relocations.
5132 (elfNN_ia64_install_value): Supprt TLS relocs.
5133 (set_got_entry): Support TLS relocs.
5134 (elfNN_ia64_relocate_section): Likewise.
5135
5136 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
5137
5138 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
5139 BLX reloc round the relocation up rather than down.
5140 * coff-arm.c (coff_arm_relocate_section): Likewise.
5141
5142 2002-05-21 H.J. Lu (hjl@gnu.org)
5143
5144 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
5145 definition.
5146
5147 2002-05-22 Alan Modra <amodra@bigpond.net.au>
5148
5149 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
5150 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
5151
5152 2002-05-22 Alan Modra <amodra@bigpond.net.au>
5153
5154 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
5155 unresolved relocs.
5156 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
5157
5158 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5159
5160 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
5161 non-ELF targets.
5162
5163 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5164
5165 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
5166 an error value.
5167 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
5168 return with false on error.
5169 (elf_link_input_bfd): Check reloc_emitter return value.
5170
5171 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
5172
5173 * config.bfd (armeb-*-netbsdelf*): New target.
5174
5175 2002-05-20 Alan Modra <amodra@bigpond.net.au>
5176
5177 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
5178 at the plt call stub.
5179
5180 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5181
5182 * cpu-mips.c (mips_compatible): Don't try to check machine
5183 compatibility.
5184
5185 2002-05-18 Tom Rix <trix@redhat.com>
5186
5187 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
5188
5189 2002-05-17 Alan Modra <amodra@bigpond.net.au>
5190
5191 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
5192 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
5193 we've already warned about an undefined symbol. Report more
5194 detail on reloc errors.
5195
5196 2002-05-17 Alan Modra <amodra@bigpond.net.au>
5197
5198 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
5199 * configure.in: Invoke AM_INSTALL_LIBBFD.
5200 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
5201 (install_libbfd): .. New target.
5202 (uninstall_libbfd): Likewise.
5203 (install-bfdlibLTLIBRARIES): Likewise.
5204 (uninstall-bfdlibLTLIBRARIES): Likewise.
5205 (bfdlibdir): New.
5206 (bfdincludedir): New.
5207 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
5208 * aclocal.m4: Regenerate.
5209 * configure: Regenerate.
5210 * Makefile.in: Regenerate.
5211
5212 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
5213
5214 * hash.c (bfd_hash_lookup): Remove computation of len from inside
5215 hash loop.
5216
5217 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
5218
5219 * config.bfd: Add targets for sh64-linux (little endian and
5220 big endian).
5221
5222 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
5223
5224 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
5225 is located in the same section as the import table. Instead
5226 check, and if necessary load the section containing the thunk.
5227
5228 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
5229
5230 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
5231 bfd_bread.
5232 (xcoff64_core_file_matches_executable_p): Replace bfd_read
5233 with bfd_bread.
5234
5235 2002-05-15 Alan Modra <amodra@bigpond.net.au>
5236
5237 * aix5ppc-core.c: Warning fixes.
5238 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
5239 * aout-target.h (MY_bfd_link_just_syms): Define.
5240 * aout-tic30.c (MY_bfd_link_just_syms): Define.
5241 * bfd.c (bfd_link_just_syms): Define.
5242 * binary.c (binary_bfd_link_just_syms): Define.
5243 * bout.c (b_out_bfd_link_just_syms): Define.
5244 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
5245 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
5246 * coffcode.h (coff_bfd_link_just_syms): Define.
5247 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
5248 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
5249 (_bfd_elf_link_just_syms): Declare.
5250 * elf.c (_bfd_elf_link_just_syms): New function.
5251 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
5252 sections haven't already been discarded by the linker.
5253 * elflink.h (elf_link_add_object_symbols): Likewise for stab
5254 sections and SEC_MERGE sections.
5255 (elf_bfd_discard_info): Similarly here.
5256 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
5257 * i386msdos.c (msdos_bfd_link_just_syms): Define.
5258 * i386os9k.c (os9k_bfd_link_just_syms): Define.
5259 * ieee.c (ieee_bfd_link_just_syms): Define.
5260 * ihex.c (ihex_bfd_link_just_syms): Define.
5261 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
5262 (_bfd_generic_link_just_syms): Declare.
5263 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
5264 * linker.c (_bfd_generic_link_just_syms): New function.
5265 * mmo.c (mmo_bfd_link_just_syms): Define.
5266 * nlm-target.h (nlm_bfd_link_just_syms): Define.
5267 * oasys.c (oasys_bfd_link_just_syms): Define.
5268 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
5269 * som.c (som_bfd_link_just_syms): Define.
5270 * srec.c (srec_bfd_link_just_syms): Define.
5271 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
5272 (BFD_JUMP_TABLE_LINK): And here.
5273 * tekhex.c (tekhex_bfd_link_just_syms): Define.
5274 * versados.c (versados_bfd_link_just_syms): Define.
5275 * vms.c (vms_bfd_link_just_syms): Define.
5276 * libbfd.h: Regenerate.
5277 * bfd-in2.h: Regenerate.
5278
5279 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5280
5281 * elf32-mips.c: Remove superfluous definitions copied from
5282 elfxx-mips.c.
5283 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
5284 SGIish vectors to check the special case.
5285 (mips_elf_hi16_reloc): Fix comment.
5286 (mips_elf_got16_reloc): Likewise.
5287 (_bfd_mips_elf32_gprel16_reloc): Likewise.
5288 (elf_reloc_map): Code cleanup.
5289 (mips_reloc_map): Add comment.
5290 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
5291 (mips_elf32_rtype_to_howto): Likewise.
5292 (mips_elf32_discard_info): Likewise.
5293 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
5294 lead to IRIX compatibility now.
5295
5296 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5297
5298 * elfxx-mips.c: Call it IRIX, not Irix in comments.
5299
5300 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
5301
5302 * config.bfd (shle-*-netbsdelf*): Add target which includes
5303 sh64 support.
5304
5305 2002-05-13 David Edelsohn <edelsohn@gnu.org>
5306
5307 * configure.in: Revert 2002-04-07. Instead, auto-configure
5308 HAVE_ST_C_IMPL.
5309 * configure: Regenerate.
5310 * config.in: Regenerate.
5311 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
5312 or AIX_5_CORE.
5313
5314 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5315
5316 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
5317 corefiles as well.2
5318 * configure: Regenerate.
5319
5320 2002-05-13 Alan Modra <amodra@bigpond.net.au>
5321
5322 * Makefile.am (install-data-local): Install headers to
5323 $(exec_prefix)/include.
5324 * Makefile.in: Regenerate.
5325
5326 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
5327 Daniel Jacobowitz <drow@mvista.com>
5328
5329 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
5330 map BFD_RELOC_RVA.
5331
5332 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
5333
5334 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
5335 hppa*-*-openbsd*): New targets.
5336 * configure.in (alpha*-*-openbsd*): Set COREFILE.
5337 * configure: Regenerate.
5338
5339 2002-05-10 Tom Rix <trix@redhat.com>
5340
5341 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
5342 xcoff64_ppc_relocate_section.
5343 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
5344 * libxcoff.h: Common xcoff_reloc_type function declaration.
5345
5346 2002-05-10 Alan Modra <amodra@bigpond.net.au>
5347
5348 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
5349 added in 2002-05-09 commit.
5350
5351 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
5352 don't look for stubs on all undefined syms.
5353
5354 2002-05-09 Alan Modra <amodra@bigpond.net.au>
5355
5356 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
5357 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
5358 pcrel_offset.
5359
5360 * elf32-i386.c (elf_howto_table): Comments.
5361 (elf_i386_relocate_section): Handle more relocs for relocatable
5362 linking and against SEC_MERGE sections.
5363
5364 2002-05-08 Alan Modra <amodra@bigpond.net.au>
5365
5366 * elf32-ppc.c (ppc_elf_create_got): New function.
5367 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
5368 _bfd_elf_create_dynamic_sections. Correct .plt flags.
5369 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
5370 _bfd_elf_create_got_section.
5371
5372 2002-05-07 Alan Modra <amodra@bigpond.net.au>
5373
5374 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
5375 * elfxx-target.h (elf_backend_rela_normal): Define.
5376 (elfNN_bed): Init rela_normal.
5377 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
5378 for section symbols here if rela_normal. Simplify abs section test.
5379 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
5380 return immediately. Remove code handling relocatable linking.
5381 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
5382 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
5383 * elf32-i370.c (i370_elf_relocate_section): Likewise.
5384 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5385 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5386 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
5387 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5388 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5389 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5390 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5391 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5392 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5393 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5394 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
5395 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
5396 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5397 * elf-m10200.c (elf_backend_rela_normal): Define.
5398 * elf-m10300.c (elf_backend_rela_normal): Define.
5399 * elf32-fr30.c (elf_backend_rela_normal): Define.
5400 * elf32-i370.c (elf_backend_rela_normal): Define.
5401 * elf32-i860.c (elf_backend_rela_normal): Define.
5402 * elf32-m68k.c (elf_backend_rela_normal): Define.
5403 * elf32-mcore.c (elf_backend_rela_normal): Define.
5404 * elf32-openrisc.c (elf_backend_rela_normal): Define.
5405 * elf32-ppc.c (elf_backend_rela_normal): Define.
5406 * elf32-s390.c (elf_backend_rela_normal): Define.
5407 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
5408 * elf64-ppc.c (elf_backend_rela_normal): Define.
5409 * elf64-s390.c (elf_backend_rela_normal): Define.
5410 * elf64-x86-64.c (elf_backend_rela_normal): Define.
5411 * elfxx-ia64.c (elf_backend_rela_normal): Define.
5412 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
5413 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
5414
5415 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
5416
5417 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
5418 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
5419
5420 2002-05-06 Alan Modra <amodra@bigpond.net.au>
5421
5422 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
5423 when not relocatable. Fix reloc_emitter call for K&R.
5424
5425 2002-05-04 Alan Modra <amodra@bigpond.net.au>
5426
5427 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
5428 reloading local sym addend mistakenly removed in 2002-05-01 change.
5429
5430 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
5431 (read_abbrevs): Change "offset" param to bfd_vma.
5432 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
5433 Change "abbrev_offset" to bfd_vma.
5434 (read_indirect_string): Use correct conversion chars in error
5435 message format string, cast bfd_vma's to unsigned long.
5436 (read_abbrevs): Likewise.
5437 (read_attribute_value): Likewise.
5438 (decode_line_info): Likewise.
5439 (scan_unit_for_functions): Likewise.
5440 (parse_comp_unit): Likewise.
5441
5442 2002-05-04 Tom Rix <trix@redhat.com>
5443
5444 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
5445 (coff_swap_reloc_out): Same.
5446 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
5447 (xcoff_swap_reloc_out): Same.
5448 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
5449 case some 16 bit relocs. Add reloc value to output.
5450 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
5451 R_RBR. Improve names.
5452 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
5453 (bfd_xcoff_backend_data): Update with new reloc swap names.
5454 (bfd_pmac_xcoff_backend_data) : Same.
5455 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
5456 (xcoff64_swap_reloc_out): Same.
5457 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
5458 R_POS. Add reloc value to output.
5459 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
5460 bit R_RBR. Improve names, masks.
5461 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
5462 (bfd_xcoff_backend_data): Update with new reloc swap names.
5463 (bfd_xcoff_aix5_backend_data) : Same.
5464
5465 2002-05-04 Alan Modra <amodra@bigpond.net.au>
5466
5467 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
5468 bfd_count top_index, input_list, all_local_syms.
5469 (elf32_hppa_setup_section_lists): New function, split from
5470 elf32_hppa_size_stubs.
5471 (elf32_hppa_next_input_section): Likewise.
5472 (group_sections): Likewise.
5473 (get_local_syms): Likewise.
5474 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
5475 stubs on undefined syms too.
5476 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
5477 Only access htab elf fields when we have an elf hash table.
5478 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
5479 (elf32_hppa_next_input_section): Declare.
5480
5481 2002-05-04 Bob Byrnes <byrnes@curl.com>
5482
5483 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
5484 _bfd_new_bfd.
5485
5486 2002-05-03 H.J. Lu (hjl@gnu.org)
5487
5488 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
5489 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
5490 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
5491 to hide a global symbol.
5492 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
5493 forced_local to true.
5494
5495 2002-05-02 Richard Henderson <rth@redhat.com>
5496
5497 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
5498 vs SHN_UNDEF to zero.
5499
5500 2002-05-02 Alan Modra <amodra@bigpond.net.au>
5501
5502 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
5503 16 bit reloc.
5504 <R_PPC64_SECTOFF_DS>: Likewise.
5505 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5506 SECTOFF reloc.
5507 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
5508 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
5509 SECTOFF reloc.
5510
5511 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
5512 (ppc64_elf_ha_reloc): New function.
5513 (ppc64_elf_brtaken_reloc): New function.
5514 (ppc64_elf_sectoff_reloc): New function.
5515 (ppc64_elf_sectoff_ha_reloc): New function.
5516 (ppc64_elf_toc_reloc): New function.
5517 (ppc64_elf_toc_ha_reloc): New function.
5518 (ppc64_elf_toc64_reloc): New function.
5519 (ppc64_elf_unhandled_reloc): New function.
5520 (ppc64_elf_howto_raw): Use the above.
5521 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
5522 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
5523 <R_PPC64_SECTOFF_DS>: Likewise.
5524 (IS_ABSOLUTE_RELOC): Update.
5525 (struct ppc_link_hash_table): Add have_undefweak.
5526 (ppc64_elf_link_hash_table_create): Init.
5527 (func_desc_adjust): Set have_undefweak.
5528 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
5529 add the .sfpr blr when have_undefweak.
5530 (ppc64_elf_setup_section_lists): Check hash table flavour.
5531 (ppc64_elf_next_input_section): Move output_section->owner test to
5532 ppc64elf.em.
5533 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
5534 and relocatable test. Return TOCstart and don't set elf_gp.
5535 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
5536 offset calculation. Add assert on weak sym branch tweaks.
5537 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
5538 (ppc64_elf_toc): Declare.
5539 (ppc64_elf_next_input_section): Update.
5540
5541 2002-05-01 Alan Modra <amodra@bigpond.net.au>
5542
5543 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
5544 file_name.
5545
5546 2002-05-01 Alan Modra <amodra@bigpond.net.au>
5547
5548 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
5549 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
5550 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
5551 call branches. Correct undefined weak destination.
5552 (ppc64_elf_func_desc_adjust): Always create at least one blr in
5553 .sfpr, and correct case where either only savef* or restf* is
5554 needed.
5555
5556 Long branch stubs, multiple stub sections.
5557 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
5558 (ppc64_elf_next_input_section): Declare.
5559 * elf64-ppc.c: Move linker-only prototypes.
5560 (STUB_SUFFIX): Define.
5561 (enum ppc_stub_type): New.
5562 (struct ppc_stub_hash_entry): New.
5563 (struct ppc_branch_hash_entry): New.
5564 (struct ppc_link_hash_entry): Add stub_cache, oh.
5565 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
5566 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
5567 Rename plt_overflow to stub_error.
5568 (ppc_stub_hash_lookup): Define.
5569 (ppc_branch_hash_lookup): Define.
5570 (stub_hash_newfunc): New function.
5571 (branch_hash_newfunc): New function.
5572 (link_hash_newfunc): Init new fields.
5573 (ppc64_elf_link_hash_table_create): Likewise.
5574 (ppc64_elf_link_hash_table_free): New function.
5575 (ppc_stub_name): New function.
5576 (ppc_get_stub_entry): New function.
5577 (ppc_add_stub): New function.
5578 (create_linkage_sections): Use bfd_make_section_anyway. Create
5579 .branch_lt and .rela.branch_lt sections. Don't create .stub.
5580 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
5581 and set up for plt call stubs. Link func and func desc syms.
5582 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
5583 (func_desc_adjust): Avoid hash lookup when func desc sym available
5584 via shortcut, and set links when processing.
5585 (ppc64_elf_hide_symbol): Likewise.
5586 (allocate_dynrelocs): Don't allocate stub section here.
5587 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
5588 Remove sstub code.
5589 (ppc_type_of_stub): New function.
5590 (build_one_stub): Delete.
5591 (ppc_build_one_stub): New function.
5592 (ppc_size_one_stub): New function.
5593 (ppc64_elf_setup_section_lists): New function.
5594 (ppc64_elf_next_input_section): New function.
5595 (group_sections): New function.
5596 (get_local_syms): New function.
5597 (ppc64_elf_size_stubs): Rewrite.
5598 (ppc64_elf_build_stubs): Rewrite.
5599 (ppc64_elf_relocate_section): Look up stub entry for REL24
5600 relocs. Don't propagate REL14* to dynamic objects. Look for long
5601 branch stubs if REL14* or REL24 relocs won't reach.
5602 (bfd_elf64_bfd_link_hash_table_free): Define.
5603
5604 2002-04-30 Mark Mitchell <mark@codesourcery.com>
5605
5606 * config.bfd: Add support for powerpc-*-windiss.
5607
5608 2002-04-30 Tom Rix <trix@redhat.com>
5609
5610 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
5611 symbol names into the hash table.
5612
5613 2002-04-28 Tom Rix <trix@redhat.com>
5614
5615 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
5616 calulating relocations.
5617 (xcoff_complain_overflow) : Function table for relocation errors.
5618 (xcoff_ppc_relocate_section): Use relocation and complain function
5619 tables.
5620 (xcoff_complain_overflow_unsigned_func): New complain function.
5621 (xcoff_complain_overflow_signed_func): Same.
5622 (xcoff_complain_overflow_bitfield_func): Same.
5623 (xcoff_complain_overflow_dont_func): Same.
5624 (xcoff_reloc_type_crel): New recot function.
5625 (xcoff_reloc_type_br): Same.
5626 (xcoff_reloc_type_ba): Same.
5627 (xcoff_reloc_type_toc): Same.
5628 (xcoff_reloc_type_rel): Same.
5629 (xcoff_reloc_type_neg): Same.
5630 (xcoff_reloc_type_pos): Same.
5631 (xcoff_reloc_type_fail): Same.
5632 (xcoff_reloc_type_noop): Same.
5633 * libxcoff.h : Declare common parts for xcoff64.
5634 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
5635 and complain function tables.
5636
5637 2002-04-28 Alan Modra <amodra@bigpond.net.au>
5638
5639 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
5640 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
5641
5642 2002-04-26 Alan Modra <amodra@bigpond.net.au>
5643
5644 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
5645 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
5646
5647 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
5648 same as the output before calling elf_link_input_bfd.
5649
5650 * coffcode.h (coff_compute_section_file_positions): Set
5651 section_tail after shuffling section list.
5652
5653 2002-04-24 Christian Groessler <chris@groessler.org>
5654
5655 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
5656 addresses are 23bit with a special layout, not plain 32bit
5657 values. Prevent relocation of immediate values.
5658
5659 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
5660
5661 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
5662 MIPS-16 ASE flags are set, print something to indicate that.
5663
5664 2002-04-23 Alan Modra <amodra@bigpond.net.au>
5665
5666 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
5667 under which a plt call stub is used.
5668 (final_link_relocate): Similarly.
5669 (allocate_plt_static): Clear h-plabel except when plt entry is
5670 exclusively used for a plabel.
5671 (allocate_dynrelocs): Use the above to simplify plt sizing.
5672 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
5673 (elf32_hppa_link_hash_table_create): Init.
5674 (BL22_RP): Define.
5675 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
5676 (elf32_hppa_check_relocs): Set has_22bit_branch.
5677
5678 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
5679 (final_link_relocate): Likewise.
5680
5681 2002-04-22 Jakub Jelinek <jakub@redhat.com>
5682
5683 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
5684 search table if some FDE is DW_EH_PE_aligned encoded either.
5685 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
5686
5687 2002-04-22 Richard Smith <richard@ex-parrot.com>
5688 Jakub Jelinek <jakub@redhat.com>
5689
5690 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
5691 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
5692 encoded personality.
5693 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
5694 for CIE/FDE removal.
5695
5696 2002-04-20 Tom Rix <trix@redhat.com>
5697
5698 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
5699
5700 2002-04-20 Alan Modra <amodra@bigpond.net.au>
5701
5702 * archures.c (bfd_lookup_arch): Move the list order comment..
5703 (struct bfd_arch_info): ..to where it belongs.
5704 * bfd-in2.h: Regenerate.
5705
5706 * archures.c (bfd_lookup_arch): Add comment on list order.
5707 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
5708 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
5709 is always at head of list.
5710
5711 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5712
5713 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
5714 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
5715 definition of these functions for ARM_WINCE builds as they are
5716 not used.
5717 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
5718 for ARM_WINCE builds.
5719
5720 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
5721
5722 * coff-arm.c (bfd_arm_process_before_allocation):
5723
5724 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
5725
5726 * cpu-sh.c (scan_mach): Delete.
5727 (arch_info_struct): Replace scan_mach with bfd_default_scan.
5728 (bfd_sh_arch): Likewise.
5729
5730 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
5731
5732 * ihex.c (ihex_write_object_contents): Fix check for records
5733 crossing 64K boundaries.
5734
5735 2002-04-16 Alan Modra <amodra@bigpond.net.au>
5736
5737 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
5738 type rather than just assuming entries are ELF.
5739 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5740 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5741 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
5742 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
5743 rather than elf_link_hash_entry.
5744
5745 2002-04-15 Richard Henderson <rth@redhat.com>
5746
5747 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
5748 n32 binaries.
5749
5750 2002-04-15 Michael Snyder <msnyder@redhat.com>
5751
5752 * opncls.c (bfd_close): Write contents if writeable.
5753 Minor formatting tidy-ups.
5754
5755 2002-04-15 Alan Modra <amodra@bigpond.net.au>
5756
5757 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
5758
5759 2002-04-12 Michael Snyder <msnyder@redhat.com>
5760
5761 * bfd-in.h (bfd_get_section_lma): New access macro.
5762 Minor white-space fix-up.
5763
5764 2002-04-12 Alan Modra <amodra@bigpond.net.au>
5765
5766 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
5767 header pad.
5768
5769 2002-04-09 DJ Delorie <dj@redhat.com>
5770
5771 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
5772
5773 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
5774
5775 * coffcode.h (coff_read_word): New.
5776 (coff_compute_checksum): New.
5777 (coff_apply_checksum): New.
5778 (coff_write_object_contents): Call coff_apply_checksum () to
5779 apply checksum to PE image.
5780
5781 2002-04-08 Randolph Chung <tausq@debian.org>
5782
5783 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
5784 (elf32_hppa_final_link): Split out sorting logic to..
5785 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
5786 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
5787
5788 2002-04-07 Andrew Cagney <ac131313@redhat.com>
5789
5790 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
5791 pattern.
5792 * configure: Re-generate.
5793
5794 2002-04-07 Andrew Cagney <ac131313@redhat.com>
5795
5796 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
5797 is greater or equal to 4.3.3.
5798 * configure: Regenerate.
5799 Fix PR gdb/344.
5800
5801 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
5802
5803 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
5804 R_CRIS_32_PCREL>: Fix typo in name.
5805 (cris_elf_check_relocs): Always create .rela.got here when
5806 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
5807 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
5808 assume it's created.
5809
5810 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
5811
5812 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
5813 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
5814 define.
5815 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
5816 * bfd.c (bfd_link_hash_table_free): Define.
5817 * binary.c (binary_bfd_link_hash_table_free): Define.
5818 * bout.c (b_out_bfd_link_hash_table_free): Define.
5819 * coff-rs6000.c (rs6000coff_vec): Include
5820 _bfd_generic_link_hash_table_free.
5821 (pmac_xcoff_vec): Likewise.
5822 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5823 (aix5coff64_vec): Likewise.
5824 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
5825 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
5826 (bfd_elf32_bfd_link_hash_table_free): Define.
5827 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
5828 (bfd_elf32_bfd_link_hash_table_free): Define.
5829 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
5830 define.
5831 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
5832 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
5833 * ieee.c (ieee_bfd_link_hash_table_free): Define.
5834 * ihex.c (ihex_bfd_link_hash_table_free): Define.
5835 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
5836 (_bfd_generic_link_hash_table_free): Add prototype.
5837 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
5838 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
5839 * linker.c (_bfd_generic_link_hash_table_free): New function.
5840 * mmo.c (mmo_bfd_link_hash_table_free): Define.
5841 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
5842 * oasys.c (oasys_bfd_link_hash_table_free): Define.
5843 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
5844 * som.c (som_bfd_link_hash_table_free): Define.
5845 * srec.c (srec_bfd_link_hash_table_free): Define.
5846 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
5847 * versados.c (versados_bfd_link_hash_table_free): Define.
5848 * vms.c (vms_bfd_link_hash_table_free): New function.
5849 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
5850
5851 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
5852 instead of bfd_alloc.
5853 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
5854 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
5855 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
5856 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
5857 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
5858 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
5859 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
5860 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
5861 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
5862 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
5863 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
5864 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
5865 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
5866 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
5867 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
5868 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
5869 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
5870 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
5871 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
5872 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
5873 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
5874 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
5875 * m68klinux.c (linux_link_hash_table_create): Likewise.
5876 * sparclinux.c (linux_link_hash_table_create): Likewise.
5877 * sunos.c (sunos_link_hash_table_create): Likewise.
5878 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
5879
5880 * targets.c: Add _bfd_link_hash_table_free to xvec.
5881
5882 * bfd-in2.h: Regenerate.
5883 * libbfd.h: Regenerate.
5884 * libcoff.h: Regenerate.
5885
5886 2002-04-04 Alan Modra <amodra@bigpond.net.au>
5887
5888 * dep-in.sed: Cope with absolute paths.
5889 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
5890 Run "make dep-am".
5891 * Makefile.in: Regenerate.
5892 * coff-arm.c: Fix copyright date.
5893 * cpu-h8300.c: Likewise.
5894 * cpu-i370.c: Likewise.
5895 * cpu-s390.c: Likewise.
5896 * cpu-mips.c: Likewise.
5897 * po/SRC-POTFILES.in: Regenerate.
5898
5899 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5900
5901 * Makefile.am: Add elfxx-mips.c to the known backends.
5902 (elf32-mips.lo): remove dependency to coff/external.h.
5903 * Makefile.in: Regenerate.
5904 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
5905 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
5906 accordingly.
5907 * configure: Regenerate.
5908 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
5909 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
5910 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
5911 MIPS specific backend functions.
5912 * elf32-mips.c: Moved most code to elfxx-mips.c.
5913 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
5914 static.
5915 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
5916 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
5917 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
5918 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
5919 interface to allow selection of the right REL or RELA howto table.
5920 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
5921 static. Let it refuse n32 objects.
5922 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
5923 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
5924 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
5925 (elf32_mips_ignore_discarded_relocs): Rename from
5926 _bfd_elf32_mips_ignore_discarded_relocs.
5927 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
5928 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
5929 (elf_mips_howto_table_rela): Remove.
5930 * elf64-mips.c: Moved most code to elfxx-mips.c.
5931 (bfd_elf64_bfd_reloc_type_lookup): Make static.
5932 (mips_elf64_rtype_to_howto): New function.
5933 (mips_elf64_object_p): Likewise.
5934 (elf64_mips_irix_compat): Likewise.
5935 * elfxx-mips.c: New file containing common code merged together from
5936 elf32-mips.c and elf64-mips.c.
5937 * elfxx-mips.h: New file containing MIPS specific prototypes from
5938 elf-bfd.h.
5939 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
5940 elf_backend_mips_rtype_to_howto.
5941
5942 2002-04-04 Alan Modra <amodra@bigpond.net.au>
5943
5944 * srec.c (MAXCHUNK, Chunk): Revise comments.
5945 (srec_write_record): Correct buffer size.
5946 (srec_write_header): Do without intermediate buffer.
5947 (srec_write_section): Validate Chunk.
5948 (srec_write_terminator): Pass NULL instead of dummy buffer.
5949 (srec_write_symbols): Pass file and symbol names directly to
5950 bfd_bwrite so sprintf won't overflow buffer.
5951
5952 2002-04-03 Jakub Jelinek <jakub@redhat.com>
5953
5954 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
5955 PC relative relocs against hidden symbols.
5956 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5957
5958 2002-04-03 Alan Modra <amodra@bigpond.net.au>
5959
5960 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
5961 LMAs, loop over segments until p_vaddr and p_memsz specify an
5962 extent enclosing the section.
5963
5964 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
5965
5966 * ihex.c (ihex_write_object_contents): Do not allow records to
5967 cross a 64K boundary - wrap if necessary.
5968
5969 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
5970
5971 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
5972 which caused the returned LWP ID to always be 0.
5973
5974 2002-04-01 Richard Henderson <rth@redhat.com>
5975
5976 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5977 (elf32_sparc_relocate_section): Use it to figure out when to
5978 initialize .got entries.
5979 * elf64-sparc.c: Similarly.
5980
5981 2002-03-28 Alan Modra <amodra@bigpond.net.au>
5982
5983 * linker.c (link_action): Ignore duplicate warning syms.
5984 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
5985 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
5986 (elf_adjust_dynamic_symbol): Likewise.
5987 (elf_export_symbol): Likewise.
5988 (elf_link_find_version_dependencies): Likewise.
5989 (elf_link_assign_sym_version): Likewise.
5990 (elf_link_sec_merge_syms): Likewise.
5991 (elf_link_output_extsym): Likewise.
5992 (elf_gc_sweep_symbol): Likewise.
5993 (elf_gc_propagate_vtable_entries_used): Likewise.
5994 (elf_gc_smash_unused_vtentry_relocs): Likewise.
5995 (elf_gc_allocate_got_offsets): Likewise.
5996 (elf_collect_hash_codes): Likewise.
5997 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
5998 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
5999 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6000 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
6001 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
6002 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
6003 (elf_cris_discard_excess_dso_dynamics): Likewise.
6004 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
6005 (mark_PIC_calls): Likewise.
6006 (allocate_plt_static): Likewise.
6007 (allocate_dynrelocs): Likewise.
6008 (readonly_dynrelocs): Likewise.
6009 * elf32-i386.c (allocate_dynrelocs): Likewise.
6010 (readonly_dynrelocs): Likewise.
6011 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
6012 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
6013 * elf32-mips.c (mips_elf_output_extsym): Likewise.
6014 (mips_elf_sort_hash_table_f): Likewise.
6015 (mips_elf_check_mips16_stubs): Likewise.
6016 * elf32-s390.c (allocate_dynrelocs): Likewise.
6017 (readonly_dynrelocs): Likewise.
6018 * elf32-sh.c (sh_elf_discard_copies): Likewise.
6019 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
6020 (xstormy16_relax_plt_realloc): Likewise.
6021 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6022 (elf64_alpha_output_extsym): Likewise.
6023 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
6024 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
6025 (mips_elf64_check_mips16_stubs): Likewise.
6026 (mips_elf64_output_extsym): Likewise.
6027 * elf64-ppc.c (func_desc_adjust): Likewise.
6028 (allocate_dynrelocs): Likewise.
6029 (readonly_dynrelocs): Likewise.
6030 * elf64-s390.c (allocate_dynrelocs): Likewise.
6031 (readonly_dynrelocs): Likewise.
6032 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
6033 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
6034 (readonly_dynrelocs): Likewise.
6035 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
6036 * aoutx.h (aout_link_write_other_symbol): Likewise.
6037 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
6038 (_bfd_coff_write_global_sym): Likewise.
6039 * i386linux.c (linux_tally_symbols): Likewise.
6040 * m68klinux.c (linux_tally_symbols): Likewise.
6041 * sparclinux.c (linux_tally_symbols): Likewise.
6042 * pdp11.c (aout_link_write_other_symbol): Likewise.
6043 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
6044 * xcofflink.c (xcoff_build_ldsyms): Likewise.
6045 (xcoff_write_global_symbol): Likewise.
6046
6047 * cofflink.c (_bfd_coff_final_link): Formatting.
6048 * cpu-mips.c (mips_compatible): Make static, prototype.
6049 * elf32-i386.c (elf_i386_check_relocs): Formatting.
6050 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
6051 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
6052 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
6053 (mips_elf64_final_link): Likewise.
6054 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
6055 prototype.
6056
6057 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
6058
6059 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
6060 (SWAP_OUT_RELOC_OFFSET): Define.
6061
6062 2002-03-27 Gregory Steuck <greg@nest.cx>
6063
6064 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
6065 terminating NULL if empty symbol table.
6066 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
6067
6068 2002-03-26 H.J. Lu (hjl@gnu.org)
6069
6070 * elflink.h (elf_link_input_bfd): Revert the last change since
6071 the gcc exception handling isn't fixed yet.
6072
6073 2002-03-26 H.J. Lu (hjl@gnu.org)
6074
6075 * elflink.h (elf_link_input_bfd): Complain about relocations
6076 against local symbols in discarded sections.
6077
6078 2002-03-26 Alan Modra <amodra@bigpond.net.au>
6079
6080 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
6081
6082 2002-03-23 Alan Modra <amodra@bigpond.net.au>
6083
6084 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
6085 section file offset for !SEC_LOAD sections.
6086
6087 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
6088
6089 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
6090 <case R_ARM_GOT>): Handle relocations to Thumb functions.
6091
6092 2002-03-21 Alan Modra <amodra@bigpond.net.au>
6093
6094 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
6095 Whitespace changes.
6096 * archive.c: Update copyright date.
6097 * bfd-in2.h: Regenerate.
6098 * libbfd.h: Regenerate.
6099 * Makefile.am: Run "make dep-am"
6100 * Makefile.in: Regenerate.
6101 * po/SRC-POTFILES.in: Regenerate.
6102
6103 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
6104
6105 * dwarf2.c (struct funcinfo): Move up.
6106 (lookup_address_in_function_table): New argument function_ptr.
6107 Set it.
6108 (lookup_address_in_line_table): New argument function. If function
6109 is non-NULL, use it to handle ``addr'' before the first line note of
6110 the function.
6111 (comp_unit_find_nearest_line): Update and swap calls to
6112 lookup_address_in_function_table and lookup_address_in_line_table.
6113 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
6114 N_SLINE encountered if we see an N_FUN before any N_SLINE.
6115
6116 2002-03-20 Tom Rix <trix@redhat.com>
6117
6118 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
6119 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
6120 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
6121
6122 2002-03-19 Tom Rix <trix@redhat.com>
6123
6124 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
6125 dynamic objects in archives.
6126
6127 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
6128
6129 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
6130 STT_NOTYPE symbols to STT_OBJECT.
6131
6132 2002-03-18 Jan Hubicka <jh@suse.cz>
6133
6134 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
6135
6136 2002-03-18 Tom Rix <trix@redhat.com>
6137
6138 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
6139 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
6140 * coff-rs6000 (do_pad) : New function for archive padding.
6141 (do_copy) : New function for object file copying in archives.
6142 (do_shared_object_padding) : New function for padding shared
6143 objects to their text section alignment in archives.
6144 (bfd_xcoff_ar_achive_set_magic) : Stub.
6145 (xcoff_write_armap_big) : Use do_copy and do_pad.
6146 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
6147 do_copy and do_pad.
6148 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
6149 bfd_xcoff_magic_number.
6150 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
6151 fop.
6152 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
6153 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
6154 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
6155 * rs6000-core.c : Update copyright date.
6156 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
6157 csectpp.
6158 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
6159 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
6160 (coff_set_flags) : Use bfd_xcoff_magic_number.
6161 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
6162 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
6163 * Makefile.am : Same.
6164 * config.bfd : Same.
6165 * targets.c : Same.
6166 * configure : Regnerate.
6167 * Makefile.in : Same.
6168 * bfd-in2.h : Same.
6169
6170 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
6171
6172 * po/fr.po: Updated version.
6173
6174 2002-03-18 Alan Modra <amodra@bigpond.net.au>
6175
6176 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
6177 * libbfd.h: Regenerate.
6178 * archive.c (coff_write_armap): Pass on failures from
6179 bfd_write_bigendian_4byte_int.
6180
6181 2002-03-14 H.J. Lu <hjl@gnu.org>
6182
6183 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
6184 error to bfd_error_nonrepresentable_section for reinit_array
6185 section in DSO.
6186
6187 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6188
6189 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
6190 OR it in rather than replacing previously selected flags.
6191
6192 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
6193 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
6194
6195 2002-03-14 Alan Modra <amodra@bigpond.net.au>
6196
6197 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
6198 (N): Use the above.
6199 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
6200 ensure reloc size matches before calling elf_link_input_bfd.
6201 Add an assert to check reloc size when counting output relocs.
6202
6203 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
6204
6205 * mmo.c (mmo_get_loc): Return NULL rather than false.
6206
6207 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
6208
6209 * po/fr.po: Updated version.
6210
6211 2002-03-13 Alan Modra <amodra@bigpond.net.au>
6212
6213 * archures.c (bfd_default_compatible): Test bits_per_word.
6214 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
6215 bfd_default_compatible.
6216 * cpu-i370.c (i370_compatible): Likewise.
6217 * cpu-sparc.c (sparc_compatible): Likewise.
6218 * cpu-h8300.c (compatible): Test in->arch == out->arch.
6219
6220 * elflink.h: Formatting fixes.
6221 (elf_link_output_extsym): Merge undefined and undef weak cases.
6222
6223 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
6224 when word size of input matches output word size.
6225
6226 2002-03-12 Andreas Jaeger <aj@suse.de>
6227
6228 * cpu-i386.c (i386_compatible): New. Use it instead of
6229 bfd_default_compatible.
6230
6231 2002-03-07 H.J. Lu (hjl@gnu.org)
6232
6233 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
6234 as the type for bfd_reloc_val.
6235
6236 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
6237
6238 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
6239 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
6240 (elf_hppa_final_link_relocate): Correct relocations for indirect
6241 references to local data through the DLT. Fix .opd creation for
6242 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
6243 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
6244 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
6245 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6246 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
6247 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
6248 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
6249
6250 2002-03-05 Jakub Jelinek <jakub@redhat.com>
6251
6252 * merge.c (_bfd_merge_sections): Don't segfault if there
6253 is nothing to merge due to GC.
6254
6255 2002-03-05 Alan Modra <amodra@bigpond.net.au>
6256
6257 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
6258 symbols that have been forced local.
6259
6260 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
6261 to output forced local syms for non-shared link.
6262 (elf_link_output_extsym): Tweak condition for calling backend
6263 adjust_dynamic_symbol so that previous behaviour is kept.
6264 Whitespace changes throughout file.
6265
6266 2002-03-04 H.J. Lu <hjl@gnu.org>
6267
6268 * elf.c (bfd_section_from_shdr): Handle special sections,
6269 .init_array, .fini_array and .preinit_array.
6270 (elf_fake_sections): Likewise.
6271
6272 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
6273 DT entry only if the section is in output for .init_array,
6274 .fini_array and .preinit_array. Complain about .preinit_array
6275 section in DSO.
6276 (elf_bfd_final_link): Warn zero size for .init_array,
6277 .fini_array and .preinit_array sections.
6278
6279 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
6280 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
6281 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
6282 .preinit_array.
6283
6284 2002-03-04 Alan Modra <amodra@bigpond.net.au>
6285
6286 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
6287 * configure: Regenerate.
6288
6289 2002-03-02 Tom Rix <trix@redhat.com>
6290
6291 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
6292 symbolic equiv.
6293 * coff-rs6000.c (xcoff_howto_table): Same.
6294
6295 2002-03-01 David Mosberger <davidm@hpl.hp.com>
6296
6297 * elflink.h (size_dynamic_sections): If section named
6298 ".preinit_array" exists, create DT_PREINIT_ARRAY and
6299 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
6300 ".init_array" and ".fini_array".
6301 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
6302 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
6303 DT_FINI_ARRAY.
6304
6305 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
6306
6307 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
6308 dynsyms.
6309
6310 2002-02-25 Alan Modra <amodra@bigpond.net.au>
6311
6312 * elf64-hppa.h: Update copyright date.
6313
6314 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
6315 (ppc64_elf_relocate_section): Don't generate power4 style branch
6316 hints for *_BRTAKEN and *_BRNTAKEN relocs.
6317
6318 2002-02-22 Jakub Jelinek <jakub@redhat.com>
6319
6320 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
6321 last patch.
6322 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6323
6324 2002-02-21 Andreas Jaeger <aj@suse.de>
6325
6326 * elf64-x86-64.c: Major rework that introduces all recent changes
6327 to the x86-64 backend. Get a closer match to elf32-i386.
6328 (struct elf64_x86_64_dyn_relocs): Rename from
6329 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
6330 all users.
6331 (struct elf64_x86_64_link_hash_table): Add short cuts to some
6332 sections.
6333 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
6334 remove casts, initialize new hash members.
6335 (create_got_section): New.
6336 (elf64_x86_64_create_dynamic_sections): New.
6337 (elf64_x86_64_copy_indirect_symbol): New.
6338 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
6339 relocs, .got or .relgot here but do it in allocate_dynrelocs.
6340 Reference count possible .plt and .got entries. Don't test input
6341 section SEC_READONLY here to try to avoid copy relocs, and keep
6342 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
6343 DF_TEXTREL here. Delay setting of variables until needed. Cache
6344 pointer to "sreloc" section in elf_section_data. Tweak condition
6345 under which .got created. Report files with bad relocation
6346 section names.
6347 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
6348 Reference count possible .plt entries. Don't deallocate .got and
6349 .relgot space here.
6350 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
6351 do copy reloc processing for weakdefs. Remove redundant casts and
6352 aborts. Delay setting of vars until needed. Move creation of
6353 dynamic symbols and allocation of .plt and .rela.plt to
6354 allocate_dynrelocs. Replace BFD_ASSERT with abort.
6355 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6356 (allocate_dynrelocs): New.
6357 (readonly_dynrelocs): New.
6358 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
6359 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
6360 Zero out the dynamic allocated content space.
6361 (elf64_x86_64_discard_copies): Removed.
6362 (elf64_x86_64_relocate_section): Make use of dynamic section
6363 short-cuts. Localise vars, and delay setting. Better error
6364 reporting, replace BFD_ASSERT with abort. Check
6365 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
6366 regular object file and tread the weak definition as the normal
6367 one. Don't discard relocs for undefweak or undefined symbols and
6368 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
6369 relocs.
6370 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
6371 symbols that have been forced local. Use same test to decide if
6372 we can use a relative reloc for got as relocate_section. Expand
6373 SHN_UNDEF comment. Move expressions out of function calls.
6374 Replace BFD_ASSERT with abort.
6375 (bfd_elf64_bfd_final_link): Removed.
6376 (elf_backend_copy_indirect_symbol): Define.
6377
6378 2002-02-20 Tom Rix <trix@redhat.com>
6379
6380 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
6381 (_bfd_xcoff_reloc_type_lookup): Use it.
6382 * coff64-rs6000.c (xcoff64_howto_table): Same.
6383 (xcoff64_reloc_type_lookup): Same.
6384
6385 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
6386
6387 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
6388 little endian.
6389
6390 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
6391
6392 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
6393 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
6394 * bfd-in2.h: Regenerate.
6395 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
6396 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
6397 with "s390:64-bit".
6398 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
6399 (elf_s390_reloc_type_lookup): Likewise.
6400 (elf_s390_check_relocs): Likewise.
6401 (elf_s390_gc_sweep_hook): Likewise.
6402 (elf_s390_relocate_section): Likewise.
6403 (elf_s390_object_p): Use renamed architecture define.
6404 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
6405
6406 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
6407
6408 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
6409
6410 2002-02-19 Jakub Jelinek <jakub@redhat.com>
6411
6412 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
6413 absptr -> pcrel optimization for shared libs.
6414 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
6415 library cannot be converted to pcrel.
6416 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
6417 relative.
6418 * elf32-i386.c (elf_i386_relocate_section): If
6419 _bfd_elf_section_offset returned -2, skip, but make sure the
6420 relocation is installed.
6421 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
6422 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6423 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6424 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6425 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6426 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6427 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6428 * elf32-sh.c (sh_elf_relocate_section): Likewise.
6429 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6430 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6431 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6432 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
6433 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6434 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6435 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
6436 _bfd_elf_section_offset returning -2 the same way as -1.
6437 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
6438 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
6439 and BFD_ASSERT.
6440 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
6441
6442 2002-02-18 Tom Rix <trix@redhat.com>
6443
6444 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
6445 (bfd_xcoff_size_dynamic_sections): Same.
6446 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
6447 (bfd_xcoff_size_dynamic_sections): Same.
6448 * coff-rs6000.c (xcoff_generate_rtinit): Same.
6449 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
6450 * libxcoff.h (struct xcoff_backend_data_rec): Same.
6451 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
6452 * bfd-in2.h: Regenerate.
6453
6454 2002-02-18 Alan Modra <amodra@bigpond.net.au>
6455
6456 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
6457 (struct ppc_link_hash_table): Add sfpr.
6458 (ppc64_elf_link_hash_table_create): Init it.
6459 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
6460 .glink out to..
6461 (create_linkage_sections): ..here. Make .sfpr too.
6462 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
6463 dynobj early.
6464 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
6465 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
6466 ._restf* functions, and create as needed.
6467 (func_desc_adjust): Only force_local for shared libs.
6468
6469 2002-02-18 David O'Brien <obrien@FreeBSD.org>
6470
6471 * configure.in: Bump version number post 2.12 branching.
6472 * configure: Regenerate.
6473
6474 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
6475
6476 * mmo.c: Correct and improve comments.
6477 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
6478 zero-pad. Use input to fill up non-empty bfd buffer.
6479 (mmo_flush_chunk): New function.
6480 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
6481 changed. Don't emit location specifier if VMA is same as
6482 *LAST_VMAP after omitting leading zero contents. Call
6483 mmo_flush_chunk before emitting location specifier.
6484 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
6485 with mmo_write_loc_chunk calls.
6486 (mmo_internal_write_section): Call mmo_flush_chunk after
6487 mmo_write_chunk.
6488 (mmo_write_symbols_and_terminator): Move :Main to first position
6489 in symbol array. Add faked one if it does not exist if there are
6490 other symbols. Don't add it if there are no symbols at all. Move
6491 out test for value of :Main from symbol loop. Rename table
6492 fakemain to maintable and variable mainsym to fakemain.
6493
6494 2002-02-15 Richard Henderson <rth@redhat.com>
6495
6496 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
6497 section with no got matches any got. Simplify error generaion.
6498
6499 2002-02-15 Alan Modra <amodra@bigpond.net.au>
6500
6501 Support arbitrary length fill patterns.
6502 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
6503 (_bfd_default_link_order): Remove bfd_fill_link_order code.
6504 Call default_data_link_order.
6505 (default_fill_link_order): Delete.
6506 (default_data_link_order): New function.
6507 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
6508 of bfd_fill_link_order with bfd_data_link_order.
6509 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
6510 * elf64-mips.c (mips_elf64_final_link): Likewise.
6511
6512 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
6513 Correct value returned in "end" for "0x<non-hex>".
6514
6515 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
6516
6517 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
6518 (scan): Test against 'mach' field in info structure.
6519
6520 2002-02-14 Alan Modra <amodra@bigpond.net.au>
6521
6522 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
6523
6524 2002-02-14 Matt Fredette <fredette@netbsd.org>
6525
6526 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
6527 EF_M68000.
6528
6529 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
6530
6531 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
6532 non-zero physical addresses when adjusting the LMAs of new
6533 sections.
6534
6535 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6536
6537 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
6538 from _bfd_elf_hppa_gen_reloc_type.
6539 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
6540 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
6541 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
6542 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
6543
6544 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
6545
6546 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
6547 loading its contents if there's nothing to do in it.
6548
6549 2002-02-12 Alan Modra <amodra@bigpond.net.au>
6550
6551 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
6552 64k boundary.
6553
6554 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
6555 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
6556 (ppc64_elf_finish_dynamic_sections): Set values for them.
6557
6558 2002-02-11 Michael Snyder <msnyder@redhat.com>
6559
6560 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
6561 * elf.c (elfcore_grok_pstatus): Add prototype.
6562 (elfcore_grok_lwpstatus): Add prototype.
6563 (elfcore_write_lwpstatus): New function.
6564 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
6565
6566 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
6567
6568 * elf32-sh.c: Added missing prototypes.
6569 * elf32-sh64.c: Likewise.
6570 (sh_elf_align_loads): Mark unused args as such.
6571 * elf64-sh64.c: Added missing prototypes.
6572 (struct elf_sh64_link_hash_entry): Fix typo.
6573 (sh_elf64_relocate_section): Fix info argument passed to
6574 _bfd_elf_section_offset.
6575
6576 2002-02-11 Alan Modra <amodra@bigpond.net.au>
6577
6578 * Makefile.am: "make dep-am".
6579 * Makefile.in: Regenerate.
6580 * aclocal.m4: Regenerate.
6581 * config.in: Regenerate.
6582 * configure: Regenerate.
6583
6584 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
6585
6586 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
6587 variable warnings.
6588 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
6589 comparison warning.
6590 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
6591 cast warnings for the common case.
6592
6593 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
6594
6595 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
6596 vectors.
6597 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
6598 vectors.
6599
6600 2002-02-09 Richard Henderson <rth@redhat.com>
6601
6602 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
6603 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
6604 (elf64_alpha_relocate_section): Likewise.
6605 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
6606 * bfd-in2.h, libbfd.h: Rebuild.
6607
6608 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
6609
6610 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
6611 that base-plus-offset reloc accounting is consistent.
6612 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
6613 up to date for undefined symbols.
6614
6615 2002-02-08 Eric Christopher <echristo@redhat.com>
6616
6617 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
6618
6619 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
6620 sections for the O32 ABI.
6621
6622 2002-02-08 Chris Demetriou <cgd@broadcom.com>
6623
6624 * elf32-arm.h: Fix formatting of _("...").
6625 * elf32-d10v.c: Likewise.
6626 * elf32-m68k.c: Likewise.
6627 * elf32-mips.c: Likewise.
6628
6629 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
6630
6631 * coff-or32.c: Fix compile time warning messages.
6632
6633 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
6634
6635 Contribute sh64-elf.
6636 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
6637 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
6638 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
6639 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
6640 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
6641 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
6642 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
6643 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
6644 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
6645 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
6646 New relocs.
6647 * libbfd.h, bfd-in2.h: Rebuilt.
6648 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
6649 (sh_reloc_map): Map them.
6650 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
6651 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
6652 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
6653 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
6654 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
6655 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
6656 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
6657 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
6658 datalabel_got_offset.
6659 (sh_elf_link_hash_newfunc): Initialize it.
6660 (sh_elf_relocate_section): Augment the scope of
6661 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
6662 GOT and GOTOFF handling to new SHmedia relocation types. Support
6663 GOT_BIAS.
6664 (sh_elf_check_relocs): Likewise.
6665 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
6666 PLT entries using movi_shori_putval. Support GOT_BIAS.
6667 (sh_elf_finish_dynamic_sections): Likewise.
6668 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
6669 relocation, it's now done by the caller.
6670 (GOT_BIAS): New.
6671 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
6672 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
6673 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
6674 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
6675 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
6676 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
6677 sh64_elf64_hash_table): New.
6678 (sh_elf64_howto_table): Introduce new relocs.
6679 (sh_elf64_info_to_howto): Accept new PIC relocs.
6680 (sh_elf64_relocate_section): Augment the scope of
6681 seen_stt_datalabel. Support new PIC relocs.
6682 (sh_elf64_check_relocs): Support new PIC relocs.
6683 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
6684 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
6685 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
6686 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
6687 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
6688 movi_shori_putval, movi_3shori_putval,
6689 sh64_elf64_create_dynamic_sections,
6690 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
6691 sh64_elf64_size_dynamic_sections,
6692 sh64_elf64_finish_dynamic_symbol,
6693 sh64_elf64_finish_dynamic_sections): New.
6694 (elf_backend_create_dynamic-sections,
6695 bfd_elf64_bfd_link_hash_table_create,
6696 elf_backend_adjust_dynamic_symbol,
6697 elf_backend_size_dynamic_sections,
6698 elf_backend_finish_dynamic_symbol,
6699 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
6700 elf_backend_plt_readonly, elf_backend_want_plt_sym,
6701 elf_backend_got_header_size, elf_backend_plt_header_size):
6702 Define.
6703 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
6704 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
6705 match official numbers and names; moved unmaching ones to the
6706 range 0xf2-0xff.
6707 * elf32-sh64.c, elf64-sh64.c: Likewise.
6708 2001-03-12 DJ Delorie <dj@redhat.com>
6709 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
6710 sections.
6711 2001-03-12 DJ Delorie <dj@redhat.com>
6712 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
6713 be aligned.
6714 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
6715 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
6716 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
6717 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
6718 .cranges section with SEC_SORT_ENTRIES set.
6719 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
6720 incoming sorted .cranges section.
6721 (sh64_bfd_elf_copy_private_section_data): New.
6722 (sh64_elf_final_write_processing): Only sort .cranges and modify
6723 start address if called by linker.
6724 2001-01-08 Ben Elliston <bje@redhat.com>
6725 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
6726 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
6727 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
6728 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6729 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
6730 line. Add comments before all entries.
6731 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
6732 comment.
6733 (sh_elf64_reloc): Correct head comment.
6734 (sh_elf64_relocate_section): Correct spacing.
6735 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
6736 instead call reloc_dangerous callback.
6737 <case R_SH_SHMEDIA_CODE>: New case.
6738 (sh_elf64_gc_mark_hook): Correct spacing.
6739 (sh_elf64_check_relocs): Ditto.
6740 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
6741 New case.
6742 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
6743 functions.
6744 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
6745 clarify describing comment. Add comments before all entries.
6746 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
6747 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
6748 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
6749 Sort .cranges section in final link. Prepare to set bit 0 on
6750 entry address.
6751 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
6752 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
6753 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
6754 .cranges section.
6755 (sh64_backend_section_from_shdr): New, to recognize
6756 SHT_SH5_CR_SORTED on incoming .cranges section.
6757 (elf_backend_section_from_shdr): Define.
6758 (sh64_elf_final_write_processing): Sort outgoing .cranges
6759 section. (New, temporarily disabled:) Set bit 0 on entry address
6760 according to ISA type.
6761 (sh64_find_section_for_address): New.
6762 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
6763 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
6764 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
6765 bfd_malloc, not xmalloc.
6766 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
6767 global.
6768 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
6769 temporarily disabled) setting bit 0 on entry address.
6770 (elf_backend_final_write_processing): Define.
6771 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
6772 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
6773 be a proper relocation for PTA and PTB rather than a marker.
6774 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
6775 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
6776 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
6777 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
6778 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
6779 Zero src_mask.
6780 * elf64-sh64.c: Ditto.
6781 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
6782 * elf32-sh64.c: Include opcodes/sh64-opc.h
6783 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
6784 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
6785 parameters. No unused parameters. Caller changed.
6786 <case R_SH_PT_16>: New case.
6787 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
6788 * Makefile.in: Regenerate.
6789 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
6790 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
6791 all code sections.
6792 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6793 (sh64_elf_merge_private_data): Ditto.
6794 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
6795 to access stored section flags.
6796 (sh64_elf_final_write_processing): Return immediately unless
6797 called by linker. Use sh64_elf_section_data (cranges) to get size
6798 of linker-generated cranges entries.
6799 (sh64_elf_copy_private_data): Add missing "return true".
6800 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
6801 (sh_elf64_merge_private_data): Ditto.
6802 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
6803 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
6804 elf64-sh64.c:sh64_elf_fake_sections.
6805 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
6806 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
6807 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
6808 (sh64_elf_final_write_processing): New.
6809 (elf_backend_final_write_processing): Define.
6810 (sh64_elf_fake_sections): Get header flags from tdata field.
6811 (sh64_elf_copy_private_data): Do not call
6812 sh64_elf_copy_private_data_internal, just copy e_flags field.
6813 (sh64_elf_merge_private_data): Do not call
6814 sh64_elf_copy_private_data_internal.
6815 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
6816 Remove EF_SH64_ABI64, let ELF size make difference.
6817 Remove SH64-specific BFD section flag.
6818 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
6819 containing SHmedia through elf_section_data (asect)->tdata
6820 non-zero, not using a BFD section flag.
6821 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
6822 (sh64_elf_merge_private_data): Similar.
6823 (elf_backend_section_flags): Don't define.
6824 (sh64_elf_backend_section_flags): Delete.
6825 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
6826 not EF_SH64_ABI64.
6827 (sh_elf64_merge_private_data): Similar.
6828 * section.c (Section flags definitions): Don't define
6829 SEC_SH_ISA_SHMEDIA.
6830 (bfd-in2.h): Regenerate.
6831 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
6832 Make DataLabel references work with partial linking.
6833 * elf32-sh64.c: Fix formatting.
6834 (sh64_elf_link_output_symbol_hook): New.
6835 (elf_backend_link_output_symbol_hook): Define to
6836 sh64_elf_link_output_symbol_hook.
6837 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
6838 undefined if partial linking. Adjust sanity check.
6839 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
6840 (elf_backend_link_output_symbol_hook): Define to
6841 sh64_elf64_link_output_symbol_hook.
6842 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
6843 undefined if partial linking. Adjust sanity check.
6844 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
6845 Implement semantics for inter-file DataLabel references.
6846 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
6847 (sh64_elf64_add_symbol_hook): New.
6848 (sh_elf64_relocate_section): If passing an indirect symbol with
6849 st_type STT_DATALABEL on the way to a symbol with st_other
6850 STO_SH5_ISA32, do not bitor 1 to the relocation.
6851 (elf_backend_add_symbol_hook): Define to
6852 sh64_elf64_add_symbol_hook.
6853 * elf64-sh32.c: Tweak comments.
6854 (DATALABEL_SUFFIX): Define.
6855 (sh64_elf_add_symbol_hook): New.
6856 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
6857 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
6858 symbol with st_type STT_DATALABEL on the way to a symbol with
6859 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
6860 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
6861 Pass through STT_DATALABEL.
6862 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
6863 (elf_backend_get_symbol_type): Define.
6864 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
6865 (elf_backend_get_symbol_type): Define.
6866 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
6867 * elf32-sh64.c: Tweak comments.
6868 (sh64_elf_copy_private_data_internal): Add prototype.
6869 (bfd_elf32_bfd_set_private_flags): Define.
6870 (sh64_elf_copy_private_data_internal): Compare machine name, not
6871 textual BFD target name, to check whether to copy section flag
6872 SHF_SH5_ISA32.
6873 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
6874 Tweak section-contents-type-mismatch message.
6875 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
6876 Validize reloc-types.
6877 * elf64-sh64.c: New file.
6878 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
6879 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
6880 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
6881 Regenerate dependencies.
6882 * Makefile.in: Regenerate.
6883 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
6884 bfd_elf64_sh64l_vec.
6885 * configure.in: Handle bfd_elf64_sh64_vec and
6886 bfd_elf64_sh64l_vec.
6887 * configure: Regenerate.
6888 * po/POTFILES.in: Regenerate.
6889 * po/bfd.pot: Regenerate.
6890 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
6891 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
6892 anything else but EF_SH64 and EF_SH64_ABI64.
6893 (sh64_elf_merge_private_data): Emit error for anything else but
6894 EF_SH64 and EF_SH64_ABI64.
6895 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
6896 from targ_selvecs.
6897 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
6898 bfd_elf32_sh64l_vec as a temporary measure.
6899 * configure: Regenerate.
6900 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
6901 * cpu-sh.c (arch_info_struct): Include sh5 item
6902 unconditionalized.
6903 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
6904 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
6905 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
6906 * elf32-sh64.c: Tweak comments.
6907 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
6908 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
6909 (sh64_elf_copy_private_data_internal): Wrap long line.
6910 (sh64_elf_merge_private_data): Rewrite to allow objects from
6911 SH64 subsets to be linked together.
6912 (INCLUDE_SHMEDIA): Define.
6913 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
6914 Parenthesize plus-expression inside or-expression.
6915 <global symbol>: Ditto.
6916 (sh_elf_set_mach_from_flags): Remove code refusing
6917 deleted EF_SH64_32BIT_ABI flag.
6918 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
6919 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
6920 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
6921 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
6922 (sh_elf_relocate_section) <local symbol>: Or 1 in
6923 calculation of relocation if sym->st_other & STO_SH5_ISA32.
6924 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
6925 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
6926 relocation.
6927 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
6928 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
6929 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
6930 Regenerate dependencies.
6931 * Makefile.in: Regenerate.
6932 * archures.c: Add bfd_mach_sh5.
6933 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
6934 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
6935 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
6936 * configure: Regenerate.
6937 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
6938 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
6939 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
6940 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
6941 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
6942 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
6943 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
6944 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
6945 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
6946 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
6947 in item for SH5.
6948 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
6949 for SHmedia relocs.
6950 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
6951 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
6952 shmedia_prepare_reloc, goto final_link_relocate if it returns
6953 non-zero, else fail as before.
6954 (sh_elf_set_mach_from_flags): Provide function only if not defined
6955 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
6956 (sh_elf_set_private_flags): Provide function only if not defined
6957 as a macro.
6958 (sh_elf_copy_private_data): Similar.
6959 (sh_elf_merge_private_data): Similar.
6960 * section.c (SEC_SH_ISA_SHMEDIA): New.
6961 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
6962 * elf32-sh64.c: New file.
6963 * libbfd.h: Regenerate.
6964 * bfd-in2.h: Regenerate.
6965 * po/POTFILES.in: Regenerate.
6966 * po/bfd.pot: Regenerate.
6967 * bfd-in2.h: Regenerate.
6968 * libbfd.h: Regenerate.
6969
6970 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
6971
6972 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
6973 been included, not drag it in.
6974 * bfd-in2.h: Regenerate.
6975
6976 2002-02-06 H.J. Lu (hjl@gnu.org)
6977
6978 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
6979 the mach and ISA fields if necessary.
6980
6981 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
6982
6983 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
6984 ARM architecture when an F_ARM_5 flag is detected, since we cannot
6985 be sure exactly which architecture this represents.
6986
6987 2002-02-05 Nick Clifton <nickc@redhat.com>
6988
6989 * po/tr.po: Updated translation.
6990
6991 2002-02-05 Alan Modra <amodra@bigpond.net.au>
6992
6993 From Jimi X <jimix@watson.ibm.com>
6994 * archures (bfd_mach_ppc64): Define.
6995 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
6996 (bfd_powerpc_arch): Define.
6997 * bfd-in2.h: Regenerate.
6998 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
6999 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
7000 (bfd_powerpc_archs): Add default powerpc64 arch.
7001
7002 2002-02-05 Alan Modra <amodra@bigpond.net.au>
7003
7004 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
7005 against section syms in readonly sections. Don't do the global
7006 sym check if we find one.
7007 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
7008 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
7009 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
7010 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
7011 (elf_s390_grok_prstatus): Add missing prototype.
7012
7013 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
7014
7015 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
7016 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
7017 Call bfd_get_section_by_name only once. Initialize
7018 bpodata->n_bpo_relocs_this_section.
7019 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
7020 referring to DSOs.
7021 (bpo_reloc_request_sort_fn): Don't use difference of values as
7022 return-value.
7023
7024 2002-02-02 David O'Brien <obrien@FreeBSD>
7025
7026 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
7027 version 4.5 and later the same as 5-CURRENT.
7028 * configure: Re-generate.
7029
7030 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
7031
7032 * config.bfd (hppa*-*-netbsd*): New target.
7033
7034 2002-01-31 Philipp Thomas <pthomas@suse.de>
7035
7036 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
7037 to front of message. Unify messages with elf32-arm.h. Use
7038 commas where neccessary.
7039 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
7040 ERROR in messages. Unify messages with coff-arm.c. Correct
7041 VFP/FPA error message.
7042 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
7043 APCS-32 for translation.
7044
7045 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
7046
7047 Perform on-demand global register allocation from
7048 R_MMIX_BASE_PLUS_OFFSET relocs.
7049 * elf64-mmix.c (struct bpo_reloc_section_info, struct
7050 bpo_reloc_request, struct bpo_greg_section_info): New.
7051 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
7052 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
7053 _bfd_mmix_check_all_relocs,
7054 _bfd_mmix_prepare_linker_allocated_gregs,
7055 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
7056 (elf_mmix_howto_table): Correct src_mask for most relocs.
7057 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
7058 case.
7059 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
7060 case. Fix typo in comment. New label do_mmix_reloc.
7061 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
7062 store first object file with a base-plus-offset reloc. Call
7063 mmix_elf_check_common_relocs for the part common with mmo.
7064 (mmix_elf_final_link): Write out linker-allocated register
7065 contents section.
7066 (elf_backend_gc_sweep_hook): Define.
7067 (bfd_elf64_bfd_relax_section): Define.
7068
7069 * mmo.c: Don't include <ctype.h>
7070 (mmo_init): Correct init-once logic.
7071
7072 2002-02-01 Tom Rix <trix@redhat.com>
7073
7074 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
7075
7076 2002-02-01 Alan Modra <amodra@bigpond.net.au>
7077
7078 * Makefile.am: Run "make dep-am"
7079 * Makefile.in: Regenerate.
7080
7081 2002-01-31 David O'Brien <obrien@FreeBSD>
7082
7083 * configure.in: Recognize the differences in core files from FreeBSD
7084 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
7085 5-CURRENT.
7086 * configure: Regenerate.
7087
7088 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
7089
7090 * coff-or32.c: New file.
7091 * cpu-or32.c: New file.
7092 * elf32-or32.c: New file.
7093 * archures.c: Add support for or32.
7094 * targets.c: Add support for or32.
7095 * bfd-in2.h: Regenerate.
7096 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
7097 coff_write_object_contents): Add support for or32.
7098 * config.bfd: Add target.
7099 * configure.in: Add support for or32.
7100 * configure: Regenerate.
7101 * Makefile.am: Add support for or32.
7102 * Makefile.in: Regenerate.
7103 * po/SRC-POTFILES.in: Add or32 files.
7104 * po/bfd.pot: Regenerate.
7105
7106 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
7107 Don Lindsay <lindsayd@cisco.com>
7108
7109 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
7110 false' with a return of a bfd_reloc_ error code.
7111
7112 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
7113
7114 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
7115 unexport unreferenced symbols when --export-dynamic. Call
7116 _bfd_elf_strtab_delref when unexporting.
7117
7118 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
7119
7120 * bfd-in.h: Include <stdbool.h> if it is available.
7121 * bfd-in2.h: Regenerated.
7122
7123 2002-01-31 Alan Modra <amodra@bigpond.net.au>
7124
7125 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
7126 not go via the plt.
7127
7128 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7129
7130 * archures.c: Tidy up formatting of embedded comments.
7131 * bfd.c: Tidy up formatting of embedded comments.
7132 * bfd-in.h: Fix formatting of comments.
7133 * reloc.c: Tidy up formatting of ordinary & embedded comments.
7134 * section.c: Tidy up formatting of embedded comments.
7135 * syms.c: Tidy up formatting of embedded comments.
7136 * targets.c: Tidy up formatting of embedded comments.
7137
7138 * bfd-in2.h: Regenerate.
7139
7140 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
7141
7142 * vms-tir.c (cmd_name): New function.
7143 (tir_cmd_name): New function.
7144 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
7145 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
7146 Fix formatting.
7147
7148 * peXXigen.c (pe_print_idata): Rearrange message to aid in
7149 translation.
7150 (pe_print_pdata): Rearrange message to aid in translation.
7151
7152 * libbfd.c (warn_deprecated): Rearrange error message to aid in
7153 translation.
7154
7155 * ihex.c (ihex_write_object_contents): Fix spelling typo.
7156
7157 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
7158
7159 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
7160 message to aid in translation.
7161
7162 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
7163 to aid in translation.
7164
7165 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
7166
7167 2002-01-30 Philipp Thomas <pthomas@suse.de>
7168
7169 * coff-arm.c, elf32-elf.h: Unify messages.
7170
7171 2002-01-30 Nick Clifton <nickc@redhat.com>
7172
7173 * po/sv.po: Updated translation.
7174
7175 2002-01-30 Philipp Thomas <pthomas@suse.de>
7176
7177 * dwarf2.c (read_abbrev): Use full section name in error message.
7178 (decode_line_info): Likewise.
7179
7180 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
7181 message.
7182
7183 2002-01-30 Alan Modra <amodra@bigpond.net.au>
7184
7185 * elf64-ppc.c (func_desc_adjust): Only provide missing function
7186 descriptor symbols for undefined function code syms. Clear
7187 ELF_LINK_NON_ELF so that they can stay weak.
7188
7189 2002-01-29 Chris Demetriou <cgd@broadcom.com>
7190 Mitch Lichtenberg <mpl@broadcom.com>
7191
7192 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
7193 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
7194 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
7195 generation.
7196 * bfd-in2.h: Regenerate.
7197
7198 2002-01-29 Chris Demetriou <cgd@broadcom.com>
7199
7200 * elf32-mips.c: Add additional comments about HI16 relocation
7201 processing.
7202 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
7203 pc-relative relocations. (Reverts change made on 2001-10-31.)
7204 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
7205 for pc-relative relocations.
7206 (mips_elf_calculate_relocation): Add a comment about a kludge
7207 in the R_MIPS_GNU_REL_HI16 handling.
7208 (_bfd_mips_elf_relocate_section): Implement that kludge;
7209 adjust pc-relative HI16 relocation for difference in HI16 and
7210 LO16 addresses, since it can't easily be done in
7211 mips_elf_calculate_relocation.
7212
7213 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
7214
7215 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
7216 relocations with PC32 relocations for undefined or weak symbols.
7217 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
7218 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
7219
7220 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
7221
7222 * elfcore.h (elf_core_file_p): Improve comment for last change.
7223
7224 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
7225
7226 * configure: Regenerated.
7227
7228 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
7229
7230 * elfcore.h (elf_core_file_p): Set the machine architecture
7231 before processing the program headers.
7232
7233 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
7234
7235 * configure.in <64-bit configuration>: If using gcc, check and
7236 emit error for egcs-1.1.2.
7237 * configure: Regenerate.
7238
7239 2002-01-26 Egor Duda <deo@logos-m.ru>
7240
7241 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
7242 as possible to avoid stack corruption.
7243
7244 2002-01-26 Richard Henderson <rth@redhat.com>
7245
7246 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
7247 for non-allocated sections.
7248
7249 2002-01-25 Mark Kettenis <kettenis@gnu.org>
7250
7251 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
7252 prstat.pr_reg even if it is a struct.
7253
7254 2002-01-25 Steve Ellcey <sje@cup.hp.com>
7255
7256 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
7257
7258 2002-01-25 Philipp Thomas <pthomas@suse.de>
7259
7260 * coffgen.c (coff_print_symbol): Don't mark info message
7261 for translation.
7262
7263 2002-01-25 Nick Clifton <nickc@redhat.com>
7264
7265 * po/fr.po: Updated translation.
7266 * po/es.po: Updated translation.
7267
7268 2002-01-25 Philipp Thomas <pthomas@suse.de>
7269
7270 * coff-alpha.c (alpha_relocate_section): Unify warning message
7271 for GP relative relocations without GP defined.
7272 * coff-mips.c (mips_relocate_section): Likewise.
7273
7274 2002-01-25 Alan Modra <amodra@bigpond.net.au>
7275
7276 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
7277 unsigned overflow when new_offset < old_offset.
7278
7279 2002-01-24 Philipp Thomas <pthomas@suse.de>
7280
7281 * bfd.c (_bfd_abort): Fix typo.
7282
7283 2002-01-23 Richard Henderson <rth@redhat.com>
7284
7285 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
7286 plt entries for undefweak symbols.
7287
7288 2002-01-23 Steve Ellcey <sje@cup.hp.com>
7289
7290 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
7291 (bfd_elf64_ia64_hpux_big_vec): Ditto.
7292 (bfd_elf32_h8300_vec): Ditto.
7293
7294 2002-01-23 Alan Modra <amodra@bigpond.net.au>
7295
7296 * elf64-ppc.c: Remove stale part of ABI comment.
7297 (NO_OPD_RELOCS): Define.
7298 (ppc64_elf_check_relocs): Use it.
7299 (ppc64_elf_relocate_section): Here too.
7300 (build_one_stub): Don't point function syms at the stub. Instead,
7301 hijack plt.offset.
7302 (ppc64_elf_relocate_section): Check whether REL24 relocs should
7303 really go to the stub. Make all dynamic relocs in opd against
7304 locals.
7305 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
7306 plt.offset.
7307
7308 2002-01-22 Richard Henderson <rth@redhat.com>
7309
7310 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
7311
7312 2002-01-22 Alan Modra <amodra@bigpond.net.au>
7313
7314 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
7315 TOC_BASE_OFF adjustment.
7316
7317 * Makefile.am: Run "make dep-am".
7318 * Makefile.in: Regenerate.
7319 * po/SRC-POTFILES.in: Regenerate.
7320
7321 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
7322
7323 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
7324 host defines.
7325
7326 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
7327
7328 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
7329 Check for and emit error if sgot is NULL at this point.
7330
7331 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
7332
7333 * config.bfd (ia64*-*-netbsd*): New target.
7334
7335 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
7336
7337 * som.c (som_write_space_strings): Comment typo fix.
7338
7339 2002-01-21 Alan Modra <amodra@bigpond.net.au>
7340
7341 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
7342 is_func_descriptor fields.
7343 (link_hash_newfunc): Init them.
7344 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
7345 dot are candidates for plt entries. When processing .opd relocs,
7346 set function descriptor strings to point inside function code
7347 string, and set new ppc_link_hash_entry fields.
7348 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
7349 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
7350 function descriptors. It's now done in..
7351 (func_desc_adjust): New.
7352 (ppc64_elf_func_desc_adjust): New.
7353 (define elf_backend_always_size_sections): Define.
7354 (ppc64_elf_hide_symbol): New.
7355 (define elf_backend_hide_symbol): Define.
7356 (allocate_dynrelocs): Remove code looking up function descriptors
7357 as that has been done earlier.
7358 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
7359 table.
7360 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
7361 up function descriptor.
7362 (build_one_stub): Look up the function code sym. Check for
7363 invalid plt offsets.
7364 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
7365 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
7366
7367 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
7368 boolean param.
7369 (_bfd_elf_link_hash_hide_symbol): Likewise.
7370 * elflink.h (elf_link_add_object_symbols): Adjust call to
7371 elf_backend_hide_symbol.
7372 (elf_fix_symbol_flags): Likewise.
7373 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
7374 than bfd_alloc.
7375 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
7376 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
7377 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
7378 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
7379 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
7380 and adjust to suit.
7381 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
7382 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
7383 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
7384
7385 2002-01-18 Alan Modra <amodra@bigpond.net.au>
7386
7387 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
7388 dynamic function descriptor symbol, not the associated function
7389 symbol.
7390
7391 2002-01-17 Eric Christopher <echristo@redhat.com>
7392
7393 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
7394
7395 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
7396
7397 * po/bfd.pot: Regenerate.
7398 * po/fr.po: Regenerate.
7399
7400 2002-01-17 Alan Modra <amodra@bigpond.net.au>
7401
7402 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
7403 Remove "Elf_Internal_Shdr *" param.
7404 (_bfd_mips_elf_section_from_bfd_section): Ditto.
7405 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
7406 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
7407 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
7408 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
7409 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
7410 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
7411 function to override special sections. Remove hdr arg from
7412 backend call, and don't loop.
7413
7414 2002-01-16 Eric Christopher <echristo@redhat.com>
7415
7416 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
7417 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
7418 relocations requiring gp0 and gp.
7419
7420 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
7421
7422 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
7423 EF_ARM_VFP_FLOAT.
7424 (elf32_arm_print_private_bfd_data): Likewise.
7425
7426 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
7427
7428 * po/tr.po: Import new version.
7429
7430 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7431
7432 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
7433 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
7434 (ORI_R0_R0_0): Correct.
7435
7436 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7437
7438 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
7439 when plt_not_loaded.
7440 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
7441 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
7442 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
7443 (ppc64_elf_glink_code): Delete.
7444 (PPC64_ELF_GLINK_SIZE): Delete.
7445 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
7446 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
7447 ORI_R0_R0_0): Define.
7448 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
7449 (struct ppc_link_hash_table): Add sstub and plt_overflow.
7450 (ppc64_elf_link_hash_table_create): Init them.
7451 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
7452 Don't copy to shared lib.
7453 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
7454 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
7455 (allocate_dynrelocs <plt>): Don't change function sym here. Make
7456 room for .stub and .glink code.
7457 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
7458 DT_PPC64_GLINK.
7459 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
7460 bfd_elf64_bfd_final_link.
7461 (bfd_elf64_bfd_final_link): Don't define.
7462 (ppc64_elf_size_stubs): New.
7463 (build_plt_stub): New.
7464 (build_one_stub): New.
7465 (ppc64_elf_build_stubs): New.
7466 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
7467 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
7468 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
7469 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
7470 case output sections not separate. Adjust DT_RELASZ to not
7471 include plt relocs. Set reserved got entry. Set got and plt
7472 entry size.
7473 (elf_backend_got_header_size): Set to 8.
7474 * elf64-ppc.h: New file.
7475
7476 2002-01-16 Alan Modra <amodra@bigpond.net.au>
7477
7478 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
7479 sections, use bfd_section_list_remove.
7480 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
7481 * elflink.h (elf_link_add_object_symbols): When removing all
7482 sections, use bfd_section_list_clear.
7483
7484 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7485
7486 * po/sv.po: New file: Swedish translation.
7487 * configure.in (ALL_LINGUAS): Add sv.
7488 * configure: Regenerate.
7489
7490 2002-01-15 Jakub Jelinek <jakub@redhat.com>
7491
7492 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
7493 * elf.c (merge_sections_remove_hook): New function.
7494 (_bfd_elf_merge_sections): Pass it as 3rd argument to
7495 _bfd_merge_sections.
7496 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
7497 * libbfd.h: Rebuilt.
7498 * merge.c (_bfd_merge_sections): Add remove_hook argument.
7499 Call remove_hook if a SEC_EXCLUDE section is encountered.
7500
7501 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
7502
7503 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
7504 (xstormy16_reloc_map): Initialise new field with correct howto
7505 table.
7506 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
7507 howto entry.
7508
7509 2002-01-10 Michael Snyder <msnyder@redhat.com>
7510
7511 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
7512 (elfcore_write_pstatus): Use long instead of pid_t;
7513 * elf-bfd.h: Change prototypes to use long instead of pid_t;
7514
7515 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
7516
7517 * elf.c: Update copyright years.
7518 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
7519 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
7520
7521 2002-01-08 Michael Snyder <msnyder@redhat.com>
7522
7523 Add capability to write corefile note sections, for gdb.
7524 * elf.c (elfcore_write_note): New function.
7525 (elfcore_write_prpsinfo): New function.
7526 (elfcore_write_prstatus): New function.
7527 (elfcore_write_pstatus): New function.
7528 (elfcore_write_prfpreg): New function.
7529 (elfcore_write_prxfpreg): New function.
7530 * elf-bfd.h: Add prototypes for above functions.
7531
7532 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
7533
7534 * elf.c (elf_fake_sections): Propagate errors from
7535 elf_backend_fake_section.
7536
7537 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
7538
7539 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
7540 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
7541 (elf32-sh-nbsd.lo): New rule.
7542 * Makefile.in: Regenerate.
7543 * config.bfd (sh*le-*-netbsdelf*): New target.
7544 (sh*-*-netbsdelf*): New target.
7545 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
7546 (bfd_elf32_shnbsd_vec): New vector.
7547 (bfd_elf32_shlnbsd_vec): New vector.
7548 * configure: Regenerate.
7549 * elf32-sh-nbsd.c: New file.
7550 * targets.c: Update copyright years.
7551 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
7552 bfd_elf32_shnbsd_vec.
7553
7554 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
7555
7556 * coff-rs6000.c (READ20): Use bfd_scan_vma.
7557
7558 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
7559
7560 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
7561 of a symbol in a section that will be deleted.
7562
7563 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
7564
7565 * po/es.po: New file: Spanish translation.
7566 * configure.in (ALL_LINGUAS): Add es.
7567 * configure: Regenerate.
7568
7569 2002-01-06 Steve Ellcey <sje@cup.hp.com>
7570
7571 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
7572 argument so we can handle HP-UX specially.
7573 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
7574 (elfNN_hpux_backend_section_from_bfd_section): New for support
7575 of SHN_IA_64_ANSI_COMMON.
7576 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
7577 (is_unwind_section_name): Add special HP-UX support.
7578 (elfNN_ia64_section_from_shdr): Add support for more sections.
7579 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
7580 add support for more sections.
7581 (elfNN_ia64_additional_program_headers): Modify
7582 is_unwind_section_name call.
7583 (elfNN_ia64_modify_segment_map): Remove assumption that there is
7584 only one unwind section in segment.
7585
7586 2002-01-06 Alan Modra <amodra@bigpond.net.au>
7587
7588 * syms.c (_bfd_generic_make_empty_symbol): New function.
7589 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
7590 _bfd_generic_make_empty_symbol.
7591 * libbfd.h: Regenerate.
7592 * bfd-in2.h: Regenerate.
7593 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
7594 (hppabsd_core_get_symtab_upper_bound): Don't define.
7595 (hppabsd_core_get_symtab): Likewise.
7596 (hppabsd_core_print_symbol): Likewise.
7597 (hppabsd_core_get_symbol_info): Likewise.
7598 (hppabsd_core_bfd_is_local_label_name): Likewise.
7599 (hppabsd_core_get_lineno): Likewise.
7600 (hppabsd_core_find_nearest_line): Likewise.
7601 (hppabsd_core_bfd_make_debug_symbol): Likewise.
7602 (hppabsd_core_read_minisymbols): Likewise.
7603 (hppabsd_core_minisymbol_to_symbol): Likewise.
7604 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
7605 Formatting fixes.
7606 * hpux-core.c: Similarly.
7607 * irix-core.c: Similarly.
7608 * osf-core.c: Similarly.
7609 * sco5-core.c: Similarly.
7610 * binary.c (binary_make_empty_symbol): Remove function, define as
7611 _bfd_generic_make_empty_symbol.
7612 * ihex.c (ihex_make_empty_symbol): Likewise.
7613 * mmo.c (mmo_make_empty_symbol): Likewise.
7614 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
7615 * srec.c (srec_make_empty_symbol): Likewise.
7616 * versados.c (versados_make_empty_symbol): Likewise.
7617 * vms.c (_bfd_vms_make_empty_symbol): Remove.
7618 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
7619 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
7620 rather than _bfd_vms_make_empty_symbol.
7621 * vms-misc.c (new_symbol): Likewise.
7622
7623 2002-01-05 Alan Modra <amodra@bigpond.net.au>
7624
7625 * section.c (bfd_section_init): Remove unnecessary initialisations.
7626 (bfd_section_list_clear): New function.
7627 (bfd_section_list_remove, bfd_section_list_insert): New macros.
7628 (_bfd_strip_section_from_output): Use them.
7629 * coffcode.h (coff_set_alignment_hook): Likewise.
7630 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
7631 * elf64-mips.c (mips_elf64_final_link): Likewise.
7632 * elf64-mmix.c (mmix_elf_final_link): Likewise.
7633 * sunos.c (sunos_add_dynamic_symbols): Likewise.
7634 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
7635 * bfd-in2.h: Regenerate.
7636
7637 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
7638 rather than doing our own section handling. Clean up after errors
7639 with bfd_release and bfd_section_list_clear. Handle unexpected
7640 flags.
7641 * aoutf1.h (sunos4_core_file_p): Likewise.
7642 * aix386-core.c (aix386_core_file_p): Likewise.
7643 * cisco-core.c (cisco_core_file_validate): Likewise.
7644 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
7645 * trad-core.c (trad_unix_core_file_p): Likewise.
7646
7647 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
7648 with bfd_release and bfd_section_list_clear.
7649 * hpux-core.c (hpux_core_core_file_p): Likewise.
7650 * irix-core.c (irix_core_core_file_p): Likewise.
7651 * lynx-core.c (lynx_core_file_p): Likewise.
7652 * osf-core.c (osf_core_core_file_p): Likewise.
7653 * rs6000-core.c (rs6000coff_core_p): Likewise.
7654 * sco5-core.c (sco5_core_file_p): Likewise.
7655
7656 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
7657 sign extension adjustments without conditionals.
7658
7659 2002-01-04 Jakub Jelinek <jakub@redhat.com>
7660
7661 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
7662 CIE at .eh_frame start is removed due to no FDEs referencing it.
7663
7664 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
7665
7666 * config.bfd (x86_64-*-netbsd*): New target.
7667 * configure.in (x86_64-*-netbsd*): Set COREFILE
7668 to netbsd-core.lo.
7669 * configure: Regenerated.
7670
7671 2002-01-03 Tom Rix <trix@redhat.com>
7672
7673 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
7674 for recent bfd_make_section_anyway change.
7675
7676 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
7677
7678 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7679 R_ARM_THM_PC11 reloc.
7680
7681 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7682
7683 * configure.in (LINGUAS): Add ja.
7684 * configure: Regenerate.
7685 * po/ja.po: Import from translation project's web site.
7686
7687 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
7688
7689 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
7690 messages to ease translation into other languages.
7691
7692 For older changes see ChangeLog-0001
7693 \f
7694 Local Variables:
7695 mode: change-log
7696 left-margin: 8
7697 fill-column: 74
7698 version-control: never
7699 End:
This page took 0.213186 seconds and 4 git commands to generate.