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