Add ColfFire v4 support
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-10-21 Thorsten Brehm <brehm@gmx.net>
2
3 * archures.c (bfd_default_scan): Add support for mcf528x.
4 * ieee.c (ieee_write_processor): Likewise.
5
6 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
7 Bernardo Innocenti <bernie@develer.com>
8
9 * archures.c: Add MCF528x (MCFv4) support.
10 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
11 * bfd-in2.h: Regenerate.
12
13 2003-10-20 Andrew Cagney <cagney@redhat.com>
14
15 * targets.c: Replace "struct sec" with "struct bfd_section"
16 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
17 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
18 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
19 * aout-tic30.c, aout-target.h:
20 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
21
22 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
23
24 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
25 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
26 (struct _mmix_elf_section_data): New member pjs.
27 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
28 functions.
29 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
30 (mmix_reloc_map): Ditto.
31 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
32 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
33 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
34 unused.
35 (mmix_elf_check_relocs): Move early return to after
36 mmix_elf_check_common_relocs call.
37 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
38 (_bfd_mmix_before_linker_allocation): Rename from
39 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
40 Arrange to set the initial relaxable size of sections.
41 (_bfd_mmix_after_linker_allocation): Rename from
42 _bfd_mmix_finalize_linker_allocated_gregs.
43 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
44 (bfd_elf64_get_section_contents): Define.
45 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
46 * libbfd.h, bfd-in2.h: Regenerate.
47
48 * reloc.c (bfd_generic_relax_section): Default-set
49 section->_cooked_size here.
50 (bfd_generic_get_relocated_section_contents): Don't set it here.
51 Explain why.
52
53 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
54
55 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
56 output section has been discarded.
57
58 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
59
60 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
61 (h8300_reloc16_extra_cases): Likewise.
62 (h8300_bfd_link_add_symbols): Likewise.
63
64 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
65
66 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
67 (h8300sn_info_struct): Likewise.
68 (h8300hn_info_struct): Likewise.
69
70 2003-10-16 Pavel Roskin <proski@gnu.org>
71
72 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
73 for sections which lack size info.
74
75 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
76
77 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
78 mingw32.
79
80 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
81
82 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
83 undefined patterns with '*'.
84
85 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
86
87 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
88 use the last CIE from a different section.
89 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
90 size of the output section.
91
92 2003-10-07 Roland McGrath <roland@redhat.com>
93
94 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
95 new section from p_align header field.
96
97 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
98
99 * elf32-xtensa.c (xtensa_read_table_entries): The external size
100 of entry is 8 bytes.
101
102 2003-10-15 Andrew Cagney <cagney@redhat.com>
103
104 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
105 with NAME##_canonicalize_symtab.
106 * libcoff-in.h (coff_canonicalize_symtab): Update.
107 * xsym.h (bfd_sym_canonicalize_symtab): Update.
108 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
109 * coffgen.c (coff_canonicalize_symtab): Update.
110 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
111 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
112 * ieee.c (ieee_vec): Update comment.
113 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
114 * mmo.c (mmo_canonicalize_symtab): Update.
115 * nlm-target.h (nlm_canonicalize_symtab): Update.
116 * nlmcode.h (nlm_canonicalize_symtab): Update.
117 * i386msdos.c (msdos_canonicalize_symtab): Update.
118 * hp300hpux.c (MY (canonicalize_symtab)): Update.
119 * oasys.c (oasys_canonicalize_symtab): Update.
120 * som.c (som_canonicalize_symtab): Update.
121 * pef.c (bfd_pef_canonicalize_symtab): Update.
122 * nlmcode.h (nlm_canonicalize_symtab): Update.
123 * xsym.c (bfd_sym_canonicalize_symtab): Update.
124 * vms.c (vms_canonicalize_symtab): Update.
125 * versados.c (versados_canonicalize_symtab): Update.
126 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
127 * ieee.c (ieee_canonicalize_symtab): Update.
128 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
129 * reloc.c: Update comment.
130 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
131 * coff64-rs6000.c (aix5coff64_vec): Update.
132 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
133 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
134 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
135 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
136 * hp300hpux.c (MY_canonicalize_symtab): Update.
137 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
138 * aout-tic30.c (MY_canonicalize_symtab): Update.
139 * aout-target.h (MY_canonicalize_symtab): Update.
140 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
141 * elf.c (_bfd_elf_canonicalize_symtab): Update.
142 * elfcode.h (elf_canonicalize_symtab): Update.
143 * ihex.c (ihex_canonicalize_symtab): Update.
144 * tekhex.c (tekhex_canonicalize_symtab): Update.
145 * binary.c (binary_canonicalize_symtab): Update.
146 * srec.c (srec_canonicalize_symtab): Update.
147
148 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
149
150 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
151
152 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
153
154 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
155 relocations.
156 (sh_elf_check_relocs): Likewise.
157
158 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
159 (sh64_elf_merge_symbol_attribute): New.
160 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
161 (sh64_elf64_merge_symbol_attribute): New.
162
163 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
164
165 * elf-bfd.h (struct elf_backend_data): New function pointer member
166 elf_backend_merge_symbol_attribute.
167 * elflink.h (elf_link_add_object_symbols): Adjust call to
168 elf_backend_merge_symbol_attribute if the backend defined it.
169 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
170 (elfNN_bed): Add that to the initializer.
171
172 2003-10-14 Bob Wilson <bob.wilson@acm.org>
173
174 * elf32-xtensa.c (get_is_linkonce_section): Delete.
175 (xtensa_is_property_section, xtensa_is_littable_section): Use
176 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
177 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
178 (xtensa_get_property_section_name): Check section name instead of
179 calling get_is_linkonce_section. Remove unused bfd parameter. Use
180 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
181 linkonce section names by appending ".xt.insn" or ".xt.lit".
182 (xtensa_read_table_entries): Remove bfd argument in call to
183 xtensa_get_property_section_name. Free section name when done.
184 (elf_xtensa_combine_prop_entries): Free leaking table.
185
186 2003-10-13 Richard Sandiford <rsandifo@redht.com>
187
188 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
189 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
190 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
191 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
192 that were needed.
193 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
194 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
195
196 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
197
198 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
199 (bfd_elf64_ia64_after_parse): Likewise.
200 * bfd-in2.h: Regenerated.
201
202 * elfxx-ia64.c (oor_ip): New.
203 (oor_branch_size): Likewise.
204 (bfd_elfNN_ia64_after_parse): Likewise.
205 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
206 equals sizeof (oor_ip).
207
208 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
209
210 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
211 renumbering of some relocation numbers.
212
213 2003-10-11 Alan Modra <amodra@bigpond.net.au>
214
215 * coff-sh.c: Move definition of MAP and guard more code with
216 COFF_IMAGE_WITH_PE.
217
218 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
219 * bfd-in2.h: Regenerate.
220
221 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
222
223 * Makefile.am: Run "make dep-am".
224 * Makefile.in: Regenerate.
225 * doc/Makefile.in: Likewise.
226
227 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
228
229 * cofflink.c: Include "safe-ctype.h".
230 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
231
232 2003-10-08 Dave Brolley <brolley@redhat.com>
233 On behalf of Michael Snyder <msnyder@redhat.com>
234
235 * archures.c: Add FRV fr550 machine.
236 * cpu-frv.c: Ditto.
237 * elf32-frv.c: Ditto.
238 * bfd-in2.h: Regenerate.
239
240 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
241
242 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
243 for non-SGI N64 ABI. Improve code consitency.
244
245 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
246
247 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
248 rightshift to 2.
249
250 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
251
252 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
253 parameter.
254 * cofflink.c (coff_link_add_symbols): Deal with split stab
255 sections.
256 * elflink.h (elf_link_add_object_symbols): Deal with split stab
257 sections.
258 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
259 * libbfd.h: Regenerated.
260
261 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
262 overflow, set reloc start position to after the count
263 reloc. Subtract one from num relocs. Give error on 0xffff relocs
264 and no overflow.
265 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
266 overflow.
267 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
268 0xffff.
269
270 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
271
272 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
273 last CIE/FDE if needed.
274
275 2003-10-06 Nick Clifton <nickc@redhat.com>
276
277 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
278 BFD64 is enabled.
279
280 2003-10-06 Matt Thomas <matt@3am-software.com>
281
282 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
283
284 2003-10-06 Robert Millan <robertmh@gnu.org>
285
286 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
287 * config.bfd: Likewise.
288 * configure: Regenerate.
289
290 2003-10-04 Christian Groessler <chris@groessler.org>
291
292 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
293 and R_CALLR.
294
295 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
296
297 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
298 * elf32-m68hc11.c: Likewise.
299 * elf32-m68hc12.c: Likewise.
300 * elf32-m68hc1x.h: Likewise.
301
302 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
303
304 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
305 of flags between HC12 and HCS12.
306
307 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
308
309 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
310 which become empty after merging.
311
312 2003-09-30 Jakub Jelinek <jakub@redhat.com>
313
314 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
315 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
316
317 2003-09-30 Chris Demetriou <cgd@broadcom.com>
318
319 * archures.c (bfd_mach_mipsisa64r2): New define.
320 * bfd-in2.h: Regenerate.
321 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
322 * cpu-mips.c (I_mipsisa64r2): New enum value.
323 (arch_info_struct): Add entry for I_mipsisa64r2.
324 * elfxx-mips.c (_bfd_elf_mips_mach)
325 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
326 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
327 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
328
329 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
330
331 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
332 Handle SHN_IA_64_ANSI_COMMON.
333 (elf_backend_section_from_bfd_section): Defined.
334
335 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
336
337 * elflink.c (elf_link_read_relocs_from_section): Add an argument
338 of a pointer to section. Check bad symbol index.
339 (_bfd_elf_link_read_relocs): Modify calls to
340 elf_link_read_relocs_from_section.
341
342 2003-09-23 DJ Delorie <dj@redhat.com>
343
344 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
345 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
346 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
347 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
348 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
349 R_SH_PSHA, R_SH_PSHL added.
350 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
351 (sh_elf_relocate_section): Support new relocs.
352
353 2003-09-23 Bob Wilson <bob.wilson@acm.org>
354
355 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
356 dynamic relocation offsets.
357
358 2003-09-23 Alan Modra <alan@modra.org>
359
360 * simple.c (bfd_simple_get_relocated_section_contents): Free the
361 hash table using _bfd_generic_link_hash_table_free.
362
363 2003-09-23 Alan Modra <alan@modra.org>
364
365 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
366 type of prefix_length and suffix_length to int. Rename "attributes"
367 to "attr". Comment.
368 (_bfd_elf_get_sec_type_attr): Update prototype.
369 * elf.c (get_special_section): Rewrite.
370 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
371 attr and type pointers.
372 (_bfd_elf_new_section_hook): Adjust for above.
373 (special_sections): Merge suffix with prefix. Set
374 prefix_length for all entries. Set suffix_length appropriately.
375 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
376 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
377 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
378 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
379 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
380 * elf32-v850.c (v850_elf_special_sections): Likewise.
381 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
382 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
383 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
384 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
385 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
386 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
387 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
388 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
389
390 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
391
392 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
393 ->got if the section already exists.
394
395 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
396
397 * dwarf2.c (decode_line_info): Cope with an initially empty
398 filename table.
399
400 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
401
402 * acinclude.m4: Include ../config/accross.m4.
403 * aclocal.m4: Regenerated.
404
405 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
406 or long long.
407 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
408 (host64): Remove if HOST_64BIT_TYPE is set to long.
409
410 * configure.in (HOST_64BIT_TYPE): Set according to the size of
411 long and long long.
412 (HOST_U_64BIT_TYPE): Likewise.
413 (host64): Likewise.
414 * configure: Regenerated.
415
416 2003-09-19 Alan Modra <amodra@bigpond.net.au>
417
418 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
419 since some ABIs round up the size of the struct.
420
421 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
422
423 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
424 the old symbol is undefined and the new symbol is defined.
425
426 2003-09-18 Andreas Schwab <schwab@suse.de>
427
428 * simple.c (bfd_simple_get_relocated_section_contents): Use
429 _bfd_generic_link_hash_table_create instead of
430 bfd_link_hash_table_create.
431
432 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
433
434 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
435 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
436
437 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
438 Randolph Chung <randolph@tausq.org>
439
440 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
441 hppa_link_hash_newfunc, hppa_build_one_stub,
442 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
443 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
444 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
445 for generating import stubs for calls to statically linked PIC
446 functions.
447 (hppa_type_of_stub): Don't generate an import stub for calls to
448 statically linked pic functions. Generate import stubs for calls
449 in a shared object, to functions not in a regular file, and to
450 defined weak functions. Add new argument INFO.
451 (hppa_build_one_stub): Don't undef ADDIL_DP.
452 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
453 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
454 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
455 non-shared link. Convert instructions that use the the linkage table
456 pointer, or a facsimile thereof, to use the global data pointer when
457 the reloc has been changed.
458
459 2003-09-08 Joel Brobecker <brobecker@gnat.com>
460
461 * archures.c: Add new machine names for hppa.
462 * bfd-in2.h: Regenerate.
463 * cpu-hppa.c: Use the new machine names.
464
465 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
466
467 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
468 all_local_syms member.
469 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
470 to get the local symbols.
471
472 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
473
474 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
475 (elf_backend_special_sections): Define.a
476
477 PR savannah/4950:
478 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
479 section is read-only.
480
481 2003-09-04 Nick Clifton <nickc@redhat.com>
482
483 * archures.c (bfd_mach_v850e1): Define.
484 * bfd-in2.h: Regenerate.
485 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
486 (arch_info_struct): Include an entry for bfd_mach_v850e1.
487 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
488 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
489 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
490 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
491 linked with v850e binaries. Mark the output as v850e.
492
493 2003-09-03 Nick Clifton <nickc@redhat.com>
494
495 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
496 symbols that are used in relocs.
497
498 2003-08-30 Robert Millan <robertmh@gnu.org>
499
500 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
501 * config.bfd: Likewise.
502 * configure: Regenerate.
503
504 2003-08-31 Christian Groessler <chris@groessler.org>
505
506 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
507 instead of returning bfd_reloc_continue.
508
509 2003-08-31 Andreas Jaeger <aj@suse.de>
510
511 * merge.c: Update to ISO C90.
512
513 2003-08-27 Ian Lance Taylor <ian@airs.com>
514
515 * configure.in: Check for strtoull.
516 * bfd.c (bfd_scan_vma): Use strtoull when available.
517 * configure, config.in: Regenerate.
518
519 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
520 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
521 __GNUC__ when deciding whether to use long long for
522 BFD_HOST_64_BIT.
523 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
524
525 2003-08-27 Christian Groessler <chris@groessler.org>
526
527 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
528 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
529 functions.
530 (elf32_i860_howto_table): Insert the new functions as
531 'special_function's in the proper reloc type entries.
532
533 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
534
535 * elf32-frv.c (elf32_frv_relocate_section): Use
536 _bfd_elf_rela_local_sym.
537
538 2003-08-26 Michael Snyder <msnyder@redhat.com>
539
540 * cpu-frv.c: Remove unused enum.
541
542 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
543
544 * reloc.c: Fix documentation for MIPS ELF relocations.
545 libbfd.h: Regenerate.
546 bfd-in2.h: Regenerate.
547
548 2003-08-24 Jason Eckhardt <jle@rice.edu>
549
550 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
551
552 2003-08-24 Jason Eckhardt <jle@rice.edu>
553
554 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
555 shift by 2 before storing the relocated value.
556
557 2003-08-23 Jason Eckhardt <jle@rice.edu>
558
559 * coff-i860.c (coff_i860_reloc_nyi): New function.
560 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
561 LOWn, SPLITn, and BRADDR.
562 (RTYPE2HOWTO): Check that the r_type is within the howto_table
563 before trying to access the entry.
564 (coff_i860_rtype_to_howto): Likewise.
565 (coff_i860_reloc_type_lookup): New function.
566 (i860_reloc_processing): New function.
567 (coff_bfd_reloc_type_lookup): Define macro.
568 (RELOC_PROCESSING): Define macro.
569 Minor formatting adjustments.
570
571 2003-08-23 Alan Modra <amodra@bigpond.net.au>
572
573 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
574
575 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
576
577 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
578 .got section at 8 bytes.
579
580 2003-08-21 Nick Clifton <nickc@redhat.com>
581
582 * cofflink.c: Update to ISO C90 and tidy up formatting.
583
584 2003-08-21 Randolph Chung <tausq@debian.org>
585
586 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
587 can have OSABI=Linux or OSABI=SysV. Check for both.
588 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
589
590 2003-08-21 Nick Clifton <nickc@redhat.com>
591
592 * po/sv.po: Updated Swedish translation.
593
594 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
595
596 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
597
598 2003-08-20 Nick Clifton <nickc@redhat.com>
599
600 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
601 replace some duplicated code in most elfxx-xxxx.c files. This
602 version uses the new fields in bfd_link_info.
603
604 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
605 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
606 * elf32-cris.c (cris_elf_relocate_section): Likewise.
607 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
608 * elf32-i386.c (elf_i386_relocate_section): Likewise.
609 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
610 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
611 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
612 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
613 * elf32-s390.c (elf_s390_relocate_section): Likewise.
614 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
615 * elf32-vax.c (elf_vax_relocate_section): Likewise.
616 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
617 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
618 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
619 * elf64-s390.c (elf_s390_relocate_section): Likewise.
620 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
621 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
622 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
623
624 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
625 elf_hppa_remark_useless_dynamic_symbols,
626 elf_hppa_relocate_section): Use the new fields in
627 bfd_link_info structure.
628 * elf32-sh.c (sh_elf_relocate_section): Likewise.
629 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
630 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
631 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
632 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
633 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
634
635 * elflink.h (elf_link_output_extsym): Fix test for reporting
636 undefined symbols in shared libraries. Remove redundant test
637 of shlib_undefined when reporting references to forced local
638 symbols.
639
640 2003-08-18 Andreas Schwab <schwab@suse.de>
641
642 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
643 executables.
644
645 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
646
647 * simple.c (bfd_simple_get_relocated_section_contents): Move
648 reloc_done hack to before first bfd_section_size call. Change all
649 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
650
651 2003-08-16 Alan Modra <amodra@bigpond.net.au>
652
653 * elf64-ppc.c: Don't include elf/ppc.h.
654
655 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
656
657 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
658 code to work with 64-bit bfds.
659
660 2003-08-14 Alan Modra <amodra@bigpond.net.au>
661
662 * dep-in.sed: Remove libintl.h.
663 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
664 (POTFILES.in): Remove target.
665 * Makefile.in: Regenerate.
666
667 2003-08-12 Alan Modra <amodra@bigpond.net.au>
668
669 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
670 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
671 use the function sym from the previous reloc.
672
673 2003-08-11 Jakub Jelinek <jakub@redhat.com>
674
675 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
676 fatal if -pie.
677 * elf32-s390.c (elf_s390_relocate_section): Likewise.
678 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
679 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
680 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
681 * elf64-s390.c (elf_s390_relocate_section): Likewise.
682 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
683 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
684 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
685 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
686 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
687 on undefined symbols if -pie.
688 * elf32-sh.c (sh_elf_relocate_section): Likewise.
689
690 2003-08-11 Alan Modra <amodra@bigpond.net.au>
691
692 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
693 branch to __libc_start_main.
694
695 2003-08-08 Dmitry Diky <diwil@mail.ru>
696
697 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
698 gcc order.
699 * cpu-msp430.c: Likewise.
700 * elf32-msp430.c: Likewise.
701 * bfd-in2.h: Regenerate.
702
703 2003-08-07 Alan Modra <amodra@bigpond.net.au>
704
705 * elfxx-target.h: Remove PTR cast.
706 * targets.c (bfd_target): Make backend_data const void *.
707 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
708 * elf-m10300.c: Likewise.
709 * elf.c: Likewise.
710 * elf32-hppa.c: Likewise.
711 * elf32-i386.c: Likewise.
712 * elf32-m68hc1x.c: Likewise.
713 * elf32-ppc.c: Likewise.
714 * elf32-s390.c: Likewise.
715 * elf32-sh.c: Likewise.
716 * elf32-sh64.c: Likewise.
717 * elf32-sparc.c: Likewise.
718 * elf32-xtensa.c: Likewise.
719 * elf64-mips.c: Likewise.
720 * elf64-ppc.c: Likewise.
721 * elf64-s390.c: Likewise.
722 * elf64-sh64.c: Likewise.
723 * elf64-sparc.c: Likewise.
724 * elf64-x86-64.c: Likewise.
725 * elfcode.h: Likewise.
726 * elfcore.h: Likewise.
727 * elflink.c: Likewise.
728 * elflink.h: Likewise.
729 * elfxx-ia64.c: Likewise.
730 * elfxx-mips.c: Likewise.
731 * elfxx-mips.h: Likewise.
732 * elf.c (prep_headers): Remove useless check for null backend_data.
733 * bfd-in2.h: Regenerate.
734
735 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
736 (NAME): Use ## rather than CONCAT4 macro.
737 * elfcode.h: Remove one remaining PARAMS macro.
738 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
739 * elf-strtab.c: Likewise.
740 * elf-hppa.h: Likewise.
741 * elf32-hppa.h: Likewise.
742 * elf32-hppa.c: Likewise.
743 (elf32_hppa_add_symbol_hook): Delete.
744 (elf_backend_add_symbol_hook): Don't define.
745 * libhppa.h: Convert to C90. Replace INLINE with inline.
746
747 2003-08-06 Alan Modra <amodra@bigpond.net.au>
748
749 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
750 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
751 function descriptors, but warn.
752 (ppc_build_one_stub): Remove a couple of vars. Move code creating
753 stub syms so that we can avoid a stub sym if we already have a
754 plt sym. Do not redefine an existing symbol.
755 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
756 glink.
757
758 2003-08-06 Nick Clifton <nickc@redhat.com>
759
760 * po/fr.po: Updated French translation.
761
762 2003-08-06 Alan Modra <amodra@bigpond.net.au>
763
764 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
765 SEC_LINKER_CREATED.
766
767 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
768
769 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
770 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
771
772 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
773
774 * coffcode.h (coff_slurp_line_table): Return with a warning
775 message if the line number table could not be read.
776
777 2003-08-04 Nick Clifton <nickc@redhat.com>
778
779 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
780 to messages produced for .gnu.warning.SYMBOL sections.
781
782 2003-08-04 Alan Modra <amodra@bigpond.net.au>
783
784 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
785 * elfcore.h: Likewise.
786 * elflink.c: Likewise.
787 * elflink.h: Likewise.
788 * elf.c (sym_is_global): Remove INLINE.
789 (align_file_position): Replace INLINE with inline.
790 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
791 (elf_file_p): Replace INLINE with inline.
792
793 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
794
795 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
796
797 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
798
799 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
800
801 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
802
803 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
804 ElfNN_External_Rela instead of Elf64_External_Rela.
805
806 2003-08-01 Nick Clifton <nickc@redhat.com>
807
808 * config.bfd: Add code to catch obsolete configurations and warn
809 about them unless --enable-obsolete is used. Use this to mark
810 vax-vms port as obsolete.
811
812 2003-07-30 Alan Modra <amodra@bigpond.net.au>
813
814 * elf32-ppc.c (ppc_elf_install_value): Tidy.
815 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
816 Formatting.
817 * elfxx-target.h: Remove PARAMS macro. Formatting.
818
819 2003-07-30 Alan Modra <amodra@bigpond.net.au>
820
821 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
822 * elf64-ppc.c (get_fdh): New function, split out from
823 ppc64_elf_edit_opd.
824 (ppc64_elf_check_relocs): Use get_fdh.
825 (func_desc_adjust): Likewise. Tidy.
826 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
827 exit. Use get_fdh. Account for superfluous dynamic relocs.
828 (ppc64_elf_relocate_section): Warning fix.
829
830 2003-07-30 Jason Eckhardt <jle@rice.edu>
831
832 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
833
834 2003-07-30 Jason Eckhardt <jle@rice.edu>
835
836 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
837
838 2003-07-30 Randolph Chung <tausq@debian.org>
839
840 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
841 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
842
843 2003-07-30 Alan Modra <amodra@bigpond.net.au>
844
845 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
846 Replace PTR with void *. Formatting.
847 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
848 (make_mapping): Likewise.
849
850 2003-07-29 Alan Modra <amodra@bigpond.net.au>
851
852 * elf64-ppc.c (func_desc_adjust): Give linker created function
853 descriptor symbols a size and type.
854 (ppc64_elf_relocate_section): Correct lq insn test.
855
856 2003-07-28 Eric Christopher <echristo@redhat.com>
857
858 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
859 (ppc_elf_install_value): New function.
860 (ppc_elf_sort_rela): Remove.
861 (ppc_elf_relax_section): Rewrite. Remove old relaxation
862 and replace with out of range branch stubs.
863 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
864
865 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
866
867 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
868 from input_bfd.
869
870 2003-07-28 Alan Modra <amodra@bigpond.net.au>
871
872 * elf.c (special_sections): Set attributes for .got and .plt.
873
874 2003-07-27 Alan Modra <amodra@bigpond.net.au>
875
876 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
877 on function descriptors.
878 (ELIMINATE_COPY_RELOCS): Expand comment.
879 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
880 Do include ".toc1".
881
882 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
883
884 * elf.c (_bfd_elf_new_section_hook): Set the default section
885 type to SHT_NULL.
886 (elf_fake_sections): Set the section type based on asect->flags
887 if it is SHT_NULL. Don't abort on processor specific section
888 types.
889
890 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
891
892 * bfd-in2.h: Regenerated.
893
894 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
895
896 * elf-bfd.h (bfd_elf_special_section): New.
897 (elf_backend_data): Add special_sections, a pointer to
898 bfd_elf_special_section.
899 (elf_section_type). New.
900 (elf_section_flags): New.
901 (_bfd_elf_get_sec_type_attr): New.
902
903 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
904 real section type/flags.
905 (special_sections): New.
906 (get_special_section): New.
907 (_bfd_elf_get_sec_type_attr): New.
908 (_bfd_elf_new_section_hook): Check special_section to set
909 elf_section_type and elf_section_flags.
910 (elf_fake_sections): Don't use section name to set ELF section
911 data.
912
913 * elf32-m32r.c (m32r_elf_special_sections): New.
914 (elf_backend_special_sections): Defined.
915
916 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
917 (elf_backend_special_sections): Defined.
918
919 * elf32-mcore.c (mcore_elf_special_sections): New.
920 (elf_backend_special_sections): Defined.
921
922 * elf32-ppc.c (ppc_elf_special_sections): New.
923 (elf_backend_special_sections): Defined.
924
925 * elf32-sh64.c (sh64_elf_special_sections): New.
926 (elf_backend_special_sections): Defined.
927
928 * elf32-v850.c (v850_elf_special_sections): New.
929 (elf_backend_special_sections): Defined.
930
931 * elf32-xtensa.c (elf_xtensa_special_sections): New.
932 (elf_backend_special_sections): Defined.
933
934 * elf64-alpha.c (elf64_alpha_special_sections): New.
935 (elf_backend_special_sections): Defined.
936
937 * elf64-hppa.c (elf64_hppa_special_sections): New.
938 (elf_backend_special_sections): Defined.
939
940 * elf64-ppc.c (ppc64_elf_special_sections): New.
941 (elf_backend_special_sections): Defined.
942
943 * elf64-sh64.c (sh64_elf64_special_sections): New.
944 (elf_backend_special_sections): Defined.
945
946 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
947 (elf_backend_special_sections): Defined.
948
949 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
950
951 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
952 (elf_backend_special_sections): Defined.
953
954 * elfxx-target.h (elf_backend_special_sections): New. Default
955 to NULL.
956 (elfNN_bed): Initialize special_sections.
957
958 * section.c (bfd_abs_section): Remove const.
959 (bfd_und_section): Likewise.
960 (bfd_com_section): Likewise.
961 (bfd_ind_section): Likewise.
962
963 2003-07-24 Nick Clifton <nickc@redhat.com>
964
965 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
966 sections are assigned the LOAD attribute.
967
968 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
969
970 * elf32-sh.c: Convert to C90. Replace PTR with void *.
971 * elf32-sh64-com.c: Likewise.
972 * elf32-sh64.c: Likewise.
973 * elf32-sh64.h: Likewise.
974 * elf64-sh64.c: Likewise.
975
976 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
977
978 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
979 (allocate_dynrelocs): Likewise.
980 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
981 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
982
983 2003-07-24 Nick Clifton <nickc@redhat.com>
984
985 * po/fr.po: Updated French translation.
986
987 2003-07-23 Bob Wilson <bob.wilson@acm.org>
988
989 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
990 near the beginning of the file. Swap order of arguments. Call
991 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
992 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
993 (elf_xtensa_relocate_section): Likewise.
994 (shrink_dynamic_reloc_sections): Likewise.
995
996 2003-07-23 Bob Wilson <bob.wilson@acm.org>
997
998 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
999 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1000 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1001 first printing an error message.
1002 (elf_xtensa_finish_dynamic_sections): Likewise.
1003 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1004 discarding literal table entries.
1005 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1006 (elf_xtensa_do_asm_simplify): Likewise.
1007
1008 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1009
1010 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1011 we have a local symbol in common section.
1012
1013 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1014
1015 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1016 weak symbols.
1017
1018 2003-07-22 Nick Clifton <nickc@redhat.com>
1019
1020 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1021 expected RS6000 storage classes.
1022
1023 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1024
1025 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1026 output_bfd unused to silence gcc.
1027
1028 2003-07-21 Nick Clifton <nickc@redhat.com>
1029
1030 * po/sv.po: Updated Swedish translation.
1031
1032 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1033
1034 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1035 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1036 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1037 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1038 now done in _bfd_elf_symbol_refs_local_p.
1039 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1040 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1041 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1042
1043 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1044
1045 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1046
1047 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1048
1049 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1050 (SYMBOL_CALLS_LOCAL): Likewise.
1051
1052 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1053 immediately if symbol isn't defined locally.
1054
1055 2003-07-18 Richard Henderson <rth@redhat.com>
1056
1057 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1058 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1059 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1060 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1061 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1062 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1063 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1064 Update all callers to provide the relocation being resolved.
1065
1066 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1067
1068 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1069 targ_cflags.
1070
1071 2003-07-17 Nick Clifton <nickc@redhat.com>
1072
1073 * po/es.po: New Spanish translation.
1074 * po/sv.po: New Swedish translation.
1075 * po/opcodes.pot: Regenerate.
1076
1077 2003-07-16 Richard Henderson <rth@redhat.com>
1078
1079 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1080 * elfxx-ia64.c, targets.c: Likewise.
1081
1082 2003-07-16 Richard Henderson <rth@redhat.com>
1083
1084 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1085 for symbols defined locally plus -Bsymbolic. Tidy logic.
1086
1087 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1088
1089 * archures.c (bfd_mach_mips7000): New.
1090 * bfd-in2.h: Regenerated.
1091 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1092 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1093 (mips_mach_extensions): Add an entry for it.
1094
1095 2003-07-14 Nick Clifton <nickc@redhat.com>
1096
1097 * po/tr.po: Update with latest version.
1098 * po/SRC-POTFILES.in: Regenerate.
1099 * po/bfd.pot: Regenerate.
1100 * Makfile.in: Regenerate.
1101 * configure: Regenerate.
1102
1103 2003-07-12 Jeff Baker <jbaker@qnx.com>
1104
1105 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1106 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1107 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1108 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1109
1110 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1111
1112 * coffcode.h (coff_set_section_contents): Set the
1113 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1114
1115 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1116
1117 * bfd-in.h (bfd_h8300_pad_address): Declare.
1118 * bfd-in2.h: Regenerate.
1119 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1120 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1121 addresses before checking whether they can be relaxed.
1122 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1123 Don't complain about overflows in general 8-bit relocations.
1124 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1125 Fix handling of R_H8_DIR24A8.
1126
1127 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1128
1129 * elf32-h8300.c: Convert function prototypes and definitions
1130 to C90 syntax.
1131 * coff-h8300.c: Likewise.
1132 * cpu-h8300.c: Likewise.
1133
1134 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1135
1136 * po/SRC-POTFILES.in: Regenerate.
1137 * po/bfd.pot: Likewise.
1138
1139 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1140
1141 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1142 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1143 .xt.lit.plt section.
1144 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1145 and allocate memory for it.
1146 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1147 section to the .got.loc section.
1148 (elf_xtensa_finish_dynamic_sections): Fix up call to
1149 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1150 the address of .got.loc.
1151 (relax_property_section): Shrink .got.loc to match changes in any
1152 literal table section.
1153 (xtensa_is_property_section): Change to match
1154 xtensa_get_property_section_name.
1155 (xtensa_is_littable_section): New.
1156
1157 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1158
1159 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1160 -1LL.
1161
1162 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1163
1164 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1165 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1166 Run "make dep-am".
1167 * Makefile.in: Regenerate.
1168
1169 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1170
1171 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1172 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1173 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1174 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1175 * elf32-am33lin.c: Rename global functions.
1176 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1177 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1178 * configure.in (bfd_elf32_am33lin_vec): Added.
1179 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1180 (elf32-am33lin.lo): List dependencies.
1181 * aclocal.m4, configure, Makefile.in: Rebuilt.
1182 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1183 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1184 ELF_ARCH was not defined before.
1185 (elf_symbol_leading_char): Define if not defined.
1186 * elf32-am33lin.c: Override the definitions above.
1187 * targets.c (bfd_elf32_am33lin_vec): New.
1188
1189 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1190
1191 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1192 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1193 pcrel_relocs_copied.
1194 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1195 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1196 ld-linux.so.2 to ld.so.1.
1197 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1198 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1199 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1200 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1201 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1202 .rela.* section contents with bfd_zalloc.
1203 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1204 * elf-m10300.c: Added declarations for functions missing them.
1205 Merge some shared-library changes from the i386 back-end. Use
1206 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1207 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1208 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1209 members of elf_link_hash_entry. Adjusted references.
1210 (mn10300_elf_final_link_relocate): dynobj was already loaded
1211 into a local variable, use it.
1212 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1213 * elf-m10300.c: Add missing function prototypes.
1214 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1215 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1216 relocation for dynamic relocations.
1217 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1218 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1219 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1220 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1221 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1222 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1223 adress is already known at the time we compute relaxations.
1224 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1225 and PLT32 to narrower relocations.
1226 * libbfd.h, bfd-in2.h: Rebuilt.
1227 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1228 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1229 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1230 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1231 BFD_RELOC_MN10300_RELATIVE): New relocs.
1232 * libbfd.h, bfd-in2.h: Rebuilt.
1233 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1234 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1235 fields.
1236 (elf_mn10300_howto): Defined new relocation types.
1237 (mn10300_reloc_map): Map them.
1238 (_bfd_mn10300_elf_create_got_section): New fn.
1239 (mn10300_elf_check_relocs): Handle PIC relocs.
1240 (mn10300_elf_final_link_relocate): Likewise.
1241 (mn10300_elf_relocate_section): Handle DSOs.
1242 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1243 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1244 elf_mn10300_pic_plt_entry): New.
1245 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1246 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1247 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1248 elf_mn10300_plt_reloc_offset: New macros.
1249 (ELF_DYNAMIC_INTERPRETER): Likewise.
1250 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1251 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1252 (_bfd_mn10300_elf_discard_copies): Likewise.
1253 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1254 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1255 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1256 (elf_backend_can_gc_sections,
1257 elf_backend_create_dynamic_sections,
1258 elf_backend_adjust_dynamic_sections,
1259 elf_backend_size_dynamic_sections,
1260 elf_backend_finish_dynamic_symbol,
1261 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1262 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1263 elf_backend_got_header_size, elf_backend_plt_header_size): New
1264 macros.
1265
1266 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1267
1268 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1269 * elf-m10300.c (compute_function_info): Account for AM33
1270 registers in `movm' when computing stack space for `call' when
1271 linking for AM33/2.0 link.
1272 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1273 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1274 * bfd-in2.h: Rebuilt.
1275 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1276 * elf-m10300.c: Updated.
1277 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1278 * archures.c (bfd_mach_am332): Defined.
1279 * bfd-in2.h: Rebuilt.
1280 * cpu-m10300.c (bfd_am332_arch): Defined.
1281 (bfd_am33_arch): Chained with am33-2.
1282 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1283 (_bfd_mn10300_elf_final_write_processing): Likewise.
1284
1285 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1286
1287 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1288
1289 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1290
1291 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1292 (struct ppc64_elf_obj_tdata): New.
1293 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1294 (ppc64_elf_mkobject): New function.
1295 (struct got_entry): Add "owner". Move "tls_type".
1296 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1297 (ppc64_elf_init_stub_bfd): New function.
1298 (create_got_section): Create header .got in dynobj. Create .got
1299 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1300 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1301 Look for dynobj .got, and test it.
1302 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1303 (update_local_sym_info): Likewise.
1304 (ppc64_elf_check_relocs): Likewise.
1305 (ppc64_elf_gc_sweep_hook): Likewise.
1306 (ppc64_elf_tls_optimize): Likewise.
1307 (allocate_dynrelocs): Likewise.
1308 (ppc64_elf_size_dynamic_sections): Likewise.
1309 (ppc64_elf_relocate_section): Likewise.
1310 (ppc64_elf_next_toc_section): Update comment.
1311 (toc_adjusting_stub_needed): Remove unneeded cast.
1312 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1313 testing section flags.
1314 (ppc64_elf_build_stubs): Likewise.
1315 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1316 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1317 (func_desc_adjust): Copy over dynamic info for undef weaks.
1318 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1319 (ppc64_elf_size_stubs): Update prototype.
1320 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1321 input sections rather than scanning dynobj.
1322
1323 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1324
1325 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1326 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1327 (mips_elf_create_msym_section): Delete.
1328 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1329 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1330 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1331 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1332 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1333 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1334 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1335
1336 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1337
1338 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1339 symbols protected.
1340
1341 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1342
1343 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1344 of relocations whose offset is -2.
1345
1346 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1347
1348 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1349 forced-local symbols like other locals. Don't create relocations
1350 against STN_UNDEF in irix objects.
1351
1352 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1353
1354 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1355 compatible objects, add the values of defined external symbols
1356 to the addend.
1357
1358 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1359
1360 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1361 initialize a GOT entry to the symbol's st_value.
1362
1363 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1364
1365 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1366 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1367 (ppc_elf_tdata): Define.
1368 (elf_local_ptr_offsets): Adjust.
1369 (ppc_elf_mkobject): New function.
1370 (bfd_elf32_mkobject): Define.
1371
1372 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1373 * elfcore.h (elf_core_file_p): Likewise.
1374 * section.c (bfd_section_init): Remove prototype.
1375
1376 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1377
1378 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1379 field.
1380 (enum elf_linker_section_enum): Delete.
1381 (struct elf_linker_section): Delete.
1382 (struct elf_linker_section_pointers): Delete.
1383 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1384 Make linker_section_pointers a void**.
1385 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1386 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1387 of old item in elf-bfd.h.
1388 (struct elf_linker_section): Likewise.
1389 (struct elf_linker_section_pointers): Likewise.
1390 (elf_local_ptr_offsets): Define.
1391 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1392 (ppc_elf_link_hash_newfunc): Init it.
1393 (struct ppc_elf_link_hash_table): Add sbss.
1394 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1395 individual fields.
1396 (elf_create_linker_section): Fold into..
1397 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1398 Make rela section here if shared.
1399 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1400 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1401 clearing in a loop.
1402 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1403 section here.
1404 (ppc_elf_check_relocs): Adjust.
1405 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1406 creating .sbss by hand.
1407 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1408
1409 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1410
1411 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1412 complain_overflow_bitfield.
1413 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1414 complain_overflow_bitfield.
1415
1416 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1417
1418 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1419 true even if -pie.
1420
1421 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1422
1423 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1424 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1425 !info->executable.
1426 (get_fptr): For -pie create .opd as writable section and create
1427 .rela.opd as well.
1428 (elfNN_ia64_check_relocs): Change info->shared into
1429 !info->executable.
1430 (allocate_fptr): Likewise.
1431 (allocate_dynrel_entries): Account for a relative reloc for -pie
1432 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1433 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1434 section if -pie.
1435 (set_got_entry): Don't create a relative reloc if -pie
1436 want_ltoff_fptr for undefweak symbol.
1437 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1438 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1439 @fptr().
1440
1441 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1442 even if -pie.
1443 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1444 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1445 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1446 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1447 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1448 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1449 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1450 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1451 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1452
1453 2003-07-04 Paul Clarke <paulc@senet.com.au>
1454
1455 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1456 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1457 <R_H8_DIR32A16>: Fix type of relocation.
1458
1459 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1460
1461 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1462 sections were created already. Remove unnecessary tests of
1463 the previous change.
1464
1465 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1466
1467 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1468 bfd_make_section for existing sections.
1469
1470 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1471
1472 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1473 create_got_section if we already have done so.
1474 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1475 (sh_elf_check_relocs): Likewise.
1476 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1477 htab->root.dynobj instead.
1478 (sh_elf_check_relocs): Likewise.
1479 (sh_elf_finish_dynamic_sections): Likewise.
1480
1481 * section.c (bfd_make_section): Return NULL for existing section.
1482
1483 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1484
1485 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1486 ppc_elf_create_got if we've already done so.
1487
1488 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1489 (_bfd_elf_find_pointer_linker_section): Likewise.
1490 (bfd_elf32_create_pointer_linker_section): Likewise.
1491 (bfd_elf32_finish_pointer_linker_section): Likewise.
1492 (bfd_elf64_create_pointer_linker_section): Likewise.
1493 (bfd_elf64_finish_pointer_linker_section): Likewise.
1494 (_bfd_elf_make_linker_section_rela): Likewise.
1495 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1496 (elf_finish_pointer_linker_section): Likewise.
1497 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1498 (_bfd_elf_create_linker_section): Move this function..
1499 (_bfd_elf_find_pointer_linker_section): ..and this..
1500 * elflink.h (elf_create_pointer_linker_section): ..and this..
1501 (elf_finish_pointer_linker_section): ..and this..
1502 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1503 calls.
1504 (elf_create_linker_section): Convert to C90, tidy.
1505 (elf_find_pointer_linker_section): Likewise.
1506 (elf_create_pointer_linker_section): Likewise.
1507 (elf_finish_pointer_linker_section): Likewise.
1508 * elf32-i370.c: Delete #if 0 code.
1509
1510 2003-07-02 Alan Modra <amodra@bigpond.net.au>
1511
1512 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1513 _restf* to be satisfied by shared libs, and always force them local.
1514 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1515 Correct test for "bl".
1516 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1517 primary opcode 31.
1518
1519 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1520
1521 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1522 (s390_tls_reloc): New function.
1523 (elf_howto_table): Add long displacement relocations R_390_20,
1524 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1525 (elf_s390_reloc_type_lookup): Likewise.
1526 (elf_s390_check_relocs): Likewise.
1527 (elf_s390_gc_sweep_hook): Likewise.
1528 (elf_s390_relocate_section): Likewise.
1529 * elf64-s390.c: Same changes as for elf32-s390.c.
1530 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
1531 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
1532 BFD_RELOC_390_TLS_GOTIE20.
1533 * bfd-in2.h: Regenerate.
1534 * libbfd.h: Likewise.
1535
1536 2003-06-30 Alan Modra <amodra@bigpond.net.au>
1537
1538 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1539 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1540
1541 2003-06-29 Alan Modra <amodra@bigpond.net.au>
1542
1543 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1544 Replace PTR with void *. Formatting.
1545 * archive64.c: Likewise.
1546 * archures.c: Likewise.
1547 * bfd-in.h: Likewise.
1548 * bfd.c: Likewise.
1549 * bfdio.c: Likewise.
1550 * bfdwin.c: Likewise.
1551 * cache.c: Likewise.
1552 * corefile.c: Likewise.
1553 * format.c: Likewise.
1554 * init.c: Likewise.
1555 * libbfd-in.h: Likewise.
1556 * libbfd.c: Likewise.
1557 * linker.c: Likewise.
1558 * opncls.c: Likewise.
1559 * reloc.c: Likewise.
1560 * section.c: Likewise.
1561 * simple.c: Likewise.
1562 * syms.c: Likewise.
1563 * targets.c: Likewise.
1564 * bfd-in2.h: Regenerate.
1565 * libbfd.h: Regenerate.
1566
1567 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1568 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1569 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1570 (bfd_getb64): Rewrite without parens.
1571 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1572 * cache.c (insert, snip): Remove INLINE.
1573 * linker.c (bfd_link_add_undef): Likewise.
1574
1575 2003-06-29 Andreas Jaeger <aj@suse.de>
1576
1577 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1578 unnecessary prototypes. Replace PTR with void *.
1579 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1580 trim plt entries. Move undefweak non-default visibility test ...
1581 (allocate_dynrelocs): ... from here.
1582 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1583 Change all callers.
1584 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1585 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1586 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1587 dynreloc and .got relocs.
1588 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1589 for .got relocs.
1590
1591 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1592
1593 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1594
1595 2003-06-27 Nick Clifton <nickc@redhat.com>
1596
1597 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1598 bfd_add_gnu_debuglink_section and only create the section, do not
1599 fill in its contents.
1600 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1601 contents of a .gnu-debuglink section.
1602 * bfd-in2.h: Regenerate.
1603
1604 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1605
1606 * elfxx-mips.c: Revert .got alignment to 2**4.
1607
1608 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1609
1610 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1611
1612 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1613
1614 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1615 relocation header setup.
1616
1617 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1618
1619 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1620 (ppc_elf_reloc_type_lookup): Modify comment.
1621 (ppc_elf_info_to_howto): Ditto.
1622 (ppc_elf_relocate_section): Ditto.
1623 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1624
1625 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1626
1627 * aout-ns32k.c: Correct spelling of "relocatable".
1628 * aoutx.h: Likewise.
1629 * bfd-in.h: Likewise.
1630 * bfd.c: Likewise.
1631 * bout.c: Likewise.
1632 * coff-a29k.c: Likewise.
1633 * coff-alpha.c: Likewise.
1634 * coff-arm.c: Likewise.
1635 * coff-i386.c: Likewise.
1636 * coff-i860.c: Likewise.
1637 * coff-i960.c: Likewise.
1638 * coff-m68k.c: Likewise.
1639 * coff-m88k.c: Likewise.
1640 * coff-mcore.c: Likewise.
1641 * coff-mips.c: Likewise.
1642 * coff-or32.c: Likewise.
1643 * coff-ppc.c: Likewise.
1644 * coff-rs6000.c: Likewise.
1645 * coff-sh.c: Likewise.
1646 * coff-tic80.c: Likewise.
1647 * coff64-rs6000.c: Likewise.
1648 * cofflink.c: Likewise.
1649 * cpu-ns32k.c: Likewise.
1650 * ecoff.c: Likewise.
1651 * ecofflink.c: Likewise.
1652 * elf-bfd.h: Likewise.
1653 * elf-eh-frame.c: Likewise.
1654 * elf-hppa.h: Likewise.
1655 * elf-m10200.c: Likewise.
1656 * elf-m10300.c: Likewise.
1657 * elf.c: Likewise.
1658 * elf32-arm.h: Likewise.
1659 * elf32-avr.c: Likewise.
1660 * elf32-cris.c: Likewise.
1661 * elf32-d10v.c: Likewise.
1662 * elf32-dlx.c: Likewise.
1663 * elf32-fr30.c: Likewise.
1664 * elf32-frv.c: Likewise.
1665 * elf32-h8300.c: Likewise.
1666 * elf32-hppa.c: Likewise.
1667 * elf32-i370.c: Likewise.
1668 * elf32-i386.c: Likewise.
1669 * elf32-i860.c: Likewise.
1670 * elf32-i960.c: Likewise.
1671 * elf32-ip2k.c: Likewise.
1672 * elf32-iq2000.c: Likewise.
1673 * elf32-m32r.c: Likewise.
1674 * elf32-m68hc11.c: Likewise.
1675 * elf32-m68hc1x.c: Likewise.
1676 * elf32-m68k.c: Likewise.
1677 * elf32-mcore.c: Likewise.
1678 * elf32-mips.c: Likewise.
1679 * elf32-msp430.c: Likewise.
1680 * elf32-openrisc.c: Likewise.
1681 * elf32-ppc.c: Likewise.
1682 * elf32-s390.c: Likewise.
1683 * elf32-sh.c: Likewise.
1684 * elf32-sh64.c: Likewise.
1685 * elf32-sparc.c: Likewise.
1686 * elf32-v850.c: Likewise.
1687 * elf32-vax.c: Likewise.
1688 * elf32-xstormy16.c: Likewise.
1689 * elf32-xtensa.c: Likewise.
1690 * elf64-alpha.c: Likewise.
1691 * elf64-hppa.c: Likewise.
1692 * elf64-mips.c: Likewise.
1693 * elf64-mmix.c: Likewise.
1694 * elf64-ppc.c: Likewise.
1695 * elf64-s390.c: Likewise.
1696 * elf64-sh64.c: Likewise.
1697 * elf64-sparc.c: Likewise.
1698 * elf64-x86-64.c: Likewise.
1699 * elfcode.h: Likewise.
1700 * elflink.h: Likewise.
1701 * elfn32-mips.c: Likewise.
1702 * elfxx-ia64.c: Likewise.
1703 * elfxx-mips.c: Likewise.
1704 * i386linux.c: Likewise.
1705 * ieee.c: Likewise.
1706 * libcoff-in.h: Likewise.
1707 * linker.c: Likewise.
1708 * m68klinux.c: Likewise.
1709 * pdp11.c: Likewise.
1710 * pe-mips.c: Likewise.
1711 * peXXigen.c: Likewise.
1712 * reloc.c: Likewise.
1713 * reloc16.c: Likewise.
1714 * sparclinux.c: Likewise.
1715 * sunos.c: Likewise.
1716 * syms.c: Likewise.
1717 * versados.c: Likewise.
1718 * vms.c: Likewise.
1719 * xcofflink.c: Likewise.
1720 * bfd-in2.h: Regenerate.
1721 * libcoff.h: Regenerate.
1722 * libbfd.h: Regenerate.
1723
1724 2003-06-24 Alan Modra <amodra@bigpond.net.au>
1725
1726 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1727 local sym errors.
1728
1729 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1730 prototypes and casts. Replace PTR with void *. Formatting.
1731 * elf32-ppc.c: Likewise. Break long strings too.
1732 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1733 (ppc_elf_unhandled_reloc): Internationalize error message.
1734 * elf32-ppc.h: Remove PARAMS.
1735
1736 2003-06-23 Mark Mitchell <mark@codesourcery.com>
1737
1738 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1739 APUinfo slots.
1740 (ppc_elf_final_write_processing): Likewise.
1741
1742 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1743
1744 * elflink.h (elf_link_input_bfd): Check raw size when using
1745 kept_section to preserve debug information discarded by
1746 linkonce.
1747
1748 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1749
1750 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1751 (ppc64_elf_setup_section_lists): Set it.
1752 (ppc64_elf_relocate_section): Check sym section id against top_id.
1753 (ppc_build_one_stub): Comment on top_id.
1754
1755 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1756
1757 * config.bfd: Add tic4x-*-rtems*.
1758
1759 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1760
1761 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1762 prototypes and casts. Replace PTR with void *. Format copyright.
1763 Mention ABI links.
1764 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1765 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1766 (ppc_type_of_stub): Make r_type an enum.
1767 (ppc64_elf_size_stubs): Likewise.
1768 * elf64-ppc.h: Remove PARAMS macro.
1769
1770 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1771
1772 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1773 elf hash tab fields.
1774
1775 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1776 (ppc64_elf_info_to_howto): Likewise.
1777 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1778 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1779
1780 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1781
1782 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1783 reloc overflow on discarded eh_frame entries.
1784
1785 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1786
1787 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1788 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1789 Return error condition.
1790 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1791 that have has_gp_reloc set.
1792 (struct ppc_link_hash_table): Add stub_count.
1793 (ppc_build_one_stub): Increment it.
1794 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1795 individual fields.
1796 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1797
1798 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1799
1800 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1801 size calculation from addend. Round size up.
1802
1803 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1804
1805 * elf32-cris.c (cris_elf_relocate_section) <case
1806 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1807 symbol from a normal object or an undefined weak symbol.
1808
1809 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1810
1811 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1812 R_PPC64_TOC relocs.
1813
1814 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1815
1816 * section.c (struct sec): Put back kept_section.
1817 (STD_SECTION): Put back kept_section initialization.
1818 * bfd-in2.h: Regenerate.
1819
1820 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1821 sections for relocateable output. Use kept_section to preserve
1822 debug information discarded by linkonce.
1823
1824 2003-06-17 Roland McGrath <roland@redhat.com>
1825
1826 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1827 segment-relative relocation between different segments.
1828
1829 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1830
1831 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1832 optimizations earlier.
1833
1834 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1835 Restore previous input_list type.
1836 (ppc64_elf_link_hash_table_create): Undo last change.
1837 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1838 per output section, but don't bother with bfd_abs_section marker.
1839 (ppc64_elf_next_input_section): Adjust for multiple input section
1840 lists.
1841 (group_sections): Likewise.
1842
1843 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1844
1845 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1846 *r_offset == r_addend for RELATIVE relocs against .got.
1847
1848 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1849
1850 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1851
1852 2003-06-17 Nick Clifton <nickc@redhat.com>
1853
1854 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1855 in the vtable_entries_used array to allow for the accessing
1856 the largest element.
1857
1858 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1859
1860 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1861 input_list.
1862 (ppc64_elf_link_hash_table_create): Init input_list here.
1863 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1864 per output section. Set toc_off for abs and other standard sections.
1865 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1866 (ppc64_elf_next_input_section): Adjust for single input section list.
1867 Don't set toc_curr from input bfds that haven't set elf_gp.
1868 (group_sections): Adjust for single input section list.
1869
1870 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1871
1872 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1873
1874 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1875 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1876 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1877 got section for RELATIVE relocs. Fix wrong comment. Change condition
1878 under which dynamic relocs update the section contents.
1879
1880 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1881
1882 * config.bfd: Add i386-netbsd-gnu target.
1883
1884 2003-06-12 Nick Clifton <nickc@redhat.com>
1885
1886 * opncls.c (calc_crc32): Rename to
1887 bfd_calc_gnu_debuglink_crc32 and export.
1888 (GNU_DEBUGLINK): Define and use to replace occurrences of
1889 hard-coded ".gnu_debuglink" in the code.
1890 (get_debug_link_info): Prevent aborts by replacing call to
1891 xmalloc with a call to malloc.
1892 (find_separate_debug_file): Prevent aborts by replacing calls
1893 to xmalloc and xstrdup with calls to malloc and strdup.
1894 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1895 section to a bfd.
1896 * bfd-in2.h: Regenerate.
1897
1898 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1899
1900 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1901 New target (was i[3-7]86-*-openbsd* before).
1902 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1903 (vax-*-openbsd*): New target.
1904
1905 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1906
1907 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1908 for n32, too.
1909 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1910 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1911 (mips_elf_create_got_section): Likewise.
1912 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1913
1914 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1915
1916 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1917 (elf_mips_howto_table_rel): Use it.
1918 (gprel32_with_gp): Move prototype.
1919 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1920 Use mips_elf_generic_reloc.
1921 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1922 Code cleanup.
1923 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1924 zero addend.
1925 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1926 as in the other *_gprel*_reloc functions.
1927 (gprel32_with_gp): Handle partial_inplace properly.
1928 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1929 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1930 Do addend handling directly instead of calling
1931 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1932 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1933 of zero addend. Handle partial_inplace properly.
1934 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1935 addend.
1936 (mips_elf64_gprel16_reloc): Likewise.
1937 (mips_elf64_literal_reloc): Likewise.
1938 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1939 logic as in the other *_gprel*_reloc functions. Handle
1940 partial_inplace properly.
1941 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1942 addend. Handle partial_inplace properly.
1943 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1944 of calling _bfd_mips_elf_gprel16_with_gp.
1945 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1946 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1947 of zero addend.
1948 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1949 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1950 of calling _bfd_mips_elf_gprel16_with_gp.
1951 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1952 partial_inplace properly. Fix wrong addend handling. Fix overflow
1953 check.
1954 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1955 exported.
1956 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1957 (_bfd_mips_elf_relocate_section): Likewise.
1958 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1959 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1960 (_bfd_mips_elf_sign_extend): New prototype.
1961
1962 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
1963
1964 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1965 New target (was sparc-*-openbsd* before).
1966 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
1967
1968 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1969 * configure: Regenerate.
1970
1971 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1972
1973 * po/Make-in (DESTDIR): New.
1974 (install-data-yes): Support $(DESTDIR).
1975 (uninstall): Likewise.
1976
1977 2003-06-11 Alan Modra <amodra@bigpond.net.au>
1978
1979 * Makefile.am (config.status): Depend on version.h.
1980 Run "make dep-am".
1981 * Makefile.in: Regenerate.
1982 * po/SRC-POTFILES.in: Regenerate.
1983
1984 2003-06-10 Alan Modra <amodra@bigpond.net.au>
1985 Gary Hade <garyhade@us.ibm.com>
1986
1987 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1988
1989 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
1990
1991 * archures.c (bfd_mach_h8300sxn): New architecture.
1992 * bfd-in2.h: Regenerate.
1993 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1994 (h8300sxn_info_struct): New.
1995 (h8300sx_info_struct): Link to it.
1996 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1997 (elf32_h8_final_write_processing): Likewise.
1998
1999 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2000
2001 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2002 elfxx-target.h so that we can use elf_backend_got_header_size.
2003 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2004 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2005 associated macros.
2006 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2007 dst_mask.
2008 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2009 ppc_stub_plt_branch_r2off.
2010 (struct ppc_stub_hash_entry): Reorganize.
2011 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2012 toc_curr, toc_off and emit_stub_syms.
2013 (ppc64_elf_link_hash_table_create): Init them.
2014 (ppc_stub_name): Correct string size.
2015 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2016 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2017 used.
2018 (ppc_type_of_stub): Tweak root.type test.
2019 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2020 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2021 ppc_stub_plt_branch_r2off.
2022 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2023 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2024 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2025 Initialize elf_gp and toc_curr.
2026 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2027 (ppc64_elf_next_input_section): Set toc_off.
2028 (group_sections): Ensure groups have the same TOC.
2029 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2030 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2031 Build new glink stub.
2032 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2033 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2034 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2035 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2036 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2037 (STD_SECTION): Update.
2038 * ecoff.c (bfd_debug_section): Update comment.
2039 * bfd-in2.h: Regenerate.
2040
2041 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2042
2043 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2044 NULL function pointers.
2045
2046 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2047
2048 * simple.c (bfd_simple_get_relocated_section_contents): Call
2049 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2050
2051 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2052
2053 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2054 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2055 swaptables.
2056 * coff-tic4x.c: Ditto
2057 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2058 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2059 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2060 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2061 swap tables.
2062 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2063 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2064 * coff-apollo.c: Ditto
2065 * coff-arm.c: Ditto
2066 * coff-h8300.c: Ditto
2067 * coff-h8500.c: Ditto
2068 * coff-i960.c: Ditto
2069 * coff-m68k.c: Ditto
2070 * coff-m88k.c: Ditto
2071 * coff-mcore.c: Ditto
2072 * coff-sh.c: Ditto
2073 * coff-sparc.c: Ditto
2074 * coff-tic80.c: Ditto
2075 * coff-we32k.c: Ditto
2076 * coff-z8k.c: Ditto
2077 * coff-w65.c: Ditto
2078
2079 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2080
2081 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2082 initialization bug
2083
2084 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2085
2086 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2087 (bfd_section_from_phdr): Likewise.
2088 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2089 (get_program_header_size): Count with PT_GNU_STACK.
2090 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2091 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2092
2093 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2094
2095 * elflink.h (elf_link_input_bfd): Call linker error_handler
2096 for discarded definitions.
2097
2098 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2099
2100 * syms.c (decode_section_type): Return 'n' if section flags are
2101 SEC_HAS_CONTENTS && SEC_READONLY.
2102
2103 2003-06-03 Nick Clifton <nickc@redhat.com>
2104
2105 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2106 R_V850_ABS32. Add entry for R_V850_REL32.
2107 (v850_elf_reloc_map): Likewise.
2108 (v850_elf_check_relocs): Likewise.
2109 (v850_elf_perform_relocation): Likewise.
2110 (v850_elf_final_link_relocate): Likewise. Include computation
2111 to make R_V850_REl32 pc-relative.
2112
2113 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2114
2115 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2116 and DT_DEBUG dynamic tag even for position independent executables.
2117 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2118
2119 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2120
2121 * config.bfd: Move obsolete entries out of the range of the
2122 targmatch sed script.
2123
2124 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2125
2126 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2127
2128 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2129
2130 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2131 plt entries, not just 8191.
2132
2133 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2134
2135 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2136 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2137
2138 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2139 Jakub Jelinek <jakub@redhat.com>
2140
2141 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2142 instead of info->shared where appropriate.
2143 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2144 * elflink.c (_bfd_elf_create_got_section): Likewise.
2145 (_bfd_elf_link_create_dynamic_sections): Likewise.
2146 (_bfd_elf_link_assign_sym_version): Likewise.
2147 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2148 and DT_DEBUG dynamic tag even for position independent executables.
2149 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2150 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2151 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2152 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2153 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2154 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2155 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2156 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2157 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2158
2159 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2160
2161 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2162 signalled thread.
2163 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2164
2165 2003-05-29 Nick Clifton <nickc@redhat.com>
2166
2167 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2168 Tidy up formatting.
2169 * Makefile.am: Add dependency on safe-ctype.h.
2170 * Makefile.in: Regenerate.
2171
2172 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2173
2174 * elfxx-mips.c: Don't force symbols local unconditionally.
2175
2176 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2177
2178 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2179 undefined_symbol call.
2180
2181 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2182
2183 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2184 (mips_elf_link_hash_table): Likewise.
2185
2186 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2187
2188 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2189 R_MIPS_GNU_REL16_S2 support.
2190 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2191 (mips_elf64_rtype_to_howto): Use it.
2192 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2193 R_MIPS_GNU_REL16_S2 support.
2194 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2195 (mips_elf_n32_rtype_to_howto): Use it.
2196
2197 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2198
2199 * som.h: Define PA_2_0 before including a.out.h
2200
2201 2003-05-07 Eric Christopher <echristo@redhat.com>
2202 Alexandre Oliva <aoliva@redhat.com>
2203
2204 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2205 pic tests, change to warning.
2206 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2207
2208 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2209
2210 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2211 well as shle-...-netbsdelf. Remove duplicate entry.
2212
2213 2003-05-21 Nick Clifton <nickc@redhat.com>
2214
2215 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2216 for X_STORMY16_REL_12 reloc.
2217
2218 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2219 the type of the hash table in the bfd_link_info structure.
2220 (bfd_elf_get_runpath_list): Likewise.
2221
2222 2003-05-19 Roland McGrath <roland@redhat.com>
2223
2224 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2225 * bfd-in.h: Declare it.
2226 * bfd-in2.h: Regenerated.
2227 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2228 * elf-bfd.h (struct elf_backend_data): New function pointer member
2229 elf_backend_bfd_from_remote_memory.
2230 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2231 Declare them.
2232 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2233 (elfNN_bed): Add that to the initializer.
2234
2235 2003-05-15 Roland McGrath <roland@redhat.com>
2236
2237 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2238
2239 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2240
2241 * elflink.h (elf_link_output_extsym): Only issue error about !=
2242 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2243
2244 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2245
2246 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2247 when removing the old definition for symbols with non-default
2248 visibility.
2249
2250 2003-05-18 Jason Eckhardt <jle@rice.edu>
2251
2252 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2253
2254 2003-05-17 Andreas Schwab <schwab@suse.de>
2255
2256 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2257 elf_section_data during processing of pc-relative and absolute
2258 relocations.
2259 (elf_m68k_relocate_section): Use the cached reloc section instead
2260 of computing it again. Fix handling of visibility. Don't modify
2261 addend when copying over a relocation into the output.
2262
2263 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2264
2265 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2266 to trim plt entries. Move undefweak non-default visibility test..
2267 (allocate_dynrelocs): ..from here.
2268 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2269 dynamic_sections_created here. Update comment. Move undefweak
2270 non-default visibility test..
2271 (allocate_dynrelocs): ..from here. Fix comment.
2272 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2273 to trim plt entries. Move undefweak non-default visibility test..
2274 (allocate_dynrelocs): ..from here. Fix comment.
2275 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2276 STV_DEFAULT rather than comparing with zero.
2277 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2278 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2279
2280 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2281
2282 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2283 pointers.
2284 (_bfd_set_gp_value): Likewise.
2285
2286 2003-05-16 Michael Snyder <msnyder@redhat.com>
2287 From Bernd Schmidt <bernds@redhat.com>
2288 * archures.c (bfd_mach_h8300sx): New.
2289 * bfd-in2.h: Regenerate.
2290 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2291 (h8300sx_info_struct): New.
2292 (h8300s_info_struct): Link to it.
2293 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2294 (elf32_h8_final_write_processing): Likewise.
2295 (elf32_h8_relax_section): Likewise.
2296
2297 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2298
2299 * config.bfd: Accept i[3-7]86 variants.
2300 * configure.host: Likewise.
2301 * configure.in: Likewise.
2302 * configure: Regenerate.
2303
2304 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2305
2306 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2307 symbol.
2308
2309 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2310
2311 * elflink.h (elf_link_check_versioned_symbol): Also allow
2312 the base version.
2313
2314 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2315 H.J. Lu <hongjiu.lu@intel.com>
2316
2317 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2318 (elf_i386_relocate_section): Likewise.
2319 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2320 (ppc_elf_relocate_section): Likewise.
2321 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2322 (ppc64_elf_relocate_section): Likewise.
2323
2324 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2325
2326 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2327
2328 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2329
2330 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2331 processor capability, allow merge of HC12 and HCS12 in some cases.
2332 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2333 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2334 (bfd_m68hc12_arch): Link it.
2335 (scan_mach): New function.
2336
2337 2003-05-13 Andrew Haley <aph@redhat.com>
2338
2339 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2340
2341 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2342 H.J. Lu <hongjiu.lu@intel.com>
2343
2344 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2345 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2346 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2347 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2348 (ppc_elf_relocate_section): Likewise.
2349 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2350 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2351 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2352 relocs need no other types.
2353 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2354 dynreloc check.
2355 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2356 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2357 .got relocs.
2358
2359 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2360
2361 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2362 copy ELF_LINK_NON_GOT_REF from weakdef.
2363 (allocate_dynrelocs): For undef weak syms with non-default
2364 visibility, a) don't allocate plt entries, b) don't allocate
2365 .got relocs, c) discard dyn rel space
2366 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2367 don't generate dynamic relocs.
2368 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2369 for weakdefs when symbol already adjusted.
2370
2371 2003-05-12 Nick Clifton <nickc@redhat.com>
2372
2373 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2374 overflow detection for R_XSTORMY16_16 reloc.
2375
2376 2003-05-12 Paul Clarke <paulc@senet.com.au>
2377
2378 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2379
2380 2003-05-11 Jason Eckhardt <jle@rice.edu>
2381
2382 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2383 adjust upper bits.
2384 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2385 proper place.
2386 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2387 proper place.
2388
2389 2003-05-11 Andreas Schwab <schwab@suse.de>
2390
2391 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2392 complicated tests for unresolvable relocs with a simple direct
2393 scheme using "unresolved_reloc" var. Report some detail on
2394 bfd_reloc_outofrange and similar errors.
2395
2396 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2397
2398 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2399 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2400 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2401 * elf64-s390.c: Likewise.
2402
2403 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2404
2405 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2406 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2407 ELF_LINK_NON_GOT_REF from weakdef.
2408 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2409 already been adjusted before treating it specially.
2410 * el64-s390.c: Likwise.
2411
2412 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2413
2414 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2415 non-default visibility, a) don't make them dynamic, b) discard
2416 space for dynamic relocs.
2417 (elf_s390_relocate_section): Initialize the GOT entries and skip
2418 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2419 symbols with non-default visibility.
2420 * elf64-s390.c: Likewise.
2421
2422 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2423
2424 * cpu-arm.c (arm_check_note): Warning fix.
2425 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2426 to keep relocs if edited.
2427 (iq2000_elf_print_private_bfd_data): Return TRUE.
2428 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2429 ELF64_R_SYM.
2430 (elfNN_ia64_relax_ldxmov): Warning fix.
2431 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2432 * xtensa-modules.c (get_num_opcodes): Warning fix.
2433
2434 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2435
2436 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2437
2438 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2439
2440 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2441 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2442 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2443 (bfd_elf_record_link_assignment): Move from elflink.h.
2444 (_bfd_elf_merge_symbol): Likewise.
2445 (_bfd_elf_add_default_symbol): Likewise.
2446 (_bfd_elf_export_symbol): Likewise.
2447 (_bfd_elf_link_find_version_dependencies): Likewise.
2448 (_bfd_elf_link_assign_sym_version): Likewise.
2449 (_bfd_elf_link_read_relocs): Likewise.
2450 (_bfd_elf_link_size_reloc_section): Likewise.
2451 (_bfd_elf_fix_symbol_flags): Likewise.
2452 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2453 (_bfd_elf_link_sec_merge_syms): Likewise.
2454 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2455 and bed->s->sizeof_rela.
2456 (_bfd_elf_link_output_relocs): Likewise.
2457 * elf-bfd.h (struct elf_size_info): Rename file_align to
2458 log_file_align.
2459 (struct elf_info_failed): Move from elflink.h.
2460 (struct elf_assign_sym_version_info): Likewise.
2461 (struct elf_find_verdep_info): Likewise.
2462 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2463 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2464 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2465 _bfd_elf_link_assign_sym_version,
2466 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2467 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2468 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2469 _bfd_elf_link_sec_merge_syms): Declare.
2470 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2471 (_bfd_elf32_link_read_relocs): Likewise.
2472 (bfd_elf64_link_create_dynamic_sections): Likewise.
2473 (_bfd_elf64_link_read_relocs): Likewise.
2474 * elflink.h: Move lots o' stuff elsewhere.
2475 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2476 (bfd_elf64_record_link_assignment): Likewise.
2477 (bfd_elf_record_link_assignment): Declare.
2478 * bfd-in2.h: Regenerate.
2479 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2480 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2481 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2482 (assign_file_positions_for_segments): Likewise.
2483 (assign_file_positions_except_relocs): Likewise.
2484 (swap_out_syms, elfcore_write_note): Likewise.
2485 * elf-m10200.c: Adjust for changed function names.
2486 * elf-m10300.c: Likewise.
2487 * elf32-arm.h: Likewise.
2488 * elf32-h8300.c: Likewise.
2489 * elf32-hppa.c: Likewise.
2490 * elf32-ip2k.c: Likewise.
2491 * elf32-m32r.c: Likewise.
2492 * elf32-m68hc11.c: Likewise.
2493 * elf32-m68hc1x.c: Likewise.
2494 * elf32-m68k.c: Likewise.
2495 * elf32-mips.c: Likewise.
2496 * elf32-ppc.c: Likewise.
2497 * elf32-sh.c: Likewise.
2498 * elf32-v850.c: Likewise.
2499 * elf32-xtensa.c: Likewise.
2500 * elf64-alpha.c: Likewise.
2501 * elf64-hppa.c: Likewise.
2502 * elf64-mmix.c: Likewise.
2503 * elf64-ppc.c: Likewise.
2504 * elf64-sh64.c: Likewise.
2505 * elfxx-ia64.c: Likewise.
2506 * elfxx-mips.c: Likewise.
2507 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2508 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2509 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2510 * elf64-mips.c (mips_elf64_size_info): Likewise.
2511 * elf64-s390.c (s390_elf64_size_info): Likewise.
2512 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2513
2514 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2515
2516 * elflink.h (elf_add_default_symbol): After skipping the
2517 unversioned symbol, go to non-default one.
2518
2519 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2520
2521 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2522 want_plt field.
2523 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2524 for symbols with non-default visibility.
2525
2526 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2527
2528 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2529 case that a DSO references a hidden symbol which may be
2530 satisfied by a versioned symbol in another DSO.
2531 (elf_link_output_extsym): Check versioned definition for hidden
2532 symbol referenced by a DSO.
2533
2534 2003-05-07 Nick Clifton <nickc@redhat.com>
2535
2536 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2537 R_XSTORMY16_16 reloc to ignore overflows.
2538
2539 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
2540
2541 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2542 error message for mixing different-endian files. Check for ABI
2543 compatibility of input files with the selected emulation.
2544
2545 2003-05-05 Alan Modra <amodra@bigpond.net.au>
2546
2547 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2548 non-default visibility, a) don't make them dynamic, b) discard
2549 space for dynamic relocs.
2550 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2551
2552 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2553 non-default visibility, a) don't allocate plt entries, b) don't
2554 allocate .got relocs, c) discard dyn rel space,
2555 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2556 don't generate dynamic relocs.
2557 * elf64-ppc.c (allocate_dynrelocs): As above.
2558 (ppc64_elf_relocate_section): As above.
2559
2560 2003-05-05 Andreas Jaeger <aj@suse.de>
2561
2562 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2563 relocation entries for weak undefined symbols with non-default
2564 visibility.
2565 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2566 skip R_386_32/R_386_PC32 for weak undefined symbols with
2567 non-default visibility.
2568
2569 2003-05-04 H.J. Lu <hjl@gnu.org>
2570
2571 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2572 relocation entries for weak undefined symbols with non-default
2573 visibility.
2574 (elf_i386_relocate_section): Initialize the GOT entries and
2575 skip R_386_32/R_386_PC32 for weak undefined symbols with
2576 non-default visibility.
2577
2578 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2579 descriptors for weak undefined symbols with non-default
2580 visibility.
2581 (allocate_dynrel_entries): Don't allocate relocation entries
2582 for symbols resolved to 0.
2583 (set_got_entry): Don't install dynamic relocation for weak
2584 undefined symbols with non-default visibility.
2585 (set_pltoff_entry): Likewise.
2586
2587 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2588 with non-default visibility.
2589 (elf_link_output_extsym): Don't make weak undefined symbols
2590 with non-default visibility dynamic.
2591
2592 2003-05-04 H.J. Lu <hjl@gnu.org>
2593
2594 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2595
2596 2003-05-04 H.J. Lu <hjl@gnu.org>
2597
2598 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2599 symbol dynamic. Check indirection when removing the old
2600 definition for symbols with non-default visibility.
2601 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2602
2603 2003-05-02 Nick Clifton <nickc@redhat.com>
2604
2605 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2606 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2607 unsigned overflow.
2608
2609 2003-05-02 Andreas Jaeger <aj@suse.de>
2610
2611 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2612 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2613 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2614 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2615 ELF_LINK_NON_GOT_REF from weakdef.
2616
2617 2003-05-02 Charles Lepple <clepple@ghz.cc>
2618 Nick Clifton <nickc@redhat.com>
2619
2620 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2621 * aclocal.m4: Regenerate.
2622 * configure: Regenerate.
2623 * Makefile.in: Regenerate.
2624
2625 2003-05-01 Alan Modra <amodra@bigpond.net.au>
2626
2627 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2628 weakdef sym has already been adjusted before treating it specially.
2629 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2630 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2631 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2632 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
2633
2634 2003-04-28 H.J. Lu <hjl@gnu.org>
2635
2636 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2637 the relax finalize pass.
2638
2639 * section.c (struct sec): Add need_finalize_relax and remove
2640 flag11.
2641 (STD_SECTION): Update struct sec initializer.
2642 * bfd-in2.h: Regenerated.
2643
2644 2003-04-28 H.J. Lu <hjl@gnu.org>
2645
2646 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2647 to copy any information related to dynamic linking when we flip
2648 the indirection.
2649
2650 2003-04-27 H.J. Lu <hjl@gnu.org>
2651
2652 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2653 (ELF_LINK_DYNAMIC_WEAK): New.
2654
2655 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2656 a symbol should be skipped. Ignore definitions in dynamic
2657 objects for symbols with non-default visibility.
2658 (elf_add_default_symbol): Adjusted.
2659 (elf_link_add_object_symbols): Check if a symbol should be
2660 skipped. Don't merge the visibility field with the one from
2661 a dynamic object.
2662 (elf_link_check_versioned_symbol): Use undef_bfd.
2663 (elf_link_output_extsym): Warn if a forced local symbol is
2664 referenced from dynamic objects. Make non-weak undefined symbol
2665 with non-default visibility a fatal error.
2666
2667 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
2668
2669 * configure.in: Bump version on HEAD to 2.14.90.
2670 * configure: Regenerated.
2671
2672 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2673
2674 PR savannah/3331:
2675 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2676 when we couldn't relax something.
2677
2678 2003-04-25 Alan Modra <amodra@bigpond.net.au>
2679
2680 * elflink.h (elf_merge_symbol): When we find a regular definition
2681 for an indirect symbol, flip the indirection so that the old
2682 direct symbol now points to the new definition.
2683
2684 2003-04-24 Roland McGrath <roland@redhat.com>
2685
2686 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2687
2688 2003-04-24 Alan Modra <amodra@bigpond.net.au>
2689
2690 * elf32-ppc.c: Formatting and comment fixes.
2691 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2692 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2693
2694 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
2695
2696 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2697 * bfd-in2.h: Rebuilt.
2698 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
2699 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
2700 & H8300SNMAGIC.
2701 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2702 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2703 (h8300sn_info_struct, h8300hn_info_struct): New.
2704 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2705 (elf32_h8_final_write_processing): Likewise.
2706
2707 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2708
2709 * elf32-sh.c (tpoff): New.
2710 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2711 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2712 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
2713 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
2714 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
2715 (dtpoff_base): Fix wrong indentation.
2716 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2717 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2718 R_SH_TLS_TPOFF32 relocations.
2719
2720 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2721
2722 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2723 * cpu-sh.c: Likewise.
2724 * elf32-sh.c: Likewise.
2725 * reloc.c (bfd_reloc_code_real): Likewise.
2726 * elf32-sh64-com.c: Change comment to refer to SuperH.
2727 * elf32-sh64.c: Likewise.
2728 * elf64-sh64.c: Likewise.
2729 * bfd-in2.h (enum bfd_architecture): Regenerate.
2730
2731 2003-04-23 Alan Modra <amodra@bigpond.net.au>
2732
2733 From Julien LEMOINE <speedblue@debian.org>
2734 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2735 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2736
2737 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2738
2739 * archures.c: Replace references to Mitsubishi M32R with references
2740 to Renesas M32R.
2741 * relocs.c: Likewise.
2742 * bfd-in2.h: Regenerate.
2743
2744 2003-04-21 Richard Henderson <rth@redhat.com>
2745
2746 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2747 executable when a symbol is defined both regular and dynamic.
2748
2749 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2750
2751 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2752 (elf32-m68hc1x.lo): Update dependencies
2753 * configure.in: Add elf32-m68hc1x.lo.
2754 * configure: Rebuild.
2755 * Makefile.in: Rebuild.
2756
2757 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2758
2759 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2760 (m68hc11_elf_hash_table_create): New function.
2761 (elf32_m68hc11_link_hash_table_free): New function.
2762 (stub_hash_newfunc): New function.
2763 (m68hc11_add_stub): New function.
2764 (elf32_m68hc11_add_symbol_hook): New function.
2765 (elf32_m68hc11_setup_section_lists): New function.
2766 (elf32_m68hc11_next_input_section): New function.
2767 (elf32_m68hc11_size_stubs): New function.
2768 (elf32_m68hc11_build_stubs): New function.
2769 (m68hc11_get_relocation_value): New function.
2770 (elf32_m68hc11_relocate_section): Call the above to redirect
2771 some relocations to the trampoline code.
2772 (m68hc11_elf_export_one_stub): New function.
2773 (m68hc11_elf_set_symbol): New function.
2774 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2775 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2776 is not yet initialized.
2777
2778 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2779 (elf32_m68hc11_stub_hash_entry): New struct.
2780 (m68hc11_page_info): Add trampoline handler address.
2781 (m68hc11_elf_link_hash_table): Add stubs generation members.
2782 (elf32_m68hc11_add_symbol_hook): Declare.
2783 (elf32_m68hc11_setup_section_lists): Declare.
2784 (elf32_m68hc11_size_stubs): Declare.
2785 (elf32_m68hc11_build_stubs): Declare.
2786
2787 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2788 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2789 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2790 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2791 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2792 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2793 (bfd_elf32_bfd_link_hash_table_create): Define.
2794 (elf_backend_add_symbol_hook): Define.
2795 (m68hc11_elf_bfd_link_hash_table_create): New function.
2796 (m68hc11_elf_build_one_stub): New function.
2797 (m68hc11_elf_size_one_stub): New function.
2798 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2799 (bfd_elf32_bfd_link_hash_table_create): Define.
2800
2801 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2802 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2803 (m68hc12_phys_addr): Ditto.
2804 (m68hc12_phys_page): Ditto.
2805 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2806 (elf32_m68hc11_gc_mark_hook): Likewise.
2807 (elf32_m68hc11_gc_sweep_hook): Likewise.
2808 (elf32_m68hc11_check_relocs): Likewise.
2809 (elf32_m68hc11_relocate_section): Likewise.
2810 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2811 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2812 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2813 (m68hc12_elf_build_one_stub): New function.
2814 (m68hc12_elf_size_one_stub): New function.
2815 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2816 (elf_backend_add_symbol_hook): Define.
2817 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2818
2819 2003-04-18 Nick Clifton <nickc@redhat.com>
2820
2821 * format.c (bfd_check_format_matches): Only check associated
2822 vector if the matching_vector has been created.
2823
2824 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2825
2826 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2827 2003-04-09's change.
2828
2829 2003-04-15 Brian Ford <ford@vss.fsi.com>
2830
2831 * peicode.h (coff_swap_scnhdr_in): If a section holds
2832 uninitialized data and is from an object file or from an
2833 executable image that has not initialized the s_size field, or if
2834 the physical size is padded, use the virtual size (stored in
2835 s_paddr) instead.
2836
2837 2003-04-15 H.J. Lu <hjl@gnu.org>
2838
2839 * elflink.h (elf_link_add_object_symbols): Properly report
2840 filename for alignment reduction.
2841
2842 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2843
2844 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2845 * reloc.c: Likewise.
2846 * coff-h8300.c: Likewise.
2847 * coff-h8500.c: Likewise.
2848 * coff-sh.c: Likewise.
2849 * cpu-h8300.c: Likewise.
2850 * cpu-sh.c: Likewise.
2851 * elf32-h8300.c: Likewise.
2852 * elf32-sh.c: Likewise.
2853 * elf32-sh64-com.c: Likewise.
2854 * elf32-sh64.c: Likewise.
2855 * elf64-sh64.c: Likewise.
2856 * bfd-in2.h: Regenerate.
2857
2858 2003-04-14 H.J. Lu <hjl@gnu.org>
2859
2860 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2861 alignment for common symbols. Warn reducing alignment for
2862 common symbols. Report old filename when symbol size changes.
2863
2864 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2865
2866 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2867 occurrences of the same test changed in the previous patch.
2868 Optimize.
2869
2870 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2871
2872 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2873 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2874 GOT_DISP/addend only if the symbol got a global GOT entry.
2875
2876 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2877
2878 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2879 GOT_PAGE/GOT_OFST referencing overridable symbol to
2880 GOT_DISP/addend.
2881 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2882 global symbol as GOT_DISP.
2883
2884 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2885
2886 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2887 next relocation on an undefined symbol.
2888
2889 2003-04-09 Richard Henderson <rth@redhat.com>
2890
2891 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2892 Ignore relocations against r_symndx == 0.
2893
2894 2003-04-09 H.J. Lu <hjl@gnu.org>
2895
2896 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2897 FALSE for undefined symbols.
2898 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2899
2900 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2901
2902 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2903 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2904 addr_size.
2905
2906 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2907
2908 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2909 pointer size from ABI, not arch_bits_per_address.
2910
2911 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2912
2913 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2914 constants for n32 ABI.
2915
2916 2003-04-06 Andrew Cagney <cagney@redhat.com>
2917
2918 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2919 free that leads to GDB vs BFD memory corruption.
2920
2921 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2922
2923 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2924 symbols that mark the end of the section.
2925 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2926 converting to a relative branch so that the offset is computed after
2927 the relaxation; also relocate a jsr into a bsr if possible but don't
2928 relax them if they are to a far symbol as we need to call the
2929 trampoline code.
2930 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2931
2932 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2933
2934 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2935 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2936 * bfd-in2.h: Regenerate
2937 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2938 * cpu-tic4x.c: Ditto
2939
2940 2003-04-03 Nick Clifton <nickc@redhat.com>
2941
2942 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2943 differently for object files and executables.
2944 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2945 for object files or for executables who have not already
2946 initialised the field.
2947 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2948 the PE format bfd is an executable.
2949
2950 2003-04-03 Alan Modra <amodra@bigpond.net.au>
2951
2952 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2953 here as it's too early to reliably determine locality.
2954 (ppc_elf_gc_sweep_hook): Likewise.
2955 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2956
2957 2003-04-02 Bob Wilson <bob.wilson@acm.org>
2958
2959 * xtensa-modules.c: Remove comment indicating that this is a
2960 generated file.
2961
2962 2003-04-02 Alan Modra <amodra@bigpond.net.au>
2963
2964 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2965
2966 2003-04-01 Bob Wilson <bob.wilson@acm.org>
2967
2968 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2969 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2970 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2971 xtensa-modules.lo.
2972 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2973 xtensa-modules.c.
2974 (cpu-xtensa.lo): New target.
2975 (elf32-xtensa.lo): Likewise.
2976 (xtensa-isa.lo): Likewise.
2977 (xtensa-modules.lo): Likewise.
2978 * Makefile.in: Regenerate.
2979 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2980 (bfd_archures_list): Add bfd_xtensa_arch.
2981 * config.bfd: Handle xtensa-*-*.
2982 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2983 * configure: Regenerate.
2984 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2985 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2986 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2987 (bfd_elf32_xtensa_le_vec): Likewise.
2988 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2989 * cpu-xtensa.c: New file.
2990 * elf32-xtensa.c: Likewise.
2991 * xtensa-isa.c: Likewise.
2992 * xtensa-modules.c: Likewise.
2993 * libbfd.h: Regenerate.
2994 * bfd-in2.h: Likewise.
2995
2996 2003-04-01 Nick Clifton <nickc@redhat.com>
2997
2998 * archures.c (bfd_mach_arm_unknown): Define.
2999 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3000 bfd_arm_get_mach_from_notes): Prototype.
3001 * bfd-in2.h: Regenerate.
3002 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3003 bfd_arm_merge_machines.
3004 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3005 * coffcode.h (coff_set_arch_mach_hook): Call
3006 bfd_arm_get_mach_from_notes.
3007 * coffgen.c (coff_real_object_p): Revert previous delta.
3008 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3009 .note section.
3010 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3011 binaries compiled for different architectures..
3012 (bfd_arm_update_notes): New function: Update an ARM note section.
3013 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3014 number from an ARM note section.
3015 * elf32-arm.h (elf32_arm_object_p): Use
3016 bfd_arm_get_mach_from_notes.
3017 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3018 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3019
3020 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3021
3022 * dwarf2.c (read_attribute_value): Correct typo in comment.
3023
3024 2003-04-01 Nick Clifton <nickc@redhat.com>
3025
3026 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3027 instead of concat().
3028 (decode_line_info): Only free filename if it is not NULL.
3029 (add_line_info): Make a copy of the filename when storing it into
3030 the info structure.
3031
3032 2003-03-31 Andreas Schwab <schwab@suse.de>
3033 Daniel Jacobowitz <drow@mvista.com>
3034
3035 * simple.c (bfd_simple_get_relocated_section_contents): Add
3036 parameter symbol_table. Optionally use it instead of the symbol
3037 table from the bfd. Save and restore output offsets and output
3038 sections around bfd_get_relocated_section_contents. Fix a memory
3039 leak.
3040 (simple_save_output_info, simple_restore_output_info): New
3041 functions.
3042 * bfd-in2.h: Regenerate.
3043 * dwarf2.c (read_abbrevs): Use
3044 bfd_simple_get_relocated_section_contents instead of
3045 bfd_get_section_contents.
3046 (decode_line_info): Likewise.
3047 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3048 find_rela_addend.
3049 (find_rela_addend): Remove.
3050 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3051 debugging sections.
3052 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3053 not bfd_zalloc.
3054
3055 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3056
3057 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3058 bfd_alloc.
3059 * dwarf2.c (concat_filename): Always allocate space for the
3060 returned filename.
3061 (decode_line_info): Free the allocated filename returned by
3062 concat_filename.
3063 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3064 * elf.c (copy_private_bfd_data): Likewise.
3065 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3066 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3067 * format.c (bfd_check_format_matches): Likewise.
3068 * linker.c (bfd_generic_final_link): Likewise.
3069 * opncls.c (find_separate_debug_info): Likewise.
3070 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3071
3072 2003-03-28 H.J. Lu <hjl@gnu.org>
3073
3074 * elflink.h (elf_link_add_object_symbols): Correctly combine
3075 visibilities.
3076
3077 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3078
3079 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3080 to -1 before recomputing got offsets.
3081
3082 2003-03-26 Andreas Schwab <schwab@suse.de>
3083
3084 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3085 (elf_m68k_relocate_section): Use it to correctly handle symbols
3086 forced to be local.
3087 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3088 entries for symbols that are forced to be local.
3089
3090 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3091
3092 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3093 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3094 * elfn32-mips.c, elf64-mips.c: Use it.
3095
3096 2003-03-25 Stan Cox <scox@redhat.com>
3097 Nick Clifton <nickc@redhat.com>
3098
3099 Contribute support for Intel's iWMMXt chip - an ARM variant:
3100
3101 * archures.c: Add bfd_mach_arm_iWMMXt.
3102 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3103 * bfd-in2.h: Regenerate.
3104 * libbfd.h: Regenerate.
3105 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3106 object files to be linked with XScale ones.
3107 (coff_arm_final_link_postscript): Update note section.
3108 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3109 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3110 after identifying a coff binary.
3111 * cpu-arm.c (processors): Add iWMMXt.
3112 (arch_inf): Likewise.
3113 * elf32-arm.h (arm_object_p): Handle note section.
3114 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3115 be linked with XScale ones.
3116 (elf32_arm_section_flags): New function: Set flags on note section.
3117 (elf32_arm_final_write_processing): Handle note section.
3118
3119 2003-03-21 DJ Delorie <dj@redhat.com>
3120
3121 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3122 _bfd_elf_rela_local_sym.
3123
3124 2003-03-20 H.J. Lu <hjl@gnu.org>
3125
3126 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3127 non-ELF outputs.
3128
3129 2003-03-20 Nick Clifton <nickc@redhat.com>
3130
3131 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3132 $idata5 in case bfd_coff_final_link is not called.
3133
3134 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3135
3136 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3137 field.
3138 (canon_reloc_count): Define.
3139 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3140 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3141 reloc_count.
3142 (sparc64_elf_canonicalize_reloc): New routine.
3143 (bfd_elf64_canonicalize_reloc): Define.
3144
3145 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3146
3147 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3148 againt mergeable sections. Take r_addend into account when caching
3149 trampolines.
3150
3151 2003-03-18 Richard Henderson <rth@redhat.com>
3152
3153 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3154 local symbols that have no dyninfo.
3155
3156 2003-03-14 Gene Smith <gene.smith@siemens.com>
3157
3158 * ieee.c (ieee_write_expression): Handle the case where symbol is
3159 NULL.
3160 General formatting improvements.
3161
3162 2003-03-13 Nick Clifton <nickc@redhat.com>
3163
3164 * configure.in (LINGUAS): Add zh_CN.
3165 * configure: Regenerate.
3166 * po/zh_CN.po: New file.
3167
3168 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3169
3170 * aout-cris.c (BYTES_IN_WORD): Don't define.
3171 aout-encap.c: Likewise.
3172 aout-ns32k.c: Likewise.
3173 aout-tic30.c: Likewise.
3174 hp300bsd.c: Likewise.
3175 i386aout.c: Likewise.
3176 i386dynix.c: Likewise.
3177 i386linux.c: Likewise.
3178 i386lynx.c: Likewise.
3179 i386mach3.c: Likewise.
3180 m68k4knetbsd.c: Likewise.
3181 m68klinux.c: Likewise.
3182 m68klynx.c: Likewise.
3183 m68knetbsd.c: Likewise.
3184 m88kmach3.c: Likewise.
3185 mipsbsd.c: Likewise.
3186 newsos3.c: Likewise.
3187 sparclinux.c: Likewise.
3188 sparclynx.c: Likewise.
3189 sparcnetbsd.c: Likewise.
3190 vaxbsd.c: Likewise. Fix comment formatting.
3191
3192 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3193
3194 * Reverted 2003-03-02's patch.
3195
3196 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3197 overridable.
3198 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3199 mips_elf64_get_dynamic_reloc_upper_bound,
3200 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3201 (bfd_elf64_get_canonicalize_reloc,
3202 bfd_elf64_get_dynamic_reloc_upper_bound,
3203 bfd_elf64_canonicalize_dynamic_reloc): Define.
3204 (mips_elf64_slurp_reloc_table): Support dynamic.
3205 (mips_elf64_slurp_one_reloc_table): Adjust.
3206
3207 2003-03-12 Nick Clifton <nickc@redhat.com>
3208
3209 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3210 'index' to 'offset' in test for zero value.
3211
3212 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3213
3214 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3215 dynamic relocations pointing to local or section symbols, use the
3216 NULL symbol instead. Document the choice to not emit an
3217 additional R_MIPS_64 relocation.
3218
3219 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3220
3221 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3222 zero index dynamic tls relocs generated for the GOT. Tidy code.
3223 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3224 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3225
3226 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3227
3228 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3229 a tls_get_addr call.
3230
3231 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3232 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3233 ELF_LINK_NON_GOT_REF from weakdef.
3234 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3235 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3236 ELF_LINK_NON_GOT_REF from weakdef.
3237 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3238 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3239 ELF_LINK_NON_GOT_REF from weakdef.
3240
3241 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3242 Andrew Haley <aph@redhat.com>
3243
3244 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3245 output is relocateable.
3246
3247 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3248
3249 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3250 R_COMMENT.
3251
3252 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3253
3254 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3255 error messages.
3256 (ELIMINATE_COPY_RELOCS): Define to zero.
3257 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3258 TLSLD relocs. Report reloc types on a number of errors. Optimize
3259 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3260 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3261 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3262 calculating TLSLD relocs. Report reloc types on a number of errors.
3263 Don't capitalize error messages.
3264
3265 2003-03-03 H.J. Lu <hjl@gnu.org>
3266
3267 * elfxx-ia64.c (USE_BRL): Removed.
3268 (oor_ip): Removed.
3269
3270 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3271
3272 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3273 relocation (no special function), and make it non-partial_inplace.
3274 (sh_elf_relax_section): When creating a bsr, use a consistent value
3275 no matter if the symbol is extern or not; set addend to -4.
3276 Don't swap load / non-load instructions for SH4.
3277 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3278 rather than if the symbol is external to determine if adjusting the
3279 offset makes sense. Adjust the addend too if appropriate.
3280 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3281 relocation.
3282
3283 2003-03-03 Nick Clifton <nickc@redhat.com>
3284
3285 * po/da.po: Installed latest translation.
3286
3287 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3288
3289 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3290 R_MIPS_PC16 to rightshift 2.
3291 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3292 (bfd_elf32_bfd_reloc_type_lookup): Support
3293 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3294 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3295 R_MIPS_PC16 to rightshift 2.
3296 (mips_elf64_howto_table_rela): Likewise.
3297 (mips_reloc_map): Map to rightshifted BFD reloc.
3298 * elfn32-mips.c: The same as in elf64-mips.c.
3299 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3300 (mips_elf_calculate_relocation): Handle rightshifted addends for
3301 R_MIPS_PC16.
3302 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3303 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3304 * libbfd.h: Regenerate.
3305 * bfd-in2.h: Regenerate.
3306
3307 2003-02-28 Richard Henderson <rth@redhat.com>
3308
3309 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3310 for ltoff22x relaxation.
3311
3312 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3313
3314 * bfd-in.h (_bfd): Don't define.
3315 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3316 * syms.c: Likewise.
3317 * bfd-in2.h: Regenerate.
3318
3319 2003-02-27 Richard Henderson <rth@redhat.com>
3320
3321 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3322 (elfNN_ia64_check_relocs): Set it.
3323 (allocate_global_data_got): Check it.
3324 (allocate_local_got): Likewise.
3325 (allocate_dynrel_entries): Likewise.
3326 (elfNN_ia64_relax_ldxmov): New.
3327 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3328 (elfNN_ia64_choose_gp): Split out from ...
3329 (elfNN_ia64_final_link): ... here.
3330
3331 2003-02-27 Andrew Cagney <cagney@redhat.com>
3332
3333 * bfd.c (struct bfd): Rename "struct _bfd".
3334 * bfd-in.h: Update copyright.
3335 (struct bfd): Rename "struct _bfd".
3336 (_bfd): Define for backward compatibility.
3337 * bfd-in2.h: Regenerate.
3338
3339 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3340
3341 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3342 and rel_hdr2 when initially counting input relocs rather than after
3343 creating output reloc sections.
3344 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3345 sizes.
3346
3347 * Makefile.am: Run "make dep-am".
3348 * Makefile.in: Regenerate.
3349
3350 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3351
3352 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3353 (elfcore_grog_nto_note): New function.
3354 (elfcore_grog_nto_gregs): New function.
3355 (elfcore_grog_nto_status): New function.
3356
3357 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3358
3359 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3360 section flags before concluding that we've already been called.
3361 Don't use register keyword.
3362 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3363 (_bfd_elf_create_linker_section): Formatting.
3364
3365 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3366
3367 * coff-h8300.c: Fix typo: intial -> initial.
3368 * coff-ppc.c: Likewise.
3369
3370 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3371
3372 * elf32-ppc.c: Formatting.
3373 (allocate_dynrelocs): LD and GD relocs against the same sym need
3374 separate GOT entries.
3375 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3376 entries per symbol.
3377
3378 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3379
3380 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3381 removal. Localize vars. Remove unnecessary dynobj test.
3382 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3383 of INFO.
3384 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3385 and optimize.
3386 (elf_i386_relocate_section): Likewise.
3387 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3388 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3389 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3390 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3391 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3392 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3393 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3394 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3395 Formatting.
3396
3397 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3398 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3399 test.
3400 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3401 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3402 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3403 and optimize. Use ELIMINATE_COPY_RELOCS.
3404 (ppc64_elf_relocate_section): Likewise.
3405
3406 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3407 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3408 (ELIMINATE_COPY_RELOCS): Define.
3409 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3410 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3411 (MUST_BE_DYN_RELOC): Define.
3412 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3413 and optimize. Trim dyn_relocs.
3414 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3415 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3416 track of pc_rel dyn relocs.
3417 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3418 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3419 allocate_dynrelocs. Don't recalculate "sec".
3420
3421 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3422
3423 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3424 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3425 on invalid LD relocs.
3426 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3427 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3428 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3429
3430 * elf32-ppc.h: New file.
3431 * elf32-ppc.c: Include elf32-ppc.h.
3432 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3433 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3434 Add "tls_mask" field.
3435 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3436 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3437 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3438 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3439 Make use of htab shortcuts throughout file.
3440 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3441 (ppc_elf_link_hash_table_create): Init new fields.
3442 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3443 (ppc_elf_howto_raw): Add tls relocs.
3444 (ppc_elf_reloc_type_lookup): Handle them.
3445 (ppc_elf_unhandled_reloc): New function.
3446 (ppc_elf_create_got): Stash got section pointer in hash table,
3447 return status. Make .rela.got too.
3448 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3449 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3450 NON_GOT_REF set. Don't allocate space in .plt here..
3451 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3452 not allocating plt entries unnecessarily. Allocate got entries here.
3453 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3454 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3455 "info" during allocate_dynrelocs hash traversal. Use htab section
3456 shortcuts rather than searching for named sections. Get rid of
3457 "plt" and "strip" booleans.
3458 (update_local_sym_info, bad_shared_reloc): New functions.
3459 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3460 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3461 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3462 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3463 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3464 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3465 relocs that might use a plt entry. Set NON_GOT_REF too.
3466 Enumerate all do-nothing relocs.
3467 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3468 tls relocs and all plt relocs.
3469 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3470 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3471 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3472 shortcuts.
3473 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3474 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3475 entries and got relocs here. Warn on non-zero got reloc addend.
3476 Split out branch taken/not taken reloc code into a separate switch
3477 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3478 Split out HA reloc adjustments to separate switch statement. Don't
3479 warn on reloc overflow if we've already warned about undefined.
3480 Don't rebuild sym name when reporting errors. Report all possible
3481 errors from _bfd_final_link_relocate.
3482 (bfd_elf32_bfd_final_link): Don't define.
3483
3484 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3485
3486 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3487 rebuild sym name when reporting errors.
3488
3489 2003-02-17 Nick Clifton <nickc@redhat.com>
3490
3491 * elflink.h (elf_link_output_extsym): Only check
3492 allow_shlib_undefined for shared libraries.
3493 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3494 of allow_shlib_undefined.
3495 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3496 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3497 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3498 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3499 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3500 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3501 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3502 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3503 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3504 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3505 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3506 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3507 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3508 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3509 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3510 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3511
3512 2003-02-17 Nick Clifton <nickc@redhat.com>
3513
3514 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3515 address field to use in the comparison.
3516 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
3517
3518 2003-02-14 Bob Wilson <bob.wilson@acm.org>
3519
3520 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3521 backends when checking if the generic ELF target should be used.
3522
3523 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3524 outside of functions, treat values as absolute addresses.
3525
3526 * bfd.c: Change embedded documentation to use consistent indentation
3527 and to split up long lines. Change informal style of description
3528 for functions lacking real documentation.
3529 * coffcode.h: Break up long lines in embedded documentation.
3530 * format.c: Likewise.
3531 * targets.c: Likewise.
3532 * libcoff.h: Regenerate.
3533 * bfd-in2.h: Regenerate.
3534
3535 2003-02-14 Alan Modra <amodra@bigpond.net.au>
3536
3537 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3538 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3539 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3540 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3541 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3542 (group_sections): Don't share a stub section if stubs are for a large
3543 section. Adjust comment.
3544 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3545 !stubs_always_before_branch.
3546 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3547 treat undefined and undefweak specially when processing dyn relocs.
3548
3549 2003-02-13 Jakub Jelinek <jakub@redhat.com>
3550
3551 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3552
3553 2003-02-13 Nick Clifton <nickc@redhat.com>
3554
3555 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3556 in computation of offset to insert into BL instruction.
3557
3558 2003-02-11 Uwe Stieber <uwe@wwws.de>
3559
3560 * config.bfd: Add support for kaOS as cross build target system.
3561
3562 2003-02-11 Alan Modra <amodra@bigpond.net.au>
3563
3564 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3565 .__tls_get_addr too.
3566 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3567
3568 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3569
3570 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3571 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3572 (sh_elf_link_hash_newfunc): Remove the initialization of
3573 tls_tpoff32 field.
3574 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3575 for which tls_tpoff32 flag is set.
3576 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3577 of the symbol includes the entry matched with the input_section
3578 and having tls_tpoff32 flag on. When linking statically, set
3579 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3580 is defined in this executable.
3581 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3582
3583 2003-02-10 Jakub Jelinek <jakub@redhat.com>
3584
3585 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3586 even if there is just non-empty .rela.plt.
3587
3588 2003-02-10 Nick Clifton <nickc@redhat.com>
3589
3590 * archures.c (bfd_mach_arm_ep9312): Define.
3591 * bfd-in2.h: Regenerate.
3592 * cpu-arm.c (processors[]): Add ep9312.
3593 (bfd_arm_arch): Add ep9312.
3594 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3595 messages and add test for Maverick floating point support.
3596 (elf32_arm_print_private_bfd_data): Handle
3597 EF_ARM_MAVERICK_FLOAT flag.
3598 (elf32_arm_object_p): New function.
3599 (elf_backend_object_p): Define.
3600
3601 2003-02-10 Alan Modra <amodra@bigpond.net.au>
3602
3603 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3604 variables, structure fields or function params to tls_mask or
3605 similar to better reflect usage.
3606 (struct got_entry): Comment.
3607 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
3608 (get_tls_mask): Rename from get_tls_type.
3609
3610 2003-02-09 Alan Modra <amodra@bigpond.net.au>
3611
3612 * elf64-ppc.c (TLS_GD_LD): Don't define..
3613 (TLS_GD): ..define this instead and update all uses.
3614 (TLS_TPRELGD): Define.
3615 (ppc64_elf_link_hash_table_create): Tweak initialization of
3616 init_refcount and init_offset.
3617 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3618 Mark second slot of GD or LD toc entries.
3619 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3620 from other tls types.
3621 (ppc64_elf_tls_setup): New function, split out from..
3622 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3623 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3624 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3625 return value to properly decide whether toc GD and LD entries can
3626 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3627 to determine GD or LD rather than looking at TLS_LD flag. Don't
3628 attempt to adjust got entry tls_type here..
3629 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3630 look for possible merges.
3631 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3632 optimization.
3633 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3634 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3635 Make use of return value from get_tls_type to properly detect GD and
3636 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3637 handle tls_get_addr removal when looking at REL24 relocs, do it when
3638 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3639 GD or LD.
3640 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3641
3642 2003-02-08 Alan Modra <amodra@bigpond.net.au>
3643
3644 * elf32-hppa.c (group_sections): Don't share a stub section if
3645 stubs are for a large section.
3646
3647 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3648 stubs if !stubs_always_before_branch.
3649
3650 2003-02-07 Nick Clifton <nickc@redhat.com>
3651
3652 * elf.c (swap_out_syms): Generate an error message if an
3653 equivalent output section cannot be found for a symbol.
3654
3655 2003-02-07 Jakub Jelinek <jakub@redhat.com>
3656
3657 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3658 local_got_entries is NULL.
3659
3660 2003-02-06 Andreas Schwab <schwab@suse.de>
3661
3662 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3663 (read_value): Add parameter is_signed, use signed extraction if
3664 the value is signed.
3665 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3666 encoding to read_value.
3667
3668 2003-02-06 Alan Modra <amodra@bigpond.net.au>
3669
3670 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3671 plt info when called to transfer weak sym info.
3672
3673 2003-02-05 Alan Modra <amodra@bigpond.net.au>
3674
3675 * reloc.c: Add PPC and PPC64 TLS relocs.
3676 * libbfd.h: Regenerate.
3677 * bfd-in2.h: Regenerate.
3678 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3679 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3680 against a 32 bit field.
3681 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3682 (_ppc64_elf_section_data): Add t_symndx and comments.
3683 (ppc64_elf_section_data): Use elf_section_data macro.
3684 (ppc64_elf_new_section_hook): American spelling.
3685 (struct got_entry, struct plt_entry): New.
3686 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3687 (struct ppc_stub_hash_entry): Add "addend" field.
3688 (struct ppc_link_hash_entry): Add "tls_type".
3689 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3690 TLS_EXPLICIT): Define.
3691 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3692 (link_hash_newfunc): Init new fields.
3693 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
3694 init_offset to NULL.
3695 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3696 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3697 there.
3698 (update_local_sym_info, update_plt_info): New functions.
3699 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3700 handling to use got.glist rather than got.refcount. Likewise for PLT.
3701 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3702 (func_desc_adjust): Adjust for new PLT list.
3703 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3704 (get_sym_h, get_tls_type): New functions.
3705 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3706 (ppc64_elf_tls_optimize): New function.
3707 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3708 TLS relocs.
3709 (ppc64_elf_size_dynamic_sections): Likewise.
3710 (ppc_type_of_stub): Adjust for new PLT list.
3711 (ppc_build_one_stub): Likewise.
3712 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3713 calls specially.
3714 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3715 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3716 init GOT entries that have a reloc. Generate GOT relocs here..
3717 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3718 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3719
3720 2003-02-04 Andreas Schwab <schwab@suse.de>
3721
3722 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3723 (elf_m68k_link_hash_traverse): Remove.
3724 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3725 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3726 reduce casting.
3727 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3728 casting.
3729 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3730 instead of elf_m68k_link_hash_traverse.
3731 (elf_m68k_discard_copies): Change first parameter to pointer to
3732 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3733 elf_m68k_link_hash_entry is needed.
3734
3735 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3736
3737 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3738 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3739 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3740 "plt" field.
3741 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3742 Add "init_offset" field.
3743 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3744 (elf_local_got_ents): Declare.
3745 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3746 and "plt".
3747 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3748 (_bfd_elf_link_hash_table_init): Set "init_offset".
3749 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3750 from init_offset.
3751 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3752
3753 * elf.c (bfd_elf_local_sym_name): Split out from..
3754 (group_signature): ..here.
3755 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3756
3757 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3758
3759 * elf-bfd.h (enum elf_link_info_type): Remove.
3760 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3761 to struct sec. Remove linkonce_p field.
3762 (elf_linkonce_p): Delete.
3763 (elf_discarded_section): Update for sec_info_type change.
3764 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3765 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3766 (ELF_INFO_TYPE_NONE): Define.
3767 (ELF_INFO_TYPE_STABS): Define.
3768 (ELF_INFO_TYPE_MERGE): Define.
3769 (ELF_INFO_TYPE_EH_FRAME): Define.
3770 (ELF_INFO_TYPE_JUST_SYMS): Define.
3771 (STD_SECTION): Update struct sec initializer.
3772 * ecoff.c (bfd_debug_section): Likewise.
3773 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3774 * elflink.h: Likewise.
3775 * elf-eh-frame.c: Likewise.
3776 * elf64-alpha.c: Likewise.
3777 * elfxx-ia64.c: Likewise.
3778 * elfxx-mips.c: Likewise.
3779 * bfd-in2.h: Regenerate.
3780
3781 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3782 referring to used_by_bfd.
3783 * elf64-sparc.c (sec_do_relax): Likewise.
3784 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3785 * elfxx-mips.c (mips_elf_section_data): Likewise.
3786 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3787 (ieee_get_section_contents): Likewise.
3788 (ieee_new_section_hook): Formatting.
3789 (ieee_canonicalize_reloc): Remove commented out code.
3790 * mmo.c (mmo_section_data): Define. Use throughout file.
3791 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3792
3793 2003-01-31 Graydon Hoare <graydon@redhat.com>
3794
3795 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3796 * Makefile.in: Regenerate.
3797 * opncls.c (calc_crc32, get_debug_link_info,
3798 seperate_debug_file_exists, find_seperate_debug_file): New
3799 internal functions.
3800 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3801 contained inside a .gnu_debuglink section.
3802 * bfd-in2.h: Regenerate.
3803
3804 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3805
3806 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3807 entry->abfd when it's NULL.
3808
3809 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3810
3811 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3812 _bfd_elf_section_offset returning -2 the same way as -1.
3813
3814 * elfxx-mips.c (mips_elf_multi_got): New function.
3815 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3816 addend into union along with address and link hash entry.
3817 (struct mips_got_info): Added bfd2got and next.
3818 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3819 (mips_elf_got_section, mips_elf_create_got_section): Use
3820 SEC_EXCLUDE bit to tell whether we really need the got
3821 section. Take boolean arguments to disregard an excluded
3822 section, or to create it as excluded. Adjust all callers.
3823 Use mips_elf_got_section all over.
3824 (mips_elf_local_got_index, mips_elf_got_page,
3825 mips_elf_got16_entry): Take input bfd as argument, and pass it
3826 on to mips_elf_create_local_got_entry.
3827 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3828 Take input bfd as argument, and manage entries in the
3829 appropriate GOT.
3830 (mips_elf_got_offset_from_index): Take input bfd as argument,
3831 and use it to adjust the GP offset of the bfd.
3832 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3833 unreferenced GOT entries of global symbols to the end.
3834 (mips_elf_record_global_got_symbol): Take input bfd as
3835 argument. Add entries to the master GOT hash table.
3836 (struct mips_elf_bfd2got_hash): New.
3837 (struct mips_elf_got_per_bfd_arg): New.
3838 (struct mips_elf_set_global_got_offset_arg): New.
3839 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3840 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3841 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3842 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3843 mips_elf_resolve_final_got_entry,
3844 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3845 mips_elf_got_for_ibfd): New functions.
3846 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3847 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3848 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3849 (mips_elf_got_entry_hash): Take new fields into account. Use
3850 mips_elf_hash_bfd_vma.
3851 (mips_elf_got_entry_eq): Take new fields into account.
3852 (mips_elf_create_got_section): Initialize new fields.
3853 (mips_elf_calculate_relocation): Pass input_bfd to functions
3854 that now take it. Adjust gp for the input_bfd.
3855 (mips_elf_allocate_dynamic_relocation,
3856 mips_elf_create_dynamic_relocation,
3857 _bfd_mips_elf_create_dynamic_sections): Use...
3858 (mips_elf_rel_dyn_section): New function. Borrow code from...
3859 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3860 now take it. Create the got section if needed, even if
3861 excluded, before recording a global got symbol. Move some
3862 code to...
3863 (mips_elf_record_local_got_symbol): New fn.
3864 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3865 Compute multi-got global entries offsets. Move GOT code to...
3866 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3867 if the GOT is too big.
3868 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3869 undefweak symbol to zero. Generate dynamic relocations for
3870 non-primary GOT entries for global symbols.
3871 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3872 case. Generate dynamic relocations for local got entries.
3873 Sort dynamic relocations on N64 too, using...
3874 (sort_dynamic_relocs_64): New fns.
3875 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3876 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3877
3878 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3879
3880 * bfd.c (struct _bfd): Added id field.
3881 * opncls.c (_bfd_id_counter): New static variable.
3882 (_bfd_new_bfd): Use it.
3883 * bfd-in2.h: Rebuilt.
3884
3885 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3886
3887 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3888
3889 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3890
3891 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3892 (elf32_sparc_rev32_howto): New variable.
3893 (sparc_reloc_map): Add TLS relocs.
3894 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3895 Handle REV32.
3896 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3897 New functions.
3898 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3899 struct elf32_sparc_link_hash_table):
3900 New structures.
3901 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3902 elf32_sparc_hash_table): Define.
3903 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3904 create_got_section, elf32_sparc_create_dynamic_sections,
3905 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3906 functions.
3907 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3908 reference counting.
3909 (elf32_sparc_gc_sweep_hook): Likewise.
3910 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3911 (elf32_sparc_size_dynamic_sections): Likewise.
3912 (elf32_sparc_relocate_section): Likewise.
3913 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3914 New functions.
3915 (elf32_sparc_object_p): Allocate backend private object data.
3916 (bfd_elf32_bfd_link_hash_table_create,
3917 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3918 elf_backend_can_refcount): Define.
3919 (elf_backend_create_dynamic_sections): Define to
3920 elf32_sparc_create_dynamic_sections.
3921 * reloc.c: Add SPARC TLS relocs.
3922 * bfd-in2.h, libbfd.h: Rebuilt.
3923 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3924 (sparc_reloc_map): Likewise.
3925
3926 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3927
3928 * bfd-in2.h: Regenerate.
3929 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3930 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3931 (elf_howto_table): Add TLS relocs.
3932 (elf_s390_reloc_type_lookup): Likewise.
3933 (elf_s390_link_hash_entry): Add tls_type.
3934 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3935 New macros.
3936 (elf_s390_link_hash_table): Add tls_ldm_got.
3937 (link_hash_newfunc): Initialize tls_type.
3938 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3939 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3940 (elf_s390_check_relocs): Support TLS relocs.
3941 (elf_s390_gc_sweep_hook): Likewise.
3942 (allocate_dynrelocs): Likewise.
3943 (elf_s390_size_dynamic_sections): Likewise.
3944 (elf_s390_relocate_section): Likewise.
3945 (elf_s390_finish_dynamic_symbol): Likewise.
3946 (bfd_elf32_mkobject): Define for TLS.
3947 * elf64-s390.c: Same changes as for elf32-s390.c.
3948 * libbfd.h: Regenerate.
3949 * reloc.c: Add s390 TLS relocations.
3950
3951 2003-01-24 Charles Lepple <clepple@ghz.cc>
3952
3953 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3954
3955 2003-01-23 Nick Clifton <nickc@redhat.com>
3956
3957 * Add sh2e support:
3958 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
3959 * archures.c (bfd_mach_sh2e): Added.
3960 * bfd-in2.h: Rebuilt.
3961 * cpu-sh.c (arch_info_struct): Added SH2e.
3962 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
3963
3964 2003-01-23 Alan Modra <amodra@bigpond.net.au>
3965
3966 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3967 dynindx to an int. Rearrange for better packing.
3968 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3969 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3970 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3971 (struct _sh64_elf_section_data): New struct.
3972 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3973 * elf32-sh64-com.c: Include elf32-sh64.h.
3974 * elf32-sh64.c: Likewise.
3975 (sh64_elf_new_section_hook): New function.
3976 (bfd_elf32_new_section_hook): Define.
3977 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3978 (sh64_bfd_elf_copy_private_section_data): Likewise.
3979 (sh64_elf_final_write_processing): Likewise.
3980 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3981 (elf32_sparc_new_section_hook): New function.
3982 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3983 (sec_do_relax): Define.
3984 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3985 (elf32_sparc_relocate_section): Likewise.
3986 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3987 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3988 (mmix_elf_section_data): Define. Use throughout file.
3989 (mmix_elf_new_section_hook): New function.
3990 (bfd_elf64_new_section_hook): Define.
3991 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3992 (ppc64_elf_section_data): Define. Use throughout.
3993 (ppc64_elf_new_section_hook): New function.
3994 (bfd_elf64_new_section_hook): Define.
3995 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3996 (sparc64_elf_new_section_hook): New function.
3997 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3998 (sec_do_relax): Define.
3999 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4000 (sparc64_elf_relocate_section): Likewise.
4001 (bfd_elf64_new_section_hook): Define.
4002 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4003 * elfxx-mips.c (struct _mips_elf_section_data): New.
4004 (mips_elf_section_data): Define. Use throughout.
4005 (_bfd_mips_elf_new_section_hook): New function.
4006 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4007 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4008 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4009 * Makefile.am: Run "make dep-am".
4010 * Makefile.in: Regenerate.
4011
4012 2003-01-21 Richard Henderson <rth@redhat.com>
4013
4014 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4015 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4016 (elf64_alpha_adjust_dynamic_symbol): Set them.
4017 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4018 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4019 symbol index when relaxing LDM to TPREL.
4020 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4021 relocs, even if the target isn't locally defined.
4022 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4023 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4024 relocs vs symndx 0 to the tp base.
4025
4026 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4027
4028 * config.bfd: Handle i[3456]86-*-aros*.
4029
4030 2003-01-21 Andreas Schwab <schwab@suse.de>
4031
4032 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4033 (struct ppc_elf_link_hash_entry): Define.
4034 (ppc_elf_hash_entry): New function.
4035 (struct ppc_elf_link_hash_table): Define.
4036 (ppc_elf_hash_table): New function.
4037 (ppc_elf_link_hash_newfunc): New function.
4038 (ppc_elf_link_hash_table_create): New function.
4039 (ppc_elf_copy_indirect_symbol): New function.
4040 (allocate_dynrelocs): New function.
4041 (readonly_dynrelocs): New function.
4042 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4043 relocs and determine DT_TEXTREL.
4044 (ppc_elf_check_relocs): Don't do that here, just count the
4045 dynamic relocs.
4046 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4047 removed section.
4048 (bfd_elf32_bfd_link_hash_table_create): Define.
4049 (elf_backend_copy_indirect_symbol): Define.
4050
4051 2003-01-21 Richard Henderson <rth@redhat.com>
4052
4053 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4054 TPREL also get a reloc if shared. Remove SREL support.
4055 (elf64_alpha_emit_dynrel): New.
4056 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4057 and GOTTPREL relocs to local symbols against the tp base.
4058 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4059
4060 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4061 use count before clobbering r_type.
4062 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4063 ordering would mean dataflow inspection is necessary.
4064
4065 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4066
4067 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4068
4069 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4070
4071 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4072 elfxx-target.h and #undef it before #define'ing it.
4073 * elf32-i386.c: Likewise.
4074 * elf32-sh64.c: Likewise.
4075 * elf64-alpha.c: Likewise.
4076 * elf64-sh64.c: Likewise.
4077
4078 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4079
4080 * bfd-in2.h: Regenerate.
4081 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4082 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4083 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4084 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4085 R_390_PLTOFF32 and R_390_PLTOFF64.
4086 (elf_s390_reloc_type_lookup): Likewise.
4087 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4088 of GOTPLT references to a function.
4089 (link_hash_newfunc): Initialize gotplt_refcount.
4090 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4091 and creation of the got section out of the main switch. Add support
4092 for the gotoff, gotplt and pltoff relocations.
4093 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4094 and pltoff.
4095 (elf_s390_adjust_gotplt): New function.
4096 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4097 plt entries.
4098 (allocate_dynrelocs): Add comment.
4099 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4100 for gotoff, gotplt and pltoff relocations.
4101 * elf64-s390.c: Same changes as for elf32-s390.c.
4102 * libbfd.h: Regenerate.
4103 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4104 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4105 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4106 and BFD_RELOC_390_PLTOFF64.
4107
4108 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4109
4110 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4111 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4112
4113 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4114
4115 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4116 self_dtpmod_done and self_dtpmod_offset.
4117 (allocate_global_data_got): Only use one got entry for all
4118 dtpmod relocs against local symbols.
4119 (allocate_dynrel_entries): Only need .rela.got entry for
4120 dtpmod against global symbol.
4121 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4122 Reserve space in .rela.got for the local dtpmod entry.
4123 (set_got_entry): Initialize the common local dtpmod .got entry.
4124 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4125 and R_IA_64_DTPREL64MSB.
4126
4127 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4128
4129 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4130 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4131 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4132 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4133 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4134 relative relocs, not with absolute ones.
4135 * Makefile.am: Run "make dep-am".
4136 * Makefile.in: Regenerate.
4137 * po/SRC-POTFILES.in: Regenerate.
4138
4139 2003-01-15 Andreas Schwab <schwab@suse.de>
4140
4141 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4142 relocation against a non-allocated readonly section.
4143
4144 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4145
4146 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4147 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4148
4149 2002-01-08 Klee Dienes <kdienes@apple.com>
4150
4151 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4152 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4153 * Makefile.in: Regenerate.
4154
4155 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4156
4157 * elfn32-mips.c (prev_reloc_section): New.
4158 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4159 (SET_RELOC_ADDEND): Parenthesize macro argument.
4160
4161 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4162
4163 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4164 adjust addil instructions if the symbol has no section.
4165
4166 2003-01-07 DJ Delorie <dj@redhat.com>
4167
4168 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4169 partial_inplace.
4170
4171 2003-01-07 Andreas Schwab <schwab@suse.de>
4172
4173 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4174 PC relative relocations.
4175 (elf_m68k_discard_copies): Set it here instead.
4176
4177 2002-01-02 Ben Elliston <bje@redhat.com>
4178 Jeff Johnston <jjohnstn@redhat.com>
4179
4180 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4181 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4182 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4183 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4184 (cpu-iq2000.lo): New target.
4185 * Makefile.in: Regenerate.
4186 * config.bfd: Handle iq2000-*-elf.
4187 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4188 (bfd_archures_list): Add bfd_iq2000_arch.
4189 * configure.in: Handle bfd_elf32_iq2000_vec.
4190 * configure: Regenerate.
4191 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4192 and BFD_RELOC_IQ2000_UHI16.
4193 * targets.c (bfd_elf32_iq2000_vec): Declare.
4194 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4195 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4196 * cpu-iq2000.c: New file.
4197 * elf32-iq2000.c: Likewise.
4198 * libbfd.h: Regenerate.
4199 * bfd-in2.h: Likewise.
4200
4201 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4202
4203 * elfxx-mips.c: Include libiberty.h.
4204 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4205 (mips_set_isa_flags): New function, split out from...
4206 (_bfd_mips_elf_final_write_processing): ...here. Only call
4207 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4208 (mips_mach_extensions): New array.
4209 (mips_32bit_flags_p): New function.
4210 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4211 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4212 other is 64-bit. When adopting IBFD's architecture, adopt the
4213 bfd_mach as well as the flags.
4214
4215 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4216
4217 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4218 fix internal errors, fix bad code generation, fix incorrect stabs
4219 information, and improve ability to eliminate redundant page
4220 instructions. Added code to ip2k_final_link_relocate to self-verify
4221 the linker relaxation. Fix formatting problems.
4222
4223 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4224
4225 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4226 * archures.c (bfd_mach_mipsisa32r2): New define.
4227 * bfd-in2.h: Regenerate.
4228 * cpu-mips.c (I_mipsisa32r2): New enum value.
4229 (arch_info_struct): Add entry for I_mipsisa32r2.
4230 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4231 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4232 (_bfd_mips_elf_final_write_processing): Add
4233 bfd_mach_mipsisa32r2 case.
4234 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4235 binaries marked as using MIPS32 Release 2.
4236
4237 2002-12-30 Dmitry Diky <diwil@mail.ru>
4238
4239 * Makefile.am: Add msp430 target.
4240 * configure.in: Likewise.
4241 * Makefile.in: Regenerate.
4242 * configure: Regenerate.
4243 * archures.c: Add msp430 architecture vector.
4244 * config.bfd: Likewise.
4245 * reloc.c: Add msp430 relocs.
4246 * targets.c: Add msp320 target.
4247 * cpu-msp430.c: New file: msp430 cpu detection.
4248 * elf32-msp430.c: New file: msp430 reloc processing.
4249 * bfd-in2.h: Regenerate.
4250 * libbfd.h: Regenerate.
4251
4252 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4253
4254 * elf.c (elf_sort_sections): Don't reorder .tbss.
4255 (assign_file_positions_for_segments): Only adjust off/voff
4256 for increased alignment in PT_LOAD or PT_NOTE segment,
4257 but adjust p_filesz for .tbss too. in PT_LOAD consider
4258 .tbss to have zero memory size.
4259 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4260 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4261 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4262 into PT_TLS segment. Never put SHF_TLS sections in
4263 segments other than PT_TLS or PT_LOAD.
4264
4265 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4266 sh_entsize.
4267
4268 2002-12-23 DJ Delorie <dj@redhat.com>
4269
4270 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4271
4272 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4273
4274 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4275
4276 2002-12-23 Nick Clifton <nickc@redhat.com>
4277
4278 * archures.c (bfd_arch_get_compatible): Add third parameter
4279 'accept_unknowns'. Only accept unknown format BFDs if
4280 accept_unknowns is true, or if the format is "binary".
4281 * bfd-in2.h: Regenerate.
4282
4283 2002-12-21 Nick Clifton <nickc@redhat.com>
4284
4285 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4286 that subtracted 8 from pc relative relocations.
4287
4288 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4289
4290 * coff-h8300.c: Fix comment typos.
4291 * coffcode.h: Likewise.
4292 * cpu-cris.c: Likewise.
4293 * elf32-vax.c: Likewise.
4294 * genlink.h: Likewise.
4295 * linker.c: Likewise.
4296 * som.c: Likewise.
4297 * tekhex.c: Likewise.
4298 * vms-misc.c: Likewise.
4299
4300 2002-12-20 DJ Delorie <dj@redhat.com>
4301
4302 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4303 * libbfd.h: Regenerate.
4304 * bfd-in2.h: Regenerate.
4305 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4306 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4307
4308 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4309
4310 * doc/bfdint.texi: Fix typos.
4311
4312 2002-12-20 Paul Eggert <eggert@twinsun.com>
4313
4314 Port to POSIX 1003.1-2001.
4315 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4316 * configure.in (build-warnings): Likewise.
4317 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4318 * aclocal.m4: Regenerate.
4319 * config.in: Regenerate.
4320 * configure: Regenerate.
4321
4322 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4323
4324 * coff-h8300.c: Include libiberty.h.
4325 (h8300_reloc16_extra_cases): Check the hash table creator before
4326 referencing h8300 specific fields. Stash the hash table pointer
4327 in a local var. Comment typo fixes.
4328 (h8300_bfd_link_add_symbols): Likewise.
4329
4330 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4331 dst_mask comments.
4332 * bfd-in2.h: Regenerate.
4333
4334 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4335
4336 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4337 code a little. Comment on dynamic relocs against section symbols.
4338
4339 2002-12-17 Roger Sayle <roger@eyesopen.com>
4340
4341 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4342 the HP compiler's "long long".
4343
4344 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4345
4346 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4347 and R_XSTORMY16_HI16) howto entries.
4348 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4349 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4350 determine the start of the second reloc table.
4351
4352 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4353
4354 * ecofflink.c: Fix the reading of the debugging information
4355 of Tru64/Alpha binaries that are produced by recent Compaq
4356 compilers.
4357 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4358 table.
4359 (lookup_line): Because of the strange information sometimes
4360 generated by Compaq's recent compilers, change how the FDR
4361 table is searched so that PDRs (procedure descriptors) are
4362 correctly found. Note that this change is really more of a hack;
4363 however, I have included extensive documentation as to why
4364 this is the best solution short of an extensive rewrite or
4365 another hack.
4366 (fdrtab_lookup): Add comments to explain the algorithm.
4367
4368 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4369
4370 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4371 initializers to match struct declaration.
4372
4373 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4374
4375 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4376 * elf.c (get_program_header_size): Likewise.
4377 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4378 (m32r_elf_generic_reloc): Likewise.
4379 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4380 * elflink.h (elf_bfd_discard_info): Likewise.
4381
4382 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4383
4384 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4385 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4386 DT_RELSZ adjustment, not output section. Avoid writing tags when
4387 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4388 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4389 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4390 DT_RELASZ adjustment, not output section. Avoid writing tags when
4391 unchanged. Adjust DT_RELA.
4392 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4393 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4394
4395 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4396
4397 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4398 addend by 4.
4399
4400 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4401
4402 * elfxx-mips.c (struct mips_got_entry): New.
4403 (struct mips_got_info): Added got_entries field.
4404 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4405 (mips_elf_local_got_index, mips_elf_got_page,
4406 mips_elf_got16_entry): Re-implement in terms of new...
4407 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4408 Change return type.
4409 (mips_elf_highest): Warning clean-up.
4410 (mips_elf_create_got_section): Initialize got_entries.
4411 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4412 local got size.
4413 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4414 GOT_PAGE entries, since we now reuse GOT16 entries.
4415
4416 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4417
4418 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4419 read-only section that lies after .text and before .data to be
4420 written into the output file and included in a_text.
4421 (translate_to_native_sym_flags): If an otherwise unrepresentable
4422 section was merged with .text, convert its symbols to N_TEXT
4423 symbols.
4424 * libaout.h (aout_section_merge_with_text_p): New macro.
4425
4426 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4427
4428 * bfd-in.h: Comment typo fix. Formatting.
4429 * bfd-in2.h: Regenerate.
4430 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4431 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4432 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4433
4434 2002-12-05 Richard Henderson <rth@redhat.com>
4435
4436 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4437 Only send PCREL21B though the plt. Fix installed reloc type.
4438 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4439 against PCREL22 or PCREL64I; clean up error messages for
4440 branch relocs.
4441
4442 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4443
4444 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4445 New functions.
4446 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4447
4448 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4449
4450 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4451
4452 2002-12-04 H.J. Lu <hjl@gnu.org>
4453
4454 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4455 BFD address when constructing local name.
4456
4457 2002-12-04 Andreas Schwab <schwab@suse.de>
4458
4459 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4460 member.
4461 (elf_m68k_link_hash_table_create): Initialize it.
4462 (elf_m68k_check_relocs): Handle symbols that are forced to be
4463 local due to visibility changes.
4464 (elf_m68k_adjust_dynamic_symbol): Likewise.
4465 (elf_m68k_size_dynamic_sections): Likewise.
4466 (elf_m68k_discard_copies): Likewise.
4467 (elf_m68k_relocate_section): Likewise.
4468
4469 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4470
4471 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4472
4473 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4474
4475 * srec.c (srec_write_symbols): Restore '$' prefix to address
4476 accidentally removed in 2002-04-04 change.
4477 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4478
4479 2002-12-03 Nick Clifton <nickc@redhat.com>
4480
4481 * elf32-ppc.c (apuinfo_list_init): New function.
4482 (apuinfo_list_add): New function: Add a value to the list.
4483 (apuinfo_list_length): New function: Return the number of
4484 values on the list.
4485 (apuinfo_list_element): New function: Return a value on the
4486 list.
4487 (apuinfo_list_finish): New function: Free the resources used
4488 by the list.
4489 (ppc_elf_begin_write_processing): New function. Scan the
4490 input bfds for apuinfo sections.
4491 (ppc_elf_write_section): New function: Delay the creation of
4492 the contents of an apuinfo section in an output bfd.
4493 (ppc_elf_final_write_processing): New function. Create the
4494 contents of an apuinfo section in an output bfd.
4495 (elf_backend_begin_write_processing): Define.
4496 (elf_backend_final_write_processing): Define.
4497 (elf_backend_write_section): Define.
4498
4499 2002-12-03 Richard Henderson <rth@redhat.com>
4500
4501 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4502
4503 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4504
4505 Fix PR savannah/1417:
4506 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4507 branch if it goes to the start of the deleted region.
4508
4509 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4510
4511 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4512 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4513 bfd_mach_m6812s): Declare.
4514
4515 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4516 (_bfd_m68hc12_elf_set_private_flags): Call it.
4517 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4518 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4519 report microcontroller incompatibilities (HC12 vs HCS12).
4520 (elf_backend_object_p): Update.
4521
4522 2002-11-30 Alan Modra <amodra@bigpond.net.au>
4523
4524 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4525 (enum bfd_boolean, boolean): Delete.
4526 (bfd_boolean): Typedef to an int.
4527 (FALSE, TRUE): Define.
4528 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4529 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4530 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4531 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4532 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4533 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4534 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4535 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4536 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4537 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4538 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4539 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4540 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4541 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4542 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4543 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4544 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4545 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4546 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4547 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4548 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4549 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4550 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4551 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4552 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4553 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4554 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4555 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4556 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4557 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4558 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4559 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4560 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4561 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4562 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4563 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4564 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4565 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4566 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4567 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4568 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4569 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4570 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4571 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4572 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4573 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4574 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4575 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
4576 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
4577 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4578 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4579 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4580 of bfd_boolean vars with TRUE/FALSE. Formatting.
4581 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4582
4583 2002-11-28 Alan Modra <amodra@bigpond.net.au>
4584
4585 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4586 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4587 with Elf_Internal_Rela.
4588 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4589 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4590 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4591 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4592 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4593 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4594 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4595 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4596 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4597 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4598 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4599 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4600 throughout instead.
4601 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4602 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4603 Remove INLINE keyword.
4604 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4605 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4606 as a bfd_byte *.
4607 (elf_write_relocs): Consolidate REL and RELA code.
4608 (elf_slurp_reloc_table_from_section): Simplify REL code.
4609 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4610 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4611 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4612 RELA code.
4613 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4614 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4615 (elf_link_output_relocs): Likewise.
4616 (elf_reloc_link_order): Likewise.
4617 (elf_finish_pointer_linker_section): Likewise.
4618 (struct elf_link_sort_rela): Remove union.
4619 (elf_link_sort_cmp1): Update to suit.
4620 (elf_link_sort_cmp2): Here too.
4621 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4622 over-allocation for int_rels_per_ext_rel != 1 case.
4623 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4624 * elf32-i386.c: Likewise.
4625 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4626 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4627 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4628 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4629 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4630 elf64-sparc.c, elf64-x86-64.c: Likewise.
4631 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4632 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4633 bfd_elf32_swap_reloc_in.
4634
4635 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4636 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4637 (mips_elf64_swap_reloc_in): Zero r_addend.
4638 (mips_elf64_be_swap_reloc_in): Likewise.
4639 (mips_elf64_slurp_one_reloc_table): Simplify.
4640
4641 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4642 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4643 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4644
4645 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4646
4647 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
4648 unresolved debugging relocs in dynamic applications.
4649 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4650
4651 2002-11-26 Alan Modra <amodra@bigpond.net.au>
4652
4653 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4654 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4655 on a relocatable link. Comment typos.
4656 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4657 in the order they are declared. Clear elf_hash_value too.
4658 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4659 eh_info and tls_segment.
4660 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4661 sorted when discarding relocs by turning them into R_*_NONE.
4662
4663 * libbfd.c (warn_deprecated): Comment spelling.
4664 * po/SRC-POTFILES.in: Regenerate.
4665
4666 2002-11-21 Richard Henderson <rth@redhat.com>
4667
4668 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4669 arch's st_other bits when merging visibilities.
4670 (elf_link_output_extsym): Tidy clearing of visibility field.
4671
4672 2002-11-21 Alan Modra <amodra@bigpond.net.au>
4673
4674 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4675 (SWAP_OUT_RELOC_OFFSET): Define.
4676
4677 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
4678
4679 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4680 can_refcount is properly extended to the type of
4681 init_refcount.
4682
4683 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
4684
4685 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4686 (_bfd_mips_elf_relocate_section): Use it.
4687
4688 * elfxx-mips.c (MNAME): New macro.
4689 (_bfd_mips_elf_check_relocs): Use it.
4690 (_bfd_mips_elf_discard_info): Likewise.
4691 (_bfd_mips_elf_final_link): Likewise.
4692
4693 2002-11-19 Alan Modra <amodra@bigpond.net.au>
4694
4695 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4696 rel_hdr.sh_size too.
4697
4698 2002-11-18 Klee Dienes <kdienes@apple.com>
4699
4700 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4701 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4702 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4703 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4704 Add dependencies for bfdwin.c, bfdio.c.
4705 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4706 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4707 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4708 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4709 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4710 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4711 bfd_get_size (moved from libbfd.c and bfd.c).
4712 * bfdwin.c New file. Contains _bfd_window_internal,
4713 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4714 libbfd.c and bfd.c).
4715 * po/SRC-POTFILES.in: Regenerate.
4716 * po/bfd.pot: Regenerate.
4717 * libbfd.h: Regenerate.
4718 * bfd-in2.h: Regenerate.
4719 * aclocal.m4: Regenerate.
4720 * Makefile.in: Regenerate.
4721 * configure: Regenerate.
4722
4723 2002-11-18 Klee Dienes <kdienes@apple.com>
4724
4725 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4726
4727 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4728
4729 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4730 jsr after a short jump.
4731 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4732
4733 2002-11-15 Klee Dienes <kdienes@apple.com>
4734
4735 * pef.c (bfd_pef_convert_architecture): Move declaration of
4736 ARCH_POWERPC and ARCH_M68K to the start of the function.
4737
4738 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4739
4740 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4741
4742 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4743
4744 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4745 For bpo_gregs_section->contents, allocate _raw_size, not
4746 _cooked_size.
4747
4748 2002-11-13 Klee Dienes <kdienes@apple.com>
4749
4750 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4751
4752 2002-11-13 H.J. Lu <hjl@gnu.org>
4753
4754 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4755
4756 2002-11-13 Klee Dienes <kdienes@apple.com>
4757 Alan Modra <amodra@bigpond.net.au>
4758
4759 * bfd.c (struct bfd_preserve): New.
4760 (bfd_preserve_save): New function.
4761 (bfd_preserve_restore): Ditto.
4762 (bfd_preserve_finish): Ditto.
4763 * bfd-in2.h: Regenerate.
4764 * mach-o.c: Formatting.
4765 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4766 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4767 (bfd_mach_o_core_p): Ditto.
4768 (bfd_mach_o_scan): Pass in mdata.
4769 * mach-o.h (bfd_mach_o_scan): Update prototype.
4770 * pef.c: Formatting.
4771 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4772 (bfd_pef_xlib_object_p): Ditto.
4773 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4774 * pef.h (bfd_pef_scan): Update prototype.
4775 * xsym.c: Formatting, K&R fixes.
4776 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4777 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4778 * xsym.h (bfd_sym_scan): Declare.
4779 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
4780 * elfcore.h (elf_core_file_p): Likewise.
4781 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4782
4783 2002-11-12 Nick Clifton <nickc@redhat.com>
4784
4785 * po/da.po: Updated Danish translation.
4786
4787 2002-11-12 Alan Modra <amodra@bigpond.net.au>
4788
4789 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4790 relocatable link too.
4791 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4792 eh_frame and stab sections. Zap deleted relocs.
4793 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4794 (elf_bfd_discard_info): Run for relocatable link too.
4795 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4796 Handle ld -r case.
4797 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4798 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4799
4800 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4801 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4802 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4803 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4804 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4805 (struct elf_link_hash_table): Add eh_info.
4806 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4807 (_bfd_elf_discard_section_eh_frame): Update prototype.
4808 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4809 (_bfd_elf_write_section_eh_frame): Likewise.
4810 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4811 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4812 param. Get "hdr_info" from link hash table.
4813 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4814 header section from link hash table. Save header section to elf_tdata.
4815 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4816 header section from link hash table. Don't alloc hdr_info. Clear
4817 hdr_sec instead of setting "strip".
4818 (_bfd_elf_eh_frame_section_offset): Formatting.
4819 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4820 Get header section from link hash table.
4821 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4822 Get header section from link hash table.
4823 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4824 (get_program_header_size): Likewise.
4825 (_bfd_elf_section_offset): Formatting.
4826 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4827 section pointer in link hash table.
4828 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4829 and _bfd_elf_write_section_eh_frame calls. Update comment about
4830 eh_frame entries.
4831 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4832 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4833
4834 * po/SRC-POTFILES.in: Regenerate.
4835
4836 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4837 relocs for discarded FDEs. Remove dead code.
4838 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4839 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4840 Tidy conditions under which stabs are edited. Formatting.
4841 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4842 from discarded relocs.
4843 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4844 section adjustments after testing magic values.
4845
4846 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4847
4848 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4849 references to large plt symbols.
4850
4851 2002-11-12 Klee Dienes <kdienes@apple.com>
4852
4853 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4854 looking for an unused section name.
4855
4856 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4857
4858 * coff-h8300.c: Fix formatting.
4859 * elf32-h8300.c: Likewise.
4860 * reloc16.c: Likewise.
4861
4862 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4863
4864 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4865 section when dynamic section unused; _bfd_strip_section_from_output
4866 instead.
4867
4868 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4869
4870 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4871 and sym_vec.
4872
4873 * dwarf2.c: Revert last change.
4874
4875 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4876
4877 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4878 _bfd_dwarf2_find_nearest_line): Use
4879 bfd_simple_get_relocated_section_contents() instead of
4880 bfd_get_section_contents().
4881 * reloc.c (bfd_perform_relocation): Add sanity check.
4882 * simple.c (simple_get_relocated_section_contents): If the section
4883 does not have any relocs associated with it, just return the
4884 unadjusted contents.
4885
4886 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4887
4888 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4889 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4890 contents, enabling for a non-DSO, for symbols defined in the
4891 program with --export-dynamic.
4892
4893 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4894
4895 * elf64-ppc.c: Comment typo fixes.
4896 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4897
4898 2002-11-07 Nick Clifton <nickc@redhat.com>
4899
4900 * po/da.po: Updated Danish translation.
4901
4902 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4903
4904 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4905 exactly three internal relocs per external reloc. Set reloc_count
4906 to the external reloc count.
4907
4908 2002-11-06 Klee Dienes <kdienes@apple.com>
4909
4910 * coff-stgo32.c (stub_bytes): Mark as const.
4911 Fix comment formatting.
4912
4913 2002-11-06 Klee Dienes <kdienes@apple.com>
4914
4915 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4916 xsym.lo.
4917 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4918 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4919 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4920 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4921 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4922 sym.
4923 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
4924 * Makefile.in: Regenerate.
4925 * doc/Makefile.in: Regenerate.
4926 * bfd-in2.h: Regenerate.
4927 * xsym.c: New file. Contains support for the Apple/Metrowerks
4928 xSYM debugging format.
4929 * xsym.h: New file.
4930 * pef.c: New file. Contains support for the Apple Code Fragment
4931 Manager Preferred Executable Format
4932 * pef.h: New file.
4933 * pef-traceback.h: New file. Contains support for parsing PowerPC
4934 traceback tables as used by PEF executables (and perhaps other
4935 systems as well).
4936 * mach-o.c: New file. Contains support for the Mach-O object file
4937 format.
4938 * mach-o.h: New file.
4939 * mach-o-target.c: New file. Declares the mach-o targets
4940 themselves. Included three times by mach-o.c; each time with a
4941 different set of macros set.
4942
4943 2002-11-06 Graeme Peterson <gp@qnx.com>
4944
4945 * Makefile.am: Remove entries for elf32-qnx.[ch].
4946 * Makefile.in: Regenerate.
4947 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4948 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4949 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4950 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4951 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4952 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4953 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4954 * configure: Regenerate.
4955 * elf32-qnx.c: Remove.
4956 * elf32-qnx.h: Remove.
4957 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4958 is_contained_by_filepos, and copy_private_bfd_data_p.
4959 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4960 is_contained_by_filepos, and copy_private_bfd_data_p.
4961 * elf32-i386.c: Remove QNX extended bfd support.
4962 * elf32-ppc.c: Remove QNX extended bfd support.
4963 * elf32-sh.c: Remove QNX extended bfd support.
4964 * elfarm-nabi.c: Remove QNX extended bfd support.
4965 * targets.c: Remove qnx vectors.
4966 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4967 (elf_backend_is_contained_by_filepos): Remove.
4968 (elf_backend_copy_private_bfd_data_p): Remove.
4969 * po/SRC-POTFILES.in: Regenerate.
4970
4971 2002-11-06 David O'Brien <obrien@FreeBSD.org>
4972 Alan Modra <amodra@bigpond.net.au>
4973
4974 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4975 dynamic relocs against section symbols for the output section vma.
4976
4977 2002-11-05 Alan Modra <amodra@bigpond.net.au>
4978
4979 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4980 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4981
4982 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4983 Alan Modra <amodra@bigpond.net.au>
4984
4985 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4986 vectors in target_selvecs.
4987 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4988 in target_selvecs.
4989 (sh-*-netbsdelf*): Likewise.
4990 * configure.in (assocvecs): New variable. Handle assocvecs like
4991 selvecs.
4992 * configure: Regenerate.
4993 * format.c (bfd_check_format_matches): Store bfd_target pointers
4994 in matching_vector instead of target names. Select first target
4995 from bfd_associated_vector that matches a list of ambiguous targets.
4996 * targets.c (_bfd_associated_vector): New array.
4997 (bfd_associated_vector): New variable.
4998 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4999 * libbfd-in.h (bfd_associated_vector): Declare.
5000 * libbfd.h: Regenerate.
5001
5002 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5003
5004 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5005 non-NULL before dereferencing.
5006
5007 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5008
5009 * vms.c (vms_object_p): Restore the start address when returning
5010 NULL.
5011
5012 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5013 Hans-Peter Nilsson <hp@axis.com>
5014
5015 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5016 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5017 Set up a larger symshndxbuf, and write it out. Free it on
5018 exit rather than freeing symbuf twice. Correct section index
5019 on output section symbol loop.
5020 (elf_link_output_sym): Accumulate symbol extension section
5021 indices, reallocating symshndxbuf rather than writing it out.
5022 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5023 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5024 Use bfd_zalloc to clear i_shdrp[0] too.
5025
5026 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5027
5028 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5029 _raw_size of cranges section if _cooked_size not yet set.
5030
5031 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5032
5033 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5034 for bfd_elf32_swap_symbol_out.
5035
5036 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5037
5038 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5039 signed and unsigned in comparison.
5040
5041 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5042
5043 * coffcode.h: Remove extraneous '\'.
5044
5045 2002-10-28 H.J. Lu <hjl@gnu.org>
5046
5047 * Makefile.am (targets.lo): Depend on Makefile instead of
5048 config.status.
5049 (archures.lo): Likewise.
5050 * Makefile.in: Regenerated.
5051
5052 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5053
5054 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5055 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5056 targ_selvecs.
5057
5058 2002-10-25 Jim Wilson <wilson@redhat.com>
5059
5060 * elf64-sh64.c (sh_elf64_relocate_section): Call
5061 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5062 of SHF_MERGE section.
5063
5064 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5065
5066 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5067
5068 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5069
5070 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5071 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5072 unsigned int.
5073 (NAME(aout,final_link)): Cast enum used in assignment.
5074 (aout_link_write_symbols): Cast enums in comparisons, int values to
5075 boolean, enums in assignments to int.
5076 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5077 (aout_link_input_section_ext): Likewise. Cast enums used in
5078 comparisons with unsigned ints.
5079 (aout_link_reloc_link_order): Cast enum to int in assignment.
5080 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5081 calls to char *.
5082 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5083 assignment.
5084 * bfd-in2.h (bfd_set_section_vma): Likewise.
5085 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5086 * binary.c (bfd_alloc): Cast enum to long.
5087 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5088 * dwarf2.c (read_abbrevs): Add casts to enum types.
5089 (read_attribute_value): Likewise.
5090 (arange_add): Cast result of bfd_zalloc call.
5091 (comp_unit_contains_address): Return true and false.
5092 (comp_unit_find_nearest_line): Cast return to boolean.
5093 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5094 * gen-aout.c: define macro '_' if not defined.
5095 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5096 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5097 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5098 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5099 (bfd_generic_is_local_label_name): Cast return to boolean.
5100 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5101 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5102 struct bfd_hash_entry *.
5103 (_bfd_generic_link_hash_newfunc): likewise.
5104 (_bfd_generic_final_link): Cast enum to unsigned int.
5105 * merge.c (sec_merge_emit): Cast return to boolean.
5106 (merge_strings): Add casts to const unsigned char *.
5107 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5108 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5109 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5110 to struct bfd_hash_entry *.
5111 (bfd_set_section_content): Add cast to PTR in comparison.
5112 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5113 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5114 simple_dummy_unattached_reloc,
5115 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5116 function definitions.
5117 * srec.c (S3Forced): Initialize to false.
5118 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5119 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5120 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5121 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5122 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5123 comparisons.
5124
5125 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5126
5127 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5128 relocs into shared lib non-allocated reloc sections.
5129
5130 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5131
5132 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5133 sorted even when given an out-of-order line sequence.
5134 (lookup_address_in_line_info_table): When an exact VMA match is
5135 not found, return line information with the closest VMA.
5136
5137 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5138
5139 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5140 HPUX 11.00 patch PHSS_26559.
5141
5142 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5143
5144 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5145 the options section into a separate section unless IRIX 6
5146 compatibility is enabled.
5147
5148 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5149
5150 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5151 into arrays.
5152 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5153 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5154 into account.
5155 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5156 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5157
5158 2002-10-21 Graeme Peterson <gp@qnx.com>
5159
5160 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5161
5162 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5163
5164 * targets.c (bfd_target_list): Don't return the default target twice.
5165
5166 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5167
5168 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5169 perror with bfd_perror.
5170
5171 2002-10-19 H.J. Lu <hjl@gnu.org>
5172
5173 * elflink.h (elf_link_add_object_symbols): Correctly handle
5174 DT_RPATH and DT_RUNPATH.
5175
5176 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5177
5178 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5179
5180 2002-10-17 Denis Chertykov <denisc@overta.ru>
5181
5182 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5183 for ip2k port.
5184
5185 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5186
5187 * elfxx-target.h (USE_REL): Don't define as 1.
5188 * elf32-arm.h (USE_REL): Provide a default define of 0.
5189 Use #if rather than #ifdef when testing USE_REL.
5190 * elf32-m32r.c: Likewise.
5191
5192 * elf32-arc.c (USE_REL): Define as 1.
5193 * elf32-d10v.c (USE_REL): Likewise.
5194 * elf32-m32r.c (USE_REL): Likewise.
5195 * elf32-m68hc11.c (USE_REL): Likewise.
5196 * elf32-m68hc12.c (USE_REL): Likewise.
5197 * elf32-or32.c (USE_REL): Likewise.
5198 * elfarm-nabi.c (USE_REL): Likewise.
5199
5200 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5201
5202 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5203 (s390x-*-linux*): Add targ_selvecs.
5204
5205 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5206
5207 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5208 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5209 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5210 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5211 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5212 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5213 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5214 (SOURCE_HFILES): Add elf32-qnx.h.
5215 (BUILD_HFILES): Add bfdver.h.
5216 Run "make dep-am".
5217 * Makefile.in: Regenerate.
5218 * configure.in Update bfd vector dependencies.
5219 * configure: Regenerate.
5220 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5221 * elf32-i386qnx.c: Likewise.
5222 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5223 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5224 * elf32-sh-lin.c: Likewise.
5225 * elf32-shqnx.c: Likewise.
5226 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5227 * elf32-sh64-nbsd.c: Likewise.
5228 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5229 * elf64-sh64-nbsd.c: Likewise.
5230 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5231 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5232 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5233 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5234 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5235 (elf_backend_is_contained_by_filepos): Likewise.
5236 (elf_backend_copy_private_bfd_data_p): Likewise.
5237 Globalize and move functions to..
5238 * elf32-qnx.c: ..here. New file.
5239 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5240 emit target vectors when INCLUDE_SHMEDIA.
5241 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5242 end of file.
5243 * elf64-sh64.c: Remove ELF_ARCH test.
5244 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5245 * po/BLD-POTFILES.in: Regenerate.
5246 * po/SRC-POTFILES.in: Regenerate.
5247
5248 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5249
5250 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5251 loaded with --just-symbols.
5252
5253 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5254 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5255 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5256 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5257
5258 2002-10-15 Richard Henderson <rth@redhat.com>
5259
5260 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5261 (BFD64_BACKENDS_CFILES): Likewise.
5262 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5263 * elf64-alpha-fbsd.c: Remove file, move code ...
5264 * elf64-alpha.c: ... here.
5265 * Makefile.in, configure: Rebuild.
5266
5267 2002-10-14 Richard Henderson <rth@redhat.com>
5268
5269 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5270 VALUE, not ADDEND.
5271
5272 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5273
5274 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5275 datalabel_got_offset with union of datalabel_got
5276 offset and refcount.
5277 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5278 (allocate_dynrelocs): Delete unnecessary code for
5279 STT_DATALABEL type. Create entry in got for
5280 datalabel version of symbol if datalabel_got.refcount > 0.
5281 (sh_elf_relocate_section): Use datalabel_got union.
5282 (sh_elf_gc_sweep_hook): Pull common code to initialize
5283 h and eh out of switch statement. Declare seen_stt_datalabel.
5284 Initialize it. Decrement datalabel_got.refcount for
5285 got relocs when seen_stt_datalabel is true.
5286 Decrement local_got_refcounts entry for datalabel got relocs
5287 of local symbols.
5288 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5289 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5290 Initialize it. When seen_stt_datalabel is true, increment
5291 datalabel_got refcount rather than got.refcount.
5292 (sh_elf_finish_dynamic_symbol): Create relocs to
5293 initialize got entry for datalabel version of symbol.
5294
5295 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5296
5297 * Makefile.am: Run "make dep-am".
5298 (BFD_H_FILES): Remove version.h.
5299 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5300 * version.h: ..to here.
5301 * configure.in (bfd_version_date): Remove.
5302 (AC_OUTPUT): Make bfdver.h from version.h.
5303 * bfd.c: #include "bfdver.h".
5304 * vms-hdr.c: Likewise.
5305 * Makefile.in: Regenerate.
5306 * bfd-in2.h: Regenerate.
5307 * configure: Regenerate.
5308 * po/SRC-POTFILES.in: Regenerate.
5309
5310 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5311
5312 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5313 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5314 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5315 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5316 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5317 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5318 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5319 bfd_mach_ip2022, bfd_mach_ip2022ext,
5320 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5321 * bfd-in2.h: Regenerate.
5322
5323 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5324
5325 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5326 endian vector to targ_selvecs.
5327
5328 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5329
5330 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5331 save_addend argument. Don't apply the 32-bit mask to a
5332 GPREL32 value if it's to be used in another relocation. Don't
5333 use forced-check computation of local_p to decide whether to
5334 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5335 of the addend of a non-in-place GPREL16 relocation.
5336 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5337 mips_elf_calculate_relocation().
5338
5339 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5340
5341 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5342 with symbols in other sections if we relaxed something; the sections
5343 output offsets must be re-computed before.
5344
5345 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5346
5347 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5348 handling to use Elf_Internal_Sym.
5349 (m68hc11_elf_relax_delete_bytes): Likewise.
5350
5351 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5352
5353 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5354 sh_elf_object_p, dtpoff_base): New functions.
5355 (sh_elf_howto_table): Add TLS relocs.
5356 (sh_reloc_map): Likewise.
5357 (sh_elf_info_to_howto): Support TLS relocs.
5358 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5359 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5360 New macros.
5361 (sh_elf_obj_tdata): New.
5362 (elf_sh_link_hash_table): Add tls_ldm_got.
5363 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5364 (allocate_dynrelocs): Support TLS relocs.
5365 (sh_elf_size_dynamic_sections): Likewise.
5366 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5367 .rela.got section when found already. Return false after printing
5368 error about unresolvable relocation.
5369 (sh_elf_gc_sweep_hook): Support TLS relocs.
5370 (sh_elf_check_relocs): Likewise.
5371 (sh_elf_finish_dynamic_symbol): Likewise.
5372 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5373 * reloc.c: Add SH TLS relocs.
5374 * bfd-in2.h, libbfd.h: Regenerate.
5375
5376 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5377
5378 * Makefile.in: Regenerated.
5379
5380 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5381
5382 * Makefile.am: Run dep-am.
5383 (BFD_H_DEP): Add simple.c and linker.c.
5384 (BFD32_LIBS): Add simple.lo.
5385 (BFD32_LIBS_CFILES): Add simple.c.
5386 * Makefile.in: Regenerated.
5387 * bfd-in2.h: Regenerated.
5388 * simple.c: New file.
5389
5390 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5391
5392 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5393 (record_thumb_to_arm_glue): Likewise.
5394 * ecoff.c (ecoff_link_add_externals): Likewise.
5395 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5396 (record_thumb_to_arm_glue): Likewise.
5397 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5398 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5399 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5400 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5401 * elf64-ppc.c (func_desc_adjust): Likewise.
5402 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5403 (sh64_elf64_create_dynamic_sections): Likewise.
5404 * elflink.c (_bfd_elf_create_got_section): Likewise.
5405 (_bfd_elf_create_dynamic_sections): Likewise.
5406 (_bfd_elf_create_linker_section): Likewise.
5407 * elflink.h (elf_add_default_symbol): Likewise.
5408 (elf_link_create_dynamic_sections): Likewise.
5409 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5410 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5411 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5412 (_bfd_mips_elf_add_symbol_hook): Likewise.
5413 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5414 * linker.c (generic_link_add_symbol_list): Likewise.
5415 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5416
5417 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5418
5419 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5420 completely removed. Correct local sym adjustment.
5421
5422 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5423
5424 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5425 Correct mistake in calculation of address of .got.
5426 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5427 elf_sh64_pic_plt_entry_le): Likewise.
5428
5429 2002-10-09 Richard Shann <richard.shann@superh.com>
5430 Stephen Clarke <stephen.clarke@superh.com>
5431
5432 * Makefile.am: Add entries for elf32-sh64-lin.c and
5433 elf64-sh64-lin.c. Regenerate.
5434 * Makefile.in: Regenerate.
5435 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5436 to use sh64 vectors rather than sh vectors.
5437 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5438 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5439 * configure: Regenerate.
5440 * elf32-sh64-lin.c: New file.
5441 * elf64-sh64-lin.c: New file.
5442 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5443 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5444
5445 2002-10-08 H.J. Lu <hjl@gnu.org>
5446
5447 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5448 IE->LE transition for R_386_TLS_IE.
5449
5450 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5451
5452 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5453
5454 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5455
5456 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5457 sections.
5458
5459 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5460
5461 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5462 code.
5463
5464 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5465
5466 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5467
5468 * opncls.c: Formatting.
5469 (_bfd_new_bfd): Use a smaller section hash table.
5470
5471 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5472
5473 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5474 of the other two relocations packed with a REL32 to NONE.
5475
5476 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5477
5478 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5479 (sh_elf_link_hash_newfunc): Initialize it.
5480 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5481 to got.refcount for symbols that are forced local or when
5482 we have direct got refs.
5483 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5484 to correctly adjust got.refcount and plt.refcount.
5485 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5486 (sh_elf_check_relocs): Increment gotplt_refcount.
5487
5488 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5489
5490 * elf32-i386.c (elf_i386_relocate_section): Fix
5491 movl foo@indntpoff, %eax IE->LE transition.
5492
5493 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5494
5495 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5496 sequence and its transitions.
5497
5498 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5499
5500 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5501 to st_value + addend in non-code sections.
5502 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5503 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5504
5505 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
5506 Ken Raeburn <raeburn@cygnus.com>
5507 Aldy Hernandez <aldyh@redhat.com>
5508 Eric Christopher <echristo@redhat.com>
5509 Richard Sandiford <rsandifo@redhat.com>
5510
5511 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5512 (bfd_mach_mips5500): New.
5513 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5514 (arch_info_struct): Add corresponding entries here.
5515 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5516 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5517 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5518 bfd_mach_mips5400 and bfd_mach_mips5500.
5519 (_bfd_mips_elf_mach_extends_p): New function.
5520 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5521 the EF_MIPS_MACH flags.
5522 * bfd-in2.h: Regenerate.
5523
5524 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5525
5526 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5527 .got sections.
5528
5529 2002-09-28 Alan Modra <amodra@bigpond.net.au>
5530
5531 * elf.c (map_sections_to_segments): Correct test for start of
5532 writable section in the same page as end of read-only section.
5533
5534 2002-09-27 Matt Thomas <matt@3am-software.com>
5535
5536 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5537 local_got_refcounts usage. Remove allocation of got slot.
5538 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5539 Remove de-allocation of got slot.
5540 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5541 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5542 sections to be GC'ed.
5543 (elf_vax_instantiate_got_entries): New function.
5544 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5545 tests that are now handled by elf_vax_instantiate_got_entries.
5546 Assert GOT entry falls within .got section size. Remove redundant
5547 comparisions. Fix comments.
5548
5549 2002-09-27 Jakub Jelinek <jakub@redhat.com>
5550
5551 * reloc.c: Add x86-64 TLS relocs.
5552 * bfd-in2.h, libbfd.h: Rebuilt.
5553 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5554 relocs. Add TLS relocs.
5555 (x86_64_reloc_map): Add TLS relocs.
5556 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5557 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5558 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5559 (elf64_x86_64_hash_entry): Define.
5560 (struct elf64_x86_64_obj_tdata): New.
5561 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5562 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5563 (link_hash_newfunc): Initialize tls_type.
5564 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5565 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5566 (elf64_x86_64_mkobject): New.
5567 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5568 (elf64_x86_64_tls_transition): New.
5569 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5570 Handle TLS relocs.
5571 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5572 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5573 (elf64_x86_64_size_dynamic_sections): Likewise.
5574 (dtpoff_base, tpoff): New.
5575 (elf64_x86_64_relocate_section): Handle TLS relocs.
5576 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5577 entries.
5578 (bfd_elf64_mkobject): Define.
5579
5580 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5581 DF_STATIC_TLS if shared.
5582
5583 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5584
5585 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5586 empty relocation sections.
5587
5588 2002-09-26 Alan Modra <amodra@bigpond.net.au>
5589
5590 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5591 (ppc64_elf_build_stubs): Build them here instead.
5592
5593 2002-09-24 Jakub Jelinek <jakub@redhat.com>
5594
5595 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5596 addend into r_addend, not *r_offset.
5597 (elf32_sparc_finish_dynamic_symbol): Likewise.
5598 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5599 R_SPARC_RELATIVE's r_offset.
5600
5601 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5602
5603 * dwarf2.c (decode_line_info): Update to correctly decode
5604 the (non-standard DWARF2) out-of-order address sequences
5605 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5606
5607 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
5608
5609 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5610
5611 2002-09-23 Alan Modra <amodra@bigpond.net.au>
5612
5613 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5614 for discarded FDEs. Remove redundant assignment.
5615 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5616
5617 2002-09-22 H.J. Lu <hjl@gnu.org>
5618
5619 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5620 the relocation count between different .reloc sections.
5621
5622 2002-09-21 Alan Modra <amodra@bigpond.net.au>
5623
5624 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5625 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5626 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5627 R_PPC_EMB_RELSDA.
5628
5629 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5630 unsigned. Move "symcount" assignment out of loop.
5631 * Makefile.am: Run "make dep-am".
5632 * Makefile.in: Regenerate.
5633 * configure: Regenerate.
5634 * po/SRC-POTFILES.in: Regnerate.
5635
5636 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5637
5638 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5639 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5640 (e.g. IRIX64).
5641
5642 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5643
5644 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5645 even if generating R_PPC_RELATIVE reloc.
5646 (ppc_elf_relocate_section): Make sure relocation is performed
5647 if skip == -2. Clear memory at r_offset when creating dynamic
5648 relocation.
5649
5650 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5651
5652 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5653 BFD_RELOC_386_TLS_GOTIE): Add.
5654 * bfd-in2.h, libbfd.h: Rebuilt.
5655 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5656 and R_386_TLS_GOTIE.
5657 (elf_i386_reloc_type_lookup): Handle it.
5658 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5659 char instead of enum, change GOT_* into defines.
5660 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5661 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5662 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5663 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5664 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5665 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5666 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5667 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5668 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5669 tls_type is GOT_TLS_IE_BOTH.
5670 (elf_i386_size_dynamic_sections): Likewise.
5671 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5672 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5673 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5674 all 4 GOT_TLS_* TLS types.
5675
5676 2002-09-19 Nick Clifton <nickc@redhat.com>
5677
5678 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5679 follow indirect links.
5680
5681 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5682
5683 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5684 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5685 on 64 bit machines.
5686 (ecoff_swap_sym_in) <iss>: Likewise.
5687 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5688 ECOFF information: 'ioptMax' refers to the actual *size*
5689 of the optimization symtab, not the number of entries.
5690
5691 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
5692
5693 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5694 ELF_LINK_HASH_NEEDS_PLT logic.
5695
5696 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
5697
5698 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5699 correct relocation count.
5700
5701 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
5702
5703 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5704 * bfd.c (struct _bfd): Add dynsymcount.
5705 * bfd-in2.h: Regenerated.
5706 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5707 abfd->dynsymcount.
5708 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5709 for overflow.
5710
5711 2002-09-17 Stan Cox <scox@redhat.com>
5712
5713 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5714 (mips_elf64_final_gp): Don't make up gp value.
5715 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5716 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5717 .MIPS.options/.options section.
5718
5719 2002-09-17 David O'Brien <obrien@FreeBSD.org>
5720
5721 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5722 It is benign for FreeBSD < 4.1. Minor reformatting.
5723 * elf64-alpha-fbsd.c: Likewise.
5724
5725 2002-09-17 Jakub Jelinek <jakub@redhat.com>
5726
5727 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5728 addend.
5729
5730 2002-09-17 Alan Modra <amodra@bigpond.net.au>
5731
5732 * elf64-alpha.c (alpha_elf_size_info): Make static.
5733
5734 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5735
5736 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5737 * cpu-tic4x.c: Ditto.
5738
5739 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5740
5741 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5742 duplicate define.
5743
5744 2002-09-16 Bruno Haible <bruno@clisp.org>
5745
5746 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5747 by a target variant implementation.
5748 * elf64-alpha.c: Likewise.
5749 * elf32-i386-fbsd.c: New file.
5750 * elf64-alpha-fbsd.c: New file.
5751 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5752 bfd_elf64_alpha_freebsd_vec.
5753 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5754 bfd_elf64_alpha_freebsd_vec.
5755 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5756 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5757 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5758 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5759 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5760 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5761 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5762
5763 2002-09-12 Jakub Jelinek <jakub@redhat.com>
5764
5765 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5766 NULL.
5767 (elf_i386_relocate_section): Return false after printing error about
5768 unresolvable relocation.
5769
5770 2002-09-12 Nick Clifton <nickc@redhat.com>
5771
5772 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5773 R_ARM_THM_PC11.
5774
5775 2002-09-11 Jeffrey Law <law@redhat.com>
5776
5777 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5778
5779 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5780
5781 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5782 line_ptr before deciding we've found a symbol.
5783
5784 2002-09-11 Nick Clifton <nickc@redhat.com>
5785
5786 * po/da.po: New Danish translation file.
5787 * configure.in (LINGUAS): Add 'da'.
5788 * configure: Regenerate.
5789
5790 2002-09-10 Michael Snyder <msnyder@redhat.com>
5791
5792 * irix-core.c (do_sections, do_sections64): New functions.
5793 (irix_core_core_file_p): Call new functions do_sections,
5794 do_sections64, depending on corefile (32-bit or 64-bit).
5795
5796 2002-09-09 Richard Henderson <rth@redhat.com>
5797
5798 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5799 and PCREL21F like PCREL21B.
5800
5801 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5802
5803 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5804 vector.
5805
5806 2002-09-02 Nick Clifton <nickc@redhat.com>
5807
5808 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5809 names instead of cryptically overloaded bfd_reloc error
5810 codes.
5811 (v850_elf_relocate_section): Likewise.
5812 (v850_elf_relax_section): Replace caching of external symbols
5813 with caching of internal symbols obtained from calling
5814 bfd_elf_get_elf_syms().
5815 Fixup problems with freeing cached allocated memory blocks.
5816
5817 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5818
5819 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5820 (bfd_pj_arch): Use bfd_default_scan.
5821 * cpu-v850.c (scan): Remove.
5822 (N): Use bfd_default_scan.
5823 * cpu-z8k.c (scan_mach): Remove.
5824 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5825 first. Use bfd_default_scan.
5826
5827 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5828 bfd_mach constants.
5829 (ecoff_get_magic): Likewise.
5830 * elf32-v850.c (v850_elf_object_p): Likewise.
5831 (v850_elf_final_write_processing): Likewise.
5832 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5833 (MY(write_object_contents)): Likewise.
5834 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5835 * coffcode.h (coff_write_object_contents): Likewise.
5836 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5837 Remove unnecessary "machine" assignments.
5838 (coff_write_relocs): Test for the absolute section sym by testing
5839 section and flags.
5840
5841 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5842 and bfd_mach_i386_i386_intel_syntax.
5843 * pdp11.c (NAME(aout,machine_type)): Likewise.
5844
5845 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5846
5847 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5848 * bfd-in2.h (align_power): Likewise.
5849
5850 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5851
5852 * Makefile.am: Run "make dep-am".
5853 * Makefile.in: Regenerate.
5854
5855 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5856 * cpu-powerpc.c (powerpc_compatible): Likewise.
5857 * cpu-rs6000.c (rs6000_compatible): Likewise.
5858
5859 2002-08-28 Catherine Moore <clm@redhat.com>
5860
5861 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5862 (v850-elf-reloc): Don't resolve pc relative relocs.
5863 (v850_elf_ignore_reloc): New routine.
5864 (v850_elf_final_link_relocate): Handle new relocs.
5865 (v850_elf_relax_delete_bytes ): New routine.
5866 (v850_elf_relax_section): New routine.
5867 (bfd_elf32_bfd_relax_section): Define.
5868 (HOWTO): New entries for new relocs.
5869 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5870 (BFD_RELOC_V850_LONGJUMP): New reloc.
5871 (BFD_RELOC_V850_ALIGN): New reloc.
5872 * archures.c: Remove redundant v850ea architecture.
5873 * cpu-v850.c: Remove redundant v850ea support.
5874 * libbfd.h: Regenerate.
5875 * bfd-in2.h: Regenerated.
5876
5877 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5878
5879 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5880 * configure.in: Add tic4x_coff vector files.
5881 * configure: Regenerate.
5882 * Makefile.am: Add tic4x target.
5883 * Makefile.in: Regenerate.
5884
5885 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5886
5887 * archures.c: Add the BFD arch type tic4x.
5888 * bfd-in.h: Add BFD_IN_MEMORY flag.
5889 * coff-tic4x.c: New file.
5890 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5891 * cpu-tic4x.c: New file.
5892 * targets.c: Added tic4x- in list of xvecs.
5893 * ticoff.h: New file.
5894 * bfd-in2.h: Regenerate.
5895
5896 2002-08-27 Adam Nemet <anemet@lnxw.com>
5897
5898 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5899 bit of DT_INIT and DT_FINI for Thumb functions.
5900
5901 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5902
5903 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5904
5905 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5906
5907 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5908
5909 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5910
5911 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5912 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5913 Likewise.
5914 (struct elf_sh_pcrel_relocs_copied): Removed.
5915 (struct elf_sh_dyn_relocs): New.
5916 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5917 field with dyn_relocs.
5918 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5919 sections and sym_sec.
5920 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5921 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5922 (sh_elf_create_dynamic_sections): Use create_got_section instead
5923 of _bfd_elf_create_got_section.
5924 (sh_elf_check_relocs): Likewise.
5925 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5926 sections.
5927 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5928 sh_elf_relocate_section, sh_elf_check_relocs,
5929 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5930 Likewise.
5931 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5932 dynamic relocations and avoiding the copy relocation when we
5933 didn't find any dynamic relocations in the section which has
5934 contents or is read-only.
5935 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5936 (sh_elf_size_dynamic_sections): Don't reset the size of
5937 .rela.got section even if dynamic_sections_created flag is off.
5938 Don't use sh_elf_discard_copies. Scan all input bfd and use
5939 allocate_dynrelocs. Call readonly_dynrelocs to determine
5940 whether we need DT_TEXTREL.
5941 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5942 whether the symbol was never referred to.
5943 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5944 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5945 (sh_elf_check_relocs): Call create_got_section if the short-cut
5946 to .got is null. Increment reference counters only instead of
5947 allocating space on dynamic sections here. Don't conditionalize
5948 uninitialized got.offset value when marking the symbol as a
5949 global offset table entry. Keep relocations for symbols satisfied
5950 by a dynamic library to avoid copy relocations for the symbol.
5951 Set dynobj field of an elf hash table if needed.
5952 (sh_elf_finish_dynamic_sections): Handle null section pointer
5953 correctly.
5954 (elf_backend_copy_indirect_symbol): Defined.
5955 (elf_backend_can_refcount): Defined.
5956
5957 2002-08-23 Nick Clifton <nickc@redhat.com>
5958
5959 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5960 previous change. Add comment explaining why.
5961
5962 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5963
5964 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5965 contents of .got.plt[2] to tr0, not address of .got.plt.
5966 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5967 patching absolute plt entry. For shmedia plt entry, set bottom bit
5968 of branch to plt0 as this is a branch to an shmedia instruction.
5969 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5970 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5971 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5972 branch to plt0.
5973 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5974 patching absolute plt entry. For shmedia plt entry, branch to
5975 plt0 is now ptrel, so use relative offset. Set bottom bit of
5976 branch target as it is a branch to an shmedia instruction.
5977
5978 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5979 Richard Shann <richard.shann@superh.com>
5980
5981 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5982 value if .init is an SHmedia function. Similarly for DT_FINI.
5983 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
5984
5985 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5986
5987 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
5988 dynamic section.
5989 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5990
5991 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5992
5993 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
5994 byte read when reading the return address register column.
5995
5996 2002-08-22 Nick Clifton <nickc@redhat.com>
5997
5998 * config.bfd: Add powepc64-*-*bsd* target.
5999
6000 2002-08-22 Graeme Peterson <gp@qnx.com>
6001
6002 * Makefile.am: Add entries for elf32-shqnx.c
6003 * Makefile.in: Regenerate.
6004 * config.bfd: Add support sh-*-nto* target.
6005 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6006 * configure: Regenerate.
6007 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6008 * elf32-sh.c: Do not include elf32-target.h if
6009 ELF32_SH_C_INCLUDED is defined.
6010 * elf32-shqnx.c: New file: Support for QNX.
6011 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6012
6013 2002-08-22 Nick Clifton <nickc@redhat.com>
6014
6015 * po/tr.po: Updated Turkish translation.
6016
6017 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6018 symbols are not read.
6019
6020 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6021
6022 * elf32-m68hc11.c: Formatting fixes.
6023 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6024 * elf32-m68hc12.c: Formatting fixes.
6025 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6026
6027 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6028
6029 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6030 SEC_DATA.
6031 (pmac_xcoff_vec): Likewise.
6032 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6033 (aix5coff64_vec): Likewise.
6034
6035 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6036
6037 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6038 param to elf_backend_copy_indirect_symbol.
6039 (_bfd_elf_link_hash_copy_indirect): Likewise.
6040 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6041 calls to copy_indirect_symbol.
6042 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6043 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6044 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6045 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6046 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6047 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6048 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6049 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6050 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6051 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6052 test refcounts for "used" values.
6053
6054 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6055
6056 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6057 argument declaration.
6058
6059 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6060
6061 * archures.c (bfd_mach_ppc_e500): Added.
6062 * bfd-in2.h: Rebuilt.
6063 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6064
6065 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6066
6067 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6068
6069 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6070
6071 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6072 `bfd_byte'.
6073
6074 2002-08-17 Stan Cox <scox@redhat.com>
6075
6076 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6077 IRIX 6 segment layout for NEWABI.
6078
6079 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6080
6081 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6082 symbols when looking for section referred to by a relocation.
6083 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6084
6085 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6086
6087 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6088
6089 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6090
6091 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6092 missing check for whether the symbol is referenced by DSO before
6093 unexporting it as an unneeded dynamic symbol.
6094
6095 2002-08-14 H.J. Lu <hjl@gnu.org>
6096
6097 * libbfd.h: Regenerate.
6098
6099 2002-08-14 H.J. Lu <hjl@gnu.org>
6100
6101 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6102
6103 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6104
6105 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6106 instructions.
6107 (m68hc11_direct_relax): New to define table of relaxable instructions.
6108 (find_relaxable_insn): New, find a relaxable insn.
6109 (compare_reloc): New to compare two relocs.
6110 (m68hc11_elf_relax_section): New, relax text sections.
6111 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6112 (elf32_m68hc11_check_relocs): New function for GC support.
6113 (elf32_m68hc11_relocate_section): New function for GC support.
6114 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6115 (elf_backend_check_relocs): Likewise.
6116 (elf_backend_relocate_section): Likewise.
6117
6118 2002-08-13 H.J. Lu <hjl@gnu.org>
6119
6120 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6121 definitions in shared objects when checking symbol with
6122 undefined version.
6123
6124 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6125
6126 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6127 (elf32_m68hc11_gc_sweep_hook): Likewise.
6128 (elf_backend_gc_mark_hook): Define for GC section support.
6129 (elf_backend_gc_sweep_hook): Likewise.
6130 (elf_backend_can_gc_sections): Likewise.
6131
6132 * elf32-m68hc12.c: Likewise.
6133
6134 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6135
6136 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6137 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6138 (_bfd_m68hc11_elf_set_private_flags): New function.
6139 Use them to set/check/print ELF flags specific to 68HC11.
6140
6141 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6142 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6143 (_bfd_m68hc12_elf_set_private_flags): New function.
6144 Use them to set/check/print ELF flags specific to 68HC12.
6145
6146 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6147
6148 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6149 fix masks for PC-rel relocs.
6150 (m68hc11_elf_ignore_reloc): New function.
6151
6152 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6153 68HC12 banked addressing relocs.
6154 (m68hc12_phys_addr): New to compute physical address of banked memory.
6155 (m68hc12_phys_page): Likewise for page.
6156 (m68hc12_addr_is_banked): New to see if address is in banked area.
6157 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6158
6159 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6160
6161 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6162 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6163 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6164 * bfd-in2.h: Regenerate.
6165
6166 2002-08-12 H.J. Lu <hjl@gnu.org>
6167
6168 * elflink.h (elf_add_default_symbol): Preserve section across
6169 elf_merge_symbol.
6170
6171 2002-08-09 Graeme Peterson <gp@qnx.com>
6172
6173 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6174 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6175 * Makefile.in: Regenerate.
6176 * config.bfd: Add support for powerpc{le}-*-nto targets.
6177 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6178 * configure: Regenerate.
6179 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6180 common file "elf32-qnx.h", and now include that file.
6181 * elf32-qnx.h: New file: QNX specific common elf backend.
6182 * elf32-ppc.c: Do not include elf32-target.h if
6183 ELF32_PPC_C_INCLUDED is defined.
6184 * elf32-ppcqnx.c: New file: Support for QNX.
6185 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6186 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6187
6188 2002-08-09 Nick Clifton <nickc@redhat.com>
6189
6190 * po/sv.po: Updated Swedish translation.
6191
6192 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6193
6194 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6195 g->global_gotsym is NULL.
6196
6197 2002-08-08 H.J. Lu <hjl@gnu.org>
6198
6199 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6200 overrides an indirect versioned symbol.
6201
6202 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6203
6204 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6205 for R_386_TLS_TPOFF32 relocs against symndx 0.
6206
6207 2002-08-07 H.J. Lu <hjl@gnu.org>
6208
6209 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6210 with undefined version if needed.
6211 (elf_link_assign_sym_version): Match a default symbol with a
6212 version without definition. No need to hide the default
6213 definition separately.
6214
6215 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6216
6217 * elflink.h (elf_link_output_extsym): Don't output symbols from
6218 SEC_EXCLUDE sections.
6219
6220 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6221
6222 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6223
6224 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6225 entries.
6226
6227 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6228
6229 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6230 mismatch.
6231
6232 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6233
6234 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6235
6236 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6237
6238 * elf32-mips.c (mips_reloc_map): Fix typo.
6239
6240 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6241
6242 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6243
6244 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6245
6246 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6247
6248 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6249
6250 * libxcoff.h: Use PARAMS on function declarations.
6251 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6252 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6253
6254 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6255 addend.
6256 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6257
6258 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6259
6260 * coff-rs6000.c: Formatting fixes.
6261 (xcoff_calculate_relocation): Use PARAMS in declaration.
6262 (xcoff_complain_overflow): Likewise.
6263 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6264 (bfd_xcoff_backend_data): Remove useless comments.
6265 (rs6000coff_vec): Likewise.
6266 (bfd_pmac_xcoff_backend_data): Likewise.
6267 (pmac_xcoff_vec): Likewise.
6268
6269 * coff64-rs6000.c: Formatting fixes.
6270 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6271 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6272 (bfd_xcoff_backend_data): Remove useless comments.
6273 (rs6000coff64_vec): Likewise.
6274 (bfd_xcoff_aix5_backend_data): Likewise.
6275 (aix5coff64_vec): Likewise.
6276
6277 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6278
6279 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6280 mask entries. Use complain_overflow_dont for R_REF.
6281 (xcoff_reloc_type_ba): Revert last change.
6282 (xcoff_reloc_type_br): Likewise.
6283 (xcoff_reloc_type_crel): Likewise.
6284 (xcoff_ppc_relocate_section): Likewise.
6285 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6286 (xcoff64_ppc_relocate_section): Likewise.
6287 (xcoff64_howto_table): Revert some of last change to mask entries.
6288 Use complain_overflow_dont for R_REF.
6289
6290 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6291 relocs with bitsize == 16 have size = 1.
6292 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6293 (xcoff_reloc_type_br): Likewise.
6294 (xcoff_reloc_type_crel): Likewise.
6295 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6296 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6297 dst_mask adjustment.
6298 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6299 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6300 bitsize == 16 have size = 1.
6301
6302 2002-08-01 Denis Chertykov <denisc@overta.ru>
6303
6304 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6305 (struct misc): New field isymbuf. All free_* fields removed.
6306 (symbol_value): Pass in internal syms. No need to swap syms in.
6307 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6308 possibly cached info.
6309 (tidyup_after_error): Removed.
6310 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6311 misc. Use new field.
6312 (adjust_all_relocations): Use internal syms. No need to swap syms
6313 in and out.
6314 (add_page_insn): Don't use removed fields of struct misc.
6315
6316 2002-08-01 Nick Clifton <nickc@redhat.com>
6317
6318 * elf32-arm.h: Revert previous delta.
6319
6320 2002-08-01 Nick Clifton <nickc@redhat.com>
6321
6322 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6323 * configure: Regenerate.
6324
6325 2002-07-31 H.J. Lu <hjl@gnu.org>
6326
6327 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6328 selected.
6329
6330 2002-07-31 H.J. Lu <hjl@gnu.org>
6331
6332 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6333 is selected.
6334
6335 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6336
6337 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6338 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6339
6340 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6341
6342 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6343 There is no 8 byte relocation type for this architecture.
6344 (do_ns32k_reloc): Use bfd_vma instead of native types.
6345 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6346 returns void.
6347 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6348 rely on generic code to do that.
6349 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6350 to all table entries.
6351 (_bfd_ns32k_relocate_contents): put_data returns void.
6352 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6353 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6354 return void.
6355
6356 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6357
6358 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6359 archive object is target dependant.
6360
6361 2002-07-31 Adam Nemet <anemet@lnxw.com>
6362
6363 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6364 (THUMB_PLT_ENTRY_SIZE): New macro.
6365 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6366 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6367 ARM_PLT_ENTRY_SIZE.
6368 (elf32_arm_plt_entry): Likewise.
6369 (elf_backend_plt_header_size): Likewise.
6370 (elf32_thumb_plt0_entry): New global.
6371 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6372 into .plt.thumb.
6373 (elf32_thumb_plt_entry): New global.
6374 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6375 Thumb entries. Set the bottom bit of the corresponding GOT entry
6376 for a Thumb PLT entry.
6377 (struct elf32_arm_plt_entry_info): New structure.
6378 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6379 type.
6380 (elf32_arm_link_hash_newfunc): Initialize new member.
6381 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6382 relocations against the PLT.
6383 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6384 first_rel_type if this is the first time we encounter the symbol.
6385 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6386 Determine if relocation needs a PLT entry. Set first_rel_type if
6387 this is the first time we encounter the symbol
6388 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6389 functions as well.
6390 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6391 (elf32_arm_create_dynamic_sections): New function. Create the
6392 .plt.thumb section.
6393 (elf_backend_create_dynamic_sections): Call it.
6394
6395 2002-07-31 Nick Clifton <nickc@redhat.com>
6396
6397 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6398 'alternative' in order to avoid shadowing global symbol of the
6399 same name.
6400 * bfd-in2.h: Regenerate.
6401 * libbfd.h: Regenerate.
6402 * libcoff.h: Regenerate.
6403
6404 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6405
6406 * Makefile.am: Add n32 ABI support.
6407 * Makefile.in: Regenerate.
6408 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6409 bit vectors for mips*-*-linux targets as optional.
6410 * configure.in: Add n32 ABI vectors.
6411 * configure: Regenerate.
6412 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6413 * elfn32-mips.c: New file, n32 ABI support.
6414 * targets.c: Add n32 ABI vectors.
6415
6416 2002-07-30 Graeme Peterson <gp@qnx.com>
6417
6418 * elfarmqnx-nabi.c: New file: Support for QNX.
6419 * config.bfd: Add support for arm-*-nto target.
6420 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6421 * configure: Regenerate.
6422 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6423 * Makefile.in: Regenerate.
6424 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6425 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6426 * elfarm-nabi.c: Do not include elf32-arm.h if
6427 ELFARM_NABI_C_INCLUDED is defined.
6428 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6429
6430 2002-07-30 Nick Clifton <nickc@redhat.com>
6431
6432 * po/sv.po: Updated Swedish translation.
6433
6434 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6435
6436 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6437
6438 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6439
6440 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6441 * archive.c (bfd_generic_archive_p): Likewise.
6442 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6443 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6444 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6445 (xcoff64_archive_p): Likewise.
6446 (xcoff64_openr_next_archived_file): Likewise.
6447 (xcoff64_archive_p): Clean up tdata properly on error.
6448 * coffgen.c (coff_real_object_p): Likewise.
6449 (coff_object_p): Release filehdr and opthdr.
6450 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6451 * ieee.c (ieee_archive_p): Likewise.
6452 * ihex.c (ihex_object_p): Likewise.
6453 (ihex_mkobject): Always allocate tdata.
6454 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6455 * srec.c (srec_mkobject): Always allocate tdata.
6456 (srec_object_p): Clean up tdata properly on error.
6457 (symbolsrec_object_p): Likewise.
6458 * versados.c (versados_object_p): Likewise.
6459 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6460 and bfd_realloc instead of realloc.
6461 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6462 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6463 place of bfd_malloc, simplifying error freeing. Free hash table too.
6464 (vms_object_p): Clean up tdata on error.
6465 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6466 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6467
6468 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6469
6470 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6471
6472 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6473
6474 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6475 flags into resulting BFD.
6476
6477 2002-07-26 Alan Modra <amodra@bigpond.net.au>
6478
6479 From John Reiser <jreiser@BitWagon.com>
6480 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6481 tls_ldm_got.refcount.
6482
6483 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6484
6485 * elf64-mips.c: Update TODO comment.
6486 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6487 mips_elf64_gprel16_reloca): Remove prototypes.
6488 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6489 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6490 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6491 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6492 R_MIPS_HIGHEST.
6493 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6494 R_MIPS_GOT16. Remove wrong comments.
6495 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6496 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6497 from elf32-mips.c.
6498 (mips_elf64_hi16_reloc): Fix formatting.
6499 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6500 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6501 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6502 (mips_elf64_gprel16_reloc): Make static. Add check for
6503 partial_inplace.
6504 (mips_elf64_gprel16_reloca): Remove.
6505 (mips_elf64_literal_reloc): New function.
6506 (mips_elf64_gprel32_reloc): Fix formatting.
6507 (mips_elf64_shift6_reloc): Fix comment. Make static.
6508 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6509 elf32-mips.c.
6510 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6511 elf32-mips.c
6512 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6513 specific relocations.
6514 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6515 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6516 (ELF_MAXPAGESIZE): Add comment.
6517
6518 2002-07-25 Nick Clifton <nickc@redhat.com>
6519
6520 * po/sv.po: Updated Swedish translation.
6521 * po/es.po: Updated Spanish translation.
6522 * po/fr.po: Updated French translation.
6523
6524 2002-07-25 Alan Modra <amodra@bigpond.net.au>
6525
6526 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6527 as elf_link_record_local_dynamic_symbol.
6528 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6529 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6530 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6531 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6532 attempt is made to record a symbol in a discarded section, and
6533 return `2' in that case.
6534
6535 2002-07-24 Nick Clifton <nickc@redhat.com>
6536
6537 * po/sv.po: Updated Swedish translation.
6538 * po/es.po: Updated Spanish translation.
6539
6540 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6541
6542 * po/SRC-POTFILES.in: Regenerate.
6543
6544 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6545 immediately. Remove code handling relocatable linking.
6546 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6547 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6548 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
6549 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6550 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6551 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6552 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6553 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6554 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6555 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6556 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6557 * elf32-avr.c (elf_backend_rela_normal): Define.
6558 * elf32-cris.c: Likewise.
6559 * elf32-fr30.c: Likewise.
6560 * elf32-frv.c: Likewise.
6561 * elf32-h8300.c: Likewise.
6562 * elf32-hppa.c: Likewise.
6563 * elf32-ip2k.c: Likewise.
6564 * elf32-sparc.c: Likewise.
6565 * elf32-v850.c: Likewise.
6566 * elf32-vax.c: Likewise.
6567 * elf64-hppa.c: Likewise.
6568 * elf64-sparc.c: Likewise.
6569 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
6570 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6571 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6572 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6573 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6574 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6575 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6576 * elf-m10200.c (USE_RELA): Don't define.
6577 * elf-m10300.c: Likewise.
6578 * elfarm-oabi.c: Likewise.
6579 * elf32-i370.c: Likewise.
6580 * elf32-ip2k.c: Likewise.
6581 * elf32-m68k.c: Likewise.
6582 * elf32-mcore.c: Likewise.
6583 * elf32-ppc.c: Likewise.
6584 * elf32-s390.c: Likewise.
6585 * elf32-vax.c: Likewise.
6586 * elf64-ppc.c: Likewise.
6587 * elf64-s390.c: Likewise.
6588 * elf64-x86-64.c: Likewise.
6589 * elfxx-ia64.c: Likewise.
6590 * elf32-avr.c (USE_REL): Don't undef.
6591 * elf32-ip2k.c: Likewise.
6592
6593 2002-07-23 Nick Clifton <nickc@redhat.com>
6594
6595 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6596 'want_p_paddr_set_to_zero'.
6597 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6598 to false;
6599 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6600 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6601
6602 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6603
6604 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6605 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6606 show the Copyright string.
6607 Minor formatting tidy ups.
6608
6609 2002-07-23 Nick Clifton <nickc@redhat.com>
6610
6611 * po/fr.po: Updated French translation.
6612 * po/sv.po: Updated Swedish translation.
6613
6614 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6615
6616 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6617 when outputting relocs.
6618
6619 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6620
6621 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6622 DT_PLTGOT into the dynamic section if there is a PLT.
6623
6624 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6625
6626 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6627 elf32-mips.c.
6628 (_bfd_mips_elf_write_section): Likewise.
6629 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6630 (_bfd_mips_elf_write_section): Likewise.
6631 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6632 (elf32_mips_write_section): Likewise.
6633 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6634 (_bfd_mips_elf_write_section): Likewise.
6635
6636 2002-07-19 Alan Modra <amodra@bigpond.net.au>
6637
6638 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6639 PT_IA_64_UNWIND segments for a given section.
6640
6641 2002-07-17 H.J. Lu <hjl@gnu.org>
6642
6643 * Makefile.am: Fix a typo.
6644 * Makefile.in: Regenerate.
6645
6646 2002-07-15 Denis Chertykov <denisc@overta.ru>
6647 Frank Ch. Eigler <fche@redhat.com>
6648 Ben Elliston <bje@redhat.com>
6649 Alan Lehotsky <alehotsky@cygnus.com>
6650 John Healy <jhealy@redhat.com>
6651 Graham Stott <grahams@redhat.com>
6652 Jeff Johnston <jjohnstn@redhat.com>
6653
6654 * Makefile.am: Add support for ip2k.
6655 * Makefile.in: Regenerate.
6656 * doc/Makefile.in: Regenerate.
6657 * archures.c: Add support for ip2k.
6658 * config.bfd: Add support for ip2k.
6659 * configure.in: Add support for ip2k.
6660 * configure: Regenerate.
6661 * reloc.c: Add support for ip2k.
6662 * targets.c: Add support for ip2k.
6663 * bfd-in2.h: Regenerate.
6664 * libbfd.h: Regenerate.
6665 * cpu-ip2k.c: New file.
6666 * elf32-ip2k.c: New file.
6667
6668 2002-07-17 Ian Rickards <irickard@arm.com>
6669
6670 * dwarf2.c (concat_filename): If we can't establish the directory
6671 just return the filename.
6672
6673 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
6674
6675 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6676
6677 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6678
6679 * elflink.h: Formatting fixes, tidy prototypes.
6680 (elf_link_assign_sym_version): Move common code out of loop.
6681
6682 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6683
6684 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6685 reloc section size is zero. Correct reloc output location.
6686
6687 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6688
6689 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6690 the final type for the e_fsel selector when generating PA2.0W code.
6691 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6692 relocations.
6693
6694 2002-07-14 H.J. Lu <hjl@gnu.org>
6695
6696 * elflink.h (elf_link_assign_sym_version): Hide the default
6697 definition if there is a hidden versioned definition.
6698
6699 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
6700
6701 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6702 dynamic reference test in assertion when initializing GOT with
6703 static contents. Just assert that there are either no dynamic
6704 sections, the symbol is defined in the regular objects or that the
6705 symbol is undef weak. Tweak comment.
6706 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6707 only if the symbol isn't defined in the program and isn't undef
6708 weak.
6709 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6710 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6711 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6712 (elf_cris_discard_excess_program_dynamics): Don't consider
6713 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6714
6715 2002-07-11 Alan Modra <amodra@bigpond.net.au>
6716
6717 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6718 unresolved debugging relocs in dynamic applications.
6719 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6720 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6721 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6722 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6723 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6724 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6725
6726 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6727
6728 * elf64-ppc.c (ONES): Define.
6729 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6730 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6731 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6732
6733 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6734 (ppc64_elf_set_private_flags): Delete.
6735 (ppc64_elf_section_from_shdr): Delete.
6736 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6737 (ppc64_elf_fake_sections): Delete.
6738 (bfd_elf64_bfd_set_private_flags): Don't define.
6739 (bfd_elf64_get_symbol_info): Likewise.
6740 (elf_backend_section_from_shdr): Likewise.
6741 (elf_backend_fake_sections): Likewise.
6742
6743 2002-07-10 Marco Walther <Marco.Walther@sun.com>
6744
6745 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6746 when not already set.
6747 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6748 (elf_backend_fake_sections): Define.
6749
6750 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6751
6752 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6753 Formatting.
6754 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6755
6756 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
6757
6758 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6759 NULL sym_hashes to just before use.
6760 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6761 symbol with non-default visibility.
6762 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6763 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6764 Ditto.
6765 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6766 symbol with non-default visibility.
6767 (cris_elf_check_relocs): At tests for local symbol before
6768 increasing h->plt.refcount, also check for non-default
6769 visibility. Ditto when checking for local symbol to eliminate
6770 pc-relative runtime relocs.
6771
6772 2002-07-08 Alan Modra <amodra@bigpond.net.au>
6773
6774 * elf.c: Formatting.
6775 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6776 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6777 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6778 segments.
6779
6780 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6781 Alan Modra <amodra@bigpond.net.au>
6782
6783 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6784 account the impact of relocation count overflow when computing
6785 section offsets.
6786 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6787 or not to apply the PE COFF reloc overflow handling. Fix a
6788 fencepost error in deciding whether or not to use that technique.
6789
6790 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6791
6792 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6793 change type of locsyms.
6794 (bfd_elf_get_elf_syms): Declare.
6795 * elf.c (bfd_elf_get_elf_syms): New function.
6796 (group_signature): Use bfd_elf_get_elf_syms.
6797 (bfd_section_from_r_symndx): Likewise.
6798 * elfcode.h (elf_slurp_symbol_table): Likewise.
6799 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6800 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6801 locality of various data structures. Properly free internal relocs.
6802 (elf_bfd_final_link): Properly free internal relocs.
6803 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6804 (elf_link_input_bfd): Likewise.
6805 (elf_gc_mark): Likewise. Properly free internal relocs.
6806 (elf_gc_sweep): Properly free internal relocs.
6807 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6808 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6809 internal relocs.
6810 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6811 Properly free possibly cached info.
6812 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6813 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6814 symbol swapping code.
6815 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6816 Properly free possibly cached info.
6817 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6818 (mn10300_elf_relax_delete_bytes): Likewise.
6819 (mn10300_elf_symbol_address_p): Likewise.
6820 (mn10300_elf_get_relocated_section_contents): Likewise.
6821 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6822 (elf32_h8_relax_delete_bytes): Likewise.
6823 (elf32_h8_symbol_address_p): Likewise.
6824 (elf32_h8_get_relocated_section_contents): Likewise.
6825 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6826 (m32r_elf_relax_delete_bytes): Likewise.
6827 (m32r_elf_get_relocated_section_contents): Likewise.
6828 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6829 elf_section_data to determine whether cached.
6830 (sh_elf_relax_section): As above for elf-m10200.c.
6831 (sh_elf_relax_delete_bytes): Likewise.
6832 (sh_elf_get_relocated_section_contents): Likewise.
6833 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6834 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6835 reading of local syms.
6836 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6837 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6838 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6839 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6840 relocs.
6841 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6842 free internal relocs and section contents. Don't read symbols.
6843 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6844 (elf32_hppa_size_stubs): Don't free local syms.
6845 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6846 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6847 possibly cached info.
6848 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6849 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6850 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6851 all_local_syms.
6852 (get_local_syms): Delete function.
6853 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6854 on exit.
6855 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6856
6857 2002-07-05 Jim Wilson <wilson@redhat.com>
6858
6859 * syms.c (decode_section_type): New.
6860 (bfd_decode_symclass): Call decode_section_type.
6861
6862 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6863
6864 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6865 section content start.
6866 Reported by Michael Schumacher <mike@hightec-rt.com>.
6867
6868 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6869
6870 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6871 link order code. Don't actually remove the output section here;
6872 Just set a flag for the linker to do so.
6873 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6874 sections when setting up output section dynsyms.
6875
6876 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6877
6878 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6879 fudge.
6880 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6881 libs here instead.
6882
6883 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6884
6885 * elf64-s390.c (create_got_section): Set .got section alignment to
6886 8 bytes.
6887 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6888
6889 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6890
6891 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6892
6893 2002-07-01 Matt Thomas <matt@3am-software.com>
6894
6895 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6896 to EF_VAX_*.
6897
6898 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6899
6900 * elfxx-mips.c (ABI_64_P): Fix comment.
6901 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6902 new section names for N64 ABI.
6903 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6904 (mips_elf_calculate_relocation): Code formatting.
6905 (mips_elf_create_dynamic_relocation): Likewise.
6906 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6907 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6908 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6909 in any NewABI.
6910 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6911 for NewABI.
6912 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6913 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6914 here, too.
6915
6916 2002-07-01 Andreas Schwab <schwab@suse.de>
6917
6918 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6919 R_X86_64_64 to R_X86_64_RELATIVE.
6920
6921 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6922
6923 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6924 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6925 Run "make dep-am".
6926 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6927 host_aout_vec.
6928 * configure.in (vaxbsd_vec): Add.
6929 * targets.c (vaxbsd_vec): Add.
6930 * Makefile.in: Rebuild.
6931 * configure: Rebuild.
6932 * po/SRC-POTFILES.in: Rebuild.
6933
6934 2002-07-01 Alan Modra <amodra@bigpond.net.au>
6935
6936 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6937 examining to gc_mark_hook, rather than the bfd.
6938 (elf_gc_sections): Adjust.
6939 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6940 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6941 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6942 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6943 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6944 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6945 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6946 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6947 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6948 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6949 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6950 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6951 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6952 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6953 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6954 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6955 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6956 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6957 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6958 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6959 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6960 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6961 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6962 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6963 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6964 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6965 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6966 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6967 redundant local sym tests.
6968 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6969 (link_hash_newfunc): Init is_entry.
6970 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6971 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6972 (create_linkage_sections): Use bfd_make_section_anyway rather than
6973 bfd_make_section.
6974 (ppc64_elf_mark_entry_syms): New function.
6975 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6976 up opd entry to function section map.
6977 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6978 relocs that reference the opd section.
6979 (edit_opd): New function.
6980 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6981 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6982 (get_local_syms): Do so here. Exit if we already have local syms.
6983 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6984 read local syms on non-ELF input.
6985 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6986 than duplicating it's function here. Adjust free of internal
6987 relocs to suit.
6988 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6989 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6990 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6991 _bfd_elf32_link_read_relocs rather than duplicating it's function
6992 here. Adjust free of internal relocs to suit.
6993
6994 2002-07-01 Andreas Jaeger <aj@suse.de>
6995
6996 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6997 are not allowed in shared libs code, enforce -fPIC.
6998
6999 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7000
7001 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7002 trailing zero-sequences when there's previous left-over data.
7003
7004 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7005
7006 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7007 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7008 and opd_rel_sec in order for starting rela section. Check _raw_size.
7009 (elf_backend_reloc_type_class): Define.
7010
7011 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7012
7013 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7014 DWARF2 formats.
7015
7016 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7017
7018 * cpu-powerpc.c: Comment on ordering of arch_info.
7019 * elf32-ppc.c (ppc_elf_object_p): New function.
7020 (elf_backend_object_p): Define.
7021 * elf64-ppc.c (ppc64_elf_object_p): New function.
7022 (elf_backend_object_p): Define.
7023
7024 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7025
7026 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7027 * configure: Regenerate.
7028
7029 2002-06-25 Jason Eckhardt <jle@rice.edu>
7030
7031 * dwarf2.c (decode_line_info): Check unit->addr_size
7032 to read in the proper number of prologue bytes.
7033
7034 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7035
7036 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7037 aix5coff64_vec if 64-bit bfd support has been enabled.
7038 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7039 been enabled.
7040
7041 * targets.c (_bfd_target_vector[]): Only include
7042 aix5coff64_vec if 64-bit bfd support has been enabled.
7043
7044 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7045
7046 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7047 * elf32-hppa.c (hppa_add_stub): Likewise.
7048 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7049 * elflink.h (elf_add_default_symbol): Fix comment typo.
7050 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7051 (elf_link_add_object_symbols): Likewise.
7052 (elf_link_assign_sym_version): Likewise.
7053 * hash.c (bfd_hash_lookup): Likewise.
7054 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7055 * section.c (bfd_get_unique_section_name): Likewise.
7056 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7057 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7058 (assign_section_numbers): Likewise.
7059 (_bfd_elfcore_make_pseudosection): Likewise.
7060 (elfcore_grok_lwpstatus): Likewise.
7061 (elfcore_grok_win32pstatus): Likewise.
7062 (elfcore_write_note): Constify input params. Use PTR instead of
7063 void *. Include terminating NUL in namesz. Correct padding.
7064 Support NULL "name" param. Use memcpy instead of strcpy.
7065 (elfcore_write_prpsinfo): Constify input params.
7066 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7067 (elfcore_write_lwpstatus): Likewise.
7068 (elfcore_write_pstatus): Likewise.
7069 (elfcore_write_prfpreg): Likewise.
7070 (elfcore_write_prxfpreg): Likewise.
7071 * elf-bfd.h (elfcore_write_note): Update declaration.
7072 (elfcore_write_prpsinfo): Likewise.
7073 (elfcore_write_prstatus): Likewise.
7074 (elfcore_write_pstatus): Likewise.
7075 (elfcore_write_prfpreg): Likewise.
7076 (elfcore_write_prxfpreg): Likewise.
7077 (elfcore_write_lwpstatus): Likewise.
7078
7079 2002-06-25 Jason Eckhardt <jle@rice.edu>
7080
7081 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7082 symbols of type stProc and stStaticProc.
7083
7084 2002-06-25 Nick Clifton <nickc@redhat.com>
7085
7086 * ecoff.c: VArious formatting fixes.
7087
7088 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7089
7090 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7091
7092 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7093
7094 * aout-adobe.c: Don't compare against "true" or "false.
7095 * aout-target.h: Likewise.
7096 * aoutx.h: Likewise.
7097 * archive.c: Likewise.
7098 * bout.c: Likewise.
7099 * cache.c: Likewise.
7100 * coff-a29k.c: Likewise.
7101 * coff-alpha.c: Likewise.
7102 * coff-i386.c: Likewise.
7103 * coff-mips.c: Likewise.
7104 * coff-or32.c: Likewise.
7105 * coff64-rs6000.c: Likewise.
7106 * coffcode.h: Likewise.
7107 * coffgen.c: Likewise.
7108 * cpu-ns32k.c: Likewise.
7109 * ecoff.c: Likewise.
7110 * ecofflink.c: Likewise.
7111 * elf.c: Likewise.
7112 * elf32-arm.h: Likewise.
7113 * elf32-cris.c: Likewise.
7114 * elf32-d30v.c: Likewise.
7115 * elf32-i386.c: Likewise.
7116 * elf32-mcore.c: Likewise.
7117 * elf32-ppc.c: Likewise.
7118 * elf32-sh.c: Likewise.
7119 * elf32-sh64.c: Likewise.
7120 * elf32-v850.c: Likewise.
7121 * elf64-alpha.c: Likewise.
7122 * elf64-sh64.c: Likewise.
7123 * elfcode.h: Likewise.
7124 * elfcore.h: Likewise.
7125 * elflink.h: Likewise.
7126 * elfxx-mips.c: Likewise.
7127 * i386os9k.c: Likewise.
7128 * ieee.c: Likewise.
7129 * libbfd.c: Likewise.
7130 * linker.c: Likewise.
7131 * mmo.c: Likewise.
7132 * nlm32-alpha.c: Likewise.
7133 * nlm32-i386.c: Likewise.
7134 * nlm32-ppc.c: Likewise.
7135 * nlm32-sparc.c: Likewise.
7136 * nlmcode.h: Likewise.
7137 * oasys.c: Likewise.
7138 * pdp11.c: Likewise.
7139 * peicode.h: Likewise.
7140 * reloc.c: Likewise.
7141 * som.c: Likewise.
7142 * srec.c: Likewise.
7143 * tekhex.c: Likewise.
7144 * vms.c: Likewise.
7145 * xcofflink.c: Likewise.
7146 * elf64-sparc.c: Edit comment to not use "== false".
7147
7148 * aoutf1.h: Don't use "? true : false".
7149 * ecoff.c: Likewise.
7150 * format.c: Likewise.
7151 * ieee.c: Likewise.
7152 * linker.c: Likewise.
7153 * mmo.c: Likewise.
7154 * oasys.c: Likewise.
7155
7156 2002-06-23 H.J. Lu <hjl@gnu.org>
7157
7158 * elflink.h (elf_link_add_archive_symbols): For the default
7159 version, check references with only one `@' first.
7160
7161 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7162
7163 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7164 function.
7165 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7166 symbol table.
7167 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7168 (elf64_hppa_size_dynamic_sections): Revise to use
7169 elf64_hppa_mark_milli_and_exported_functions.
7170 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7171 symbols out of dynamic symbol table.
7172
7173 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7174
7175 * Makefile.in: Regenerate.
7176 * libbfd.h: Regenerate.
7177 * bfd-in2.h: Regenerate.
7178 * configure: Regenerate.
7179 * po/SRC-POTFILES.in: Regenerate.
7180
7181 * elflink.h: Comment typo fixes.
7182
7183 2002-06-23 H.J. Lu <hjl@gnu.org>
7184
7185 * elf-bfd.h (elf_link_loaded_list): New structure.
7186 (elf_link_hash_table): Add "loaded".
7187 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7188 * elflink.h (elf_link_check_versioned_symbol): New function.
7189 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7190
7191 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7192
7193 * elflink.h (size_dynamic_sections): If the target does not
7194 support an ELF style hash table, return true, indicating that
7195 nothing needed to be done, rather than false, indicating that the
7196 section's size could not be computed.
7197
7198 2002-06-18 Dave Brolley <brolley@redhat.com>
7199
7200 From Catherine Moore, Michael Meissner, Dave Brolley:
7201 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7202 * targets.c: Support bfd_elf32_frv_vec.
7203 * reloc.c: Add FRV relocs.
7204 * configure.in: Add support for bfd-elf32-frv-vec.
7205 * config.bfd (targ_cpu): Add support for frv-*-elf.
7206 * archures.c: Add frv arch and machines.
7207 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7208 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7209 (BFD32_BACKENDS): Add elf32-frv.lo.
7210 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7211 (cpu-frv.lo): New target.
7212 (elf32-frv.lo): New target.
7213 * cpu-frv.c: New file.
7214 * elf32-frv.c: New file.
7215
7216 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7217
7218 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7219 e_shnum == 0.
7220 Only read the first section header if e_shoff is non-zero.
7221 Don't consider e_shstrndx if there are no sections.
7222
7223 2002-06-17 Tom Rix <trix@redhat.com>
7224
7225 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7226 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7227 complain_overflow_bitfield.
7228
7229 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7230
7231 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7232 (bfd_fdopenr): Likewise.
7233 (bfd_openstreamr): Likewise.
7234 (bfd_openw): Likewise.
7235
7236 * targets.c: Sort target vecs.
7237 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7238 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7239 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7240 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7241 * configure.in: Sort target vecs. Add m88kmach3_vec.
7242 * configure: Regenerate.
7243
7244 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7245
7246 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7247 bpo_reloc_no to break sort order ties, not address of items.
7248
7249 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7250
7251 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7252 Skip excluded sections in determing __gp value.
7253 (elf_hppa_final_link_relocate): Use the symbol's address in
7254 R_PARISC_FPTR64 relocations that don't need an opd entry.
7255 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7256 (elf64_hppa_finalize_dynreloc): Likewise.
7257 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7258 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7259
7260 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7261
7262 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7263 alignment for .bss, .data and .text sections so that sse and sse2
7264 code will work.
7265 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7266
7267 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7268
7269 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7270 sh[1234]*-elf*.
7271
7272 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7273
7274 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7275 dynamic sections.
7276
7277 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7278 for a symbol that has no output section.
7279 (allocate_dynrel_entries): Correct comment.
7280 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7281 unless we want one.
7282 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7283 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7284 with no section. Remove unnecessary parentheses.
7285
7286 2002-06-11 Tom Rix <trix@redhat.com>
7287
7288 * coffcode.h (coff_compute_section_file_positions): Add data
7289 section to AIX loader alignment check.
7290
7291 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7292 alignment to 4 bytes.
7293 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7294 power accessor macro.
7295 (do_shared_object_padding): Remove invalid assertion.
7296
7297 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7298
7299 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7300 for removed output sections.
7301
7302 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7303
7304 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7305 htab_alloc.
7306 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7307
7308 2002-06-08 H.J. Lu <hjl@gnu.org>
7309
7310 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7311 work around a long long bug in gcc 2.96 on mips.
7312
7313 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7314
7315 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7316 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7317 Regenerate dependency lists.
7318 * Makefile.in: Regenerate.
7319 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7320 vax1knetbsd_vec to targ_selvecs.
7321 * configure.in: Add vax1knetbsd_vec.
7322 * configure: Regenerate.
7323 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7324 * vax1knetbsd.c: New file.
7325 * vaxnetbsd.c: Update copyright years.
7326 (TARGET_PAGE_SIZE): Set to 0x1000.
7327 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7328
7329 2002-06-08 Matt Thomas <matt@3am-software.com>
7330
7331 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7332
7333 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7334
7335 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7336
7337 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7338
7339 * Makefile.am: Run "make dep-am".
7340 * Makefile.in: Regenerate.
7341
7342 * armnetbsd.c: Replace CONST with const.
7343 * corefile.c: Likewise.
7344 * elf32-dlx.c: Likewise.
7345 * elf64-mips.c: Likewise.
7346 * mmo.c: Likewise.
7347 * ns32knetbsd.c: Likewise.
7348
7349 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7350 table is elf64-sparc.
7351
7352 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7353
7354 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7355 Fix RELA addends to get not shifted in the result. Don't do special
7356 handling of R_MIPS_64 for NewABI.
7357
7358 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7359
7360 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7361 (NAME(aout,slurp_reloc_table)): Likewise.
7362 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7363 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7364 (xcoff_write_archive_contents_big): Likewise.
7365 (xcoff_generate_rtinit): Likewise.
7366 (xcoff_generate_rtinit): Likewise, and check error return.
7367 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7368 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7369 (coff_get_normalized_symtab): Likewise.
7370 (coff_make_empty_symbol): Likewise.
7371 (bfd_coff_set_symbol_class): Likewise.
7372 * cofflink.c (coff_link_add_symbols): Likewise.
7373 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7374 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7375 (bfd_ecoff_write_accumulated_debug): Likewise.
7376 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7377 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7378 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7379 * ieee.c (do_with_relocs): Use bfd_zalloc.
7380 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7381 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7382 (NAME(aout,slurp_reloc_table)): Likewise.
7383 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7384 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7385 * som.c (som_build_and_write_symbol_table): Likewise.
7386 (som_slurp_string_table): Likewise.
7387 (som_slurp_symbol_table): Likewise.
7388 (som_bfd_ar_write_symbol_stuff): Likewise.
7389 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7390 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7391 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7392 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7393 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7394
7395 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7396
7397 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7398 "group" union.
7399 (elf_group_name): Update.
7400 (elf_group_id): Define.
7401 (bfd_elf_set_group_contents): Declare.
7402 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7403 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7404 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7405 that sym for the signature.
7406 (_bfd_elf_compute_section_file_positions): Don't call
7407 set_group_contents for "ld -r" case.
7408 (swap_out_syms): Use bfd_zalloc.
7409 * elflink.h (elf_link_add_archive_symbols): Likewise.
7410 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7411 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7412
7413 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7414
7415 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7416 relocs in opd for non-shared too.
7417
7418 2002-06-06 Jeffrey Law <law@redhat.com>
7419
7420 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7421 relocations.
7422
7423 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7424
7425 * merge.c: Include libiberty.h.
7426 * elf-strtab.c: Include libiberty.h.
7427
7428 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7429
7430 * peXXigen.c (pe_print_idata): Remove unused variable.
7431
7432 2002-06-06 David Heine <dlheine@tensilica.com>
7433
7434 * elf.c (assign_file_positions_for_segments): Remove unallocated
7435 sections from the section to segment mapping for PT_LOAD segments.
7436 Update comment about empty loadable segments.
7437
7438 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7439
7440 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7441 is within the .stabstr section.
7442
7443 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7444
7445 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7446 are "const PTR", not "const PTR *".
7447 (bfd_elf32_swap_symbol_in): Likewise.
7448 (bfd_elf64_swap_symbol_in): Likewise.
7449 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7450 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7451 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7452 (elf_link_add_object_symbols): Likewise.
7453 (elf_link_record_local_dynamic_symbol): Likewise.
7454 (elf_link_input_bfd): Likewise.
7455 (elf_gc_mark): Likewise.
7456 (elf_reloc_symbol_deleted_p): Likewise.
7457 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7458 (mn10200_elf_relax_delete_bytes): Likewise.
7459 (mn10200_elf_symbol_address_p): Likewise.
7460 (mn10200_elf_get_relocated_section_contents): Likewise.
7461 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7462 (mn10300_elf_relax_section): Likewise.
7463 (mn10300_elf_relax_delete_bytes): Likewise.
7464 (mn10300_elf_symbol_address_p): Likewise.
7465 (mn10300_elf_get_relocated_section_contents): Likewise.
7466 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7467 (elf32_h8_relax_delete_bytes): Likewise.
7468 (elf32_h8_symbol_address_p): Likewise.
7469 (elf32_h8_get_relocated_section_contents): Likewise.
7470 * elf32-hppa.c (get_local_syms): Likewise.
7471 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7472 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7473 * elf32-sh.c (sh_elf_relax_section): Likewise.
7474 (sh_elf_relax_delete_bytes): Likewise.
7475 (sh_elf_get_relocated_section_contents): Likewise.
7476 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7477 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7478 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7479 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7480 * elf64-ppc.c (get_local_syms): Likewise.
7481 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7482 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7483
7484 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7485
7486 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7487
7488 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7489
7490 * elf.c (group_signature): Swap in the whole symbol, and handle
7491 extracting section symbol names.
7492 (setup_group): Add comment.
7493 (set_group_contents): When called from objcopy or ld, arrange for
7494 section contents to be written. Write group member output section
7495 indices to allow objcopy to reorganize sections.
7496 (_bfd_elf_copy_private_section_data): Copy group info.
7497
7498 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7499 (bfd_elf32_swap_symbol_in): Update prototype.
7500 (bfd_elf64_swap_symbol_in): Likewise.
7501 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7502 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7503 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7504 (elf_link_add_object_symbols): Likewise.
7505 (elf_link_record_local_dynamic_symbol): Likewise.
7506 (elf_link_input_bfd): Likewise.
7507 (elf_gc_mark): Likewise.
7508 (elf_reloc_symbol_deleted_p): Likewise.
7509 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7510 (mn10200_elf_relax_delete_bytes): Likewise.
7511 (mn10200_elf_symbol_address_p): Likewise.
7512 (mn10200_elf_get_relocated_section_contents): Likewise.
7513 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7514 (mn10300_elf_relax_section): Likewise.
7515 (mn10300_elf_relax_delete_bytes): Likewise.
7516 (mn10300_elf_symbol_address_p): Likewise.
7517 (mn10300_elf_get_relocated_section_contents): Likewise.
7518 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7519 (elf32_h8_relax_delete_bytes): Likewise.
7520 (elf32_h8_symbol_address_p): Likewise.
7521 (elf32_h8_get_relocated_section_contents): Likewise.
7522 * elf32-hppa.c (get_local_syms): Likewise.
7523 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7524 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7525 * elf32-sh.c (sh_elf_relax_section): Likewise.
7526 (sh_elf_relax_delete_bytes): Likewise.
7527 (sh_elf_get_relocated_section_contents): Likewise.
7528 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7529 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7530 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7531 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7532 * elf64-ppc.c (get_local_syms): Likewise.
7533 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7534 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7535 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7536 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7537 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7538 * elf64-mips.c (mips_elf64_size_info): Likewise.
7539 * elf64-s390.c (s390_elf64_size_info): Likewise.
7540 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7541
7542 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7543
7544 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7545 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7546 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7547 _bfd_mips_elf_ignore_discarded_relocs.
7548 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7549
7550 2002-06-05 H.J. Lu <hjl@gnu.org>
7551
7552 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7553 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7554 the SEC_MERGE section.
7555
7556 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7557
7558 * coff-alpha.c: Update copyright date.
7559 * coff-mips.c: Likewise.
7560 * xcoff-target.h: Likewise.
7561
7562 * bfd-in.h: Remove "taken from the source" comment.
7563 * libbfd-in.h: Likewise.
7564 * libcoff-in.h: Likewise.
7565 * bfd-in2.h: Regenerate.
7566 * libbfd.h: Regenerate.
7567 * libcoff.h: Regenerate.
7568
7569 * elf.c (bfd_elf_discard_group): Return true.
7570 * elf-bfd.h (bfd_elf_discard_group): Declare.
7571 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7572 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7573 * bfd.c (bfd_discard_group): Define.
7574 * targets.c (struct bfd_target): Add _bfd_discard_group.
7575 (BFD_JUMP_TABLE_LINK): Here too.
7576 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7577 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7578 * aout-target.h (MY_bfd_discard_group): Define.
7579 * aout-tic30.c (MY_bfd_discard_group): Define.
7580 * binary.c (binary_bfd_discard_group): Define.
7581 * bout.c (b_out_bfd_discard_group): Define.
7582 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7583 * coffcode.h (coff_bfd_discard_group): Define.
7584 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7585 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7586 * i386msdos.c (msdos_bfd_discard_group): Define.
7587 * i386os9k.c (os9k_bfd_discard_group): Define.
7588 * ieee.c (ieee_bfd_discard_group): Define.
7589 * ihex.c (ihex_bfd_discard_group): Define.
7590 * mmo.c (mmo_bfd_discard_group): Define.
7591 * nlm-target.h (nlm_bfd_discard_group): Define.
7592 * oasys.c (oasys_bfd_discard_group): Define.
7593 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7594 * som.c (som_bfd_discard_group): Define.
7595 * srec.c (srec_bfd_discard_group): Define.
7596 * tekhex.c (tekhex_bfd_discard_group): Define.
7597 * versados.c (versados_bfd_discard_group): Define.
7598 * vms.c (vms_bfd_discard_group): Define.
7599 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7600 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7601 (aix5coff64_vec): Likewise.
7602 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7603
7604 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7605
7606 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7607 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7608 (elf32-sh64-com.lo): New dependency list.
7609 * Makefile.in: Regenerate.
7610 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7611 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7612 elf32-sh64-com.lo.
7613 * configure: Regenerate.
7614 * elf32-sh64.c (sh64_address_in_cranges)
7615 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7616 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7617 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7618 * elf32-sh64-com.c: ...here. New file.
7619
7620 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7621
7622 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7623 ATTRIBUTE_UNUSED on used params.
7624 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7625 before calling bfd_section_from_elf_index on local syms.
7626 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7627
7628 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7629
7630 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7631 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7632 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7633 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7634 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7635 * Makefile.in: Regenerate.
7636 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7637 (sh64-*-netbsd*): New targets.
7638 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7639 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7640 * configure: Regenerate.
7641 * elf32-sh64-nbsd.c: New file.
7642 * elf64-sh64-nbsd.c: New file.
7643 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7644 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7645 bfd_elf64_sh64lnbsd_vec.
7646
7647 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7648
7649 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7650 (bfd_section_from_shdr): Likewise. Set section name of group
7651 sections from signature.
7652 (group_signature): Split out from setup_group. Ensure symbol table
7653 is available.
7654 (bfd_elf_discard_group): New function.
7655 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7656 .gnu.linkonce* sections if they are members of a group.
7657 (set_group_contents): Set GRP_COMDAT flag.
7658 * section.c (bfd_discard_group): New function.
7659 * bfd-in.h (bfd_elf_discard_group): Declare.
7660 * bfd-in2.h: Regenerate.
7661 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7662 (elf_linkonce_p): Define.
7663
7664 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7665
7666 * elf.c (bfd_section_from_shdr): Make "name" const.
7667 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7668 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7669 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7670 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7671 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7672 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7673 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7674 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7675 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7676 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7677 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7678
7679 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7680
7681 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7682 ABI.
7683
7684 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7685
7686 * elf32-arc.c: Fix formatting.
7687 * elf32-arm.h: Likewise.
7688 * elf32-cris.c: Likewise.
7689 * elf32-dlx.c: Likewise.
7690 * elf32-hppa.c: Likewise.
7691 * elf32-i386.c: Likewise.
7692 * elf32-i386qnx.c: Likewise.
7693 * elf32-or32.c: Likewise.
7694 * elf32-s390.c: Likewise.
7695 * elf32-sh64.c: Likewise.
7696 * elf32-vax.c: Likewise.
7697 * elf32-xstormy16.c: Likewise.
7698 * elf64-alpha.c: Likewise.
7699 * elf64-mmix.c: Likewise.
7700 * elf64-ppc.c: Likewise.
7701 * elf64-s390.c: Likewise.
7702 * elf64-sh64.c: Likewise.
7703 * elf64-x86-64.c: Likewise.
7704
7705 2002-06-02 Richard Henderson <rth@redhat.com>
7706
7707 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7708 null when there are no got entries for a symbol.
7709 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7710 uninitialized variable warning.
7711
7712 2002-06-01 Richard Henderson <rth@redhat.com>
7713
7714 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7715 undefined symbols here.
7716 (elf64_alpha_relax_section): Do it here. Also test for not
7717 defined in the current module.
7718 (elf64_alpha_relocate_section_r): Split out of ...
7719 (elf64_alpha_relocate_section): ... here. Don't dereference
7720 NULL when looking up local got entries.
7721
7722 2002-06-01 Richard Henderson <rth@redhat.com>
7723
7724 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7725 symbols from JSR relaxation.
7726 (elf64_alpha_size_plt_section_1): New.
7727 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7728 (elf64_alpha_size_rela_got_1): ... here.
7729 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7730 (elf64_alpha_size_rela_got_section): ... here.
7731 (elf64_alpha_size_plt_section): New.
7732 (elf64_alpha_relax_section): Call them.
7733 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7734 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7735
7736 2002-06-01 Richard Henderson <rth@redhat.com>
7737
7738 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7739 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7740 in shared libraries. Fix DTPRELHI and TPRELHI value.
7741 (INSN_ADDQ, INSN_RDUNIQ): New.
7742 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7743 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7744 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7745 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7746 Handle GOTDTPREL and GOTTPREL relocations.
7747 (elf64_alpha_relax_gprelhilo): New.
7748 (elf64_alpha_relax_tls_get_addr): New.
7749 (elf64_alpha_relax_find_tls_segment): New.
7750 (elf64_alpha_relax_section): Handle TLS relocations.
7751 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7752 (elf64_alpha_check_relocs): Set it.
7753
7754 2002-06-01 Richard Henderson <rth@redhat.com>
7755
7756 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7757
7758 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7759 check; don't suppress dynamic relocs for non-allocated sections.
7760
7761 * elf64-alpha.c: Remove dead code.
7762
7763 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7764
7765 * bfd-in2.h: Regenerate.
7766 * libbfd.h: Regenerate.
7767 * po/SRC-POTFILES.in: Regenerate.
7768
7769 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7770 space for bss .plt.
7771
7772 2002-05-31 Graeme Peterson <gp@qnx.com>
7773
7774 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7775 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7776 Run "make dep-am".
7777 * Makefile.in: Regenerate.
7778 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7779 * configure.in: Add bfd_elf32_i386qnx_vec support.
7780 * configure: Regenerate.
7781 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7782 is_contained_by_filepos, and copy_private_bfd_data_p.
7783 * elf.c (assign_file_positions_for_segments): Call backend
7784 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7785 (IS_CONTAINED_BY_FILEPOS): Define.
7786 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7787 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7788 Fix non-K&R call to _bfd_error_handler.
7789 (_bfd_elf_copy_private_section_data): Use backend
7790 copy_private_bfd_data_p.
7791 * elf32-i386.c: Don't include elfxx-target.h when
7792 ELF32_I386_C_INCLUDED is defined.
7793 * elf32-i386qnx.c: New QNX elf backend file.
7794 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7795 elf_backend_is_contained_by_filepos, and
7796 elf_backend_do_copy_private_bfd_data.
7797 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7798
7799 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7800
7801 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7802 Move other similar defines to start of file.
7803
7804 2002-05-30 Tom Rix <trix@redhat.com>
7805
7806 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7807 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7808
7809 2002-05-30 Richard Henderson <rth@redhat.com>
7810
7811 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7812 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7813 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7814 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7815 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7816 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7817 n_local_got_entries to total_got_size and local_got_size.
7818 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7819 (alpha_got_entry_size): New.
7820 (elf64_alpha_relax_with_lituse): Use it.
7821 (elf64_alpha_relax_without_lituse): Likewise.
7822 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7823 (get_got_entry): New.
7824 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7825 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7826 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7827 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7828 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7829 (elf64_alpha_calc_got_offsets): Likewise.
7830 (alpha_dynamic_entries_for_reloc): New.
7831 (elf64_alpha_calc_dynrel_sizes): Use it.
7832 (elf64_alpha_size_dynamic_sections): Likewise.
7833 (elf64_alpha_relocate_section): Handle TLS relocations.
7834 * reloc.c: Add Alpha TLS relocations.
7835 * bfd-in2.h, libbfd.h: Rebuild.
7836
7837 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7838
7839 * peXXigen.c (pe_print_idata): Remove double printed
7840 import table lines; add Bound-To comment.
7841
7842 2002-05-29 Matt Thomas <matt@3am-software.com>
7843
7844 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7845 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7846 (elf32-vax.lo): New rule.
7847 * Makefile.in: Regenerate.
7848 * configure.in (bfd_elf32_vax_vec)
7849 (vaxnetbsd_vec): New vectors.
7850 * configure: Regenerate.
7851 * config.bfd (vax-*-netbsdelf*)
7852 (vax-*-netbsdaout*)
7853 (vax-*-netbsd*): New targets.
7854 * elf32-vax.c: New file.
7855 * reloc.c: Add VAX relocations.
7856 * bfd-in2.h: Regenerate.
7857 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7858
7859 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7860
7861 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7862 and bfd_elf32_bigarm_vec to targ_selvecs.
7863
7864 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7865
7866 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7867 with auto-imported symbols.
7868
7869 2002-05-29 Adam Nemet <anemet@lnxw.com>
7870
7871 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7872 sections only record bfd.
7873 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7874 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7875 * bfd-in2.h: Regenerate.
7876
7877 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7878
7879 * syms.c (_bfd_stab_section_find_nearest_line): Move
7880 declaration and initialisation of saw_line and saw_func out of
7881 for loop.
7882
7883 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7884
7885 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7886 (bfd_elf64_get_symbol_info): Define.
7887 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7888
7889 2002-05-29 Andrey Volkov <avolkov@transas.com>
7890
7891 * cpu-h8300.c: Make default h8300 machine first in machine list.
7892
7893 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7894
7895 * config.bfd: Added DLX configuraton.
7896 * Makefile.am: Added DLX configuraton.
7897 * configure.in: Added DLX configuraton.
7898 * archures.c: Add DLX architecure.
7899 * reloc.c: Add DLX relocs.
7900 * targets.c: Added DLX target vector.
7901 * configure: Regenerate.
7902 * Makefile.in: Regenreate.
7903 * bfd-in2.h: Regenreate.
7904 * elf32-dlx.c: New file: Support DLX target.
7905 * cpu-dlx.c: New file: Support DLX target.
7906
7907 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7908
7909 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7910
7911 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7912 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7913 strings to point inside function code sym string.
7914 (func_desc_adjust): Likewise.
7915 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7916
7917 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7918
7919 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7920 (elf64_x86_64_grok_psinfo): Added.
7921
7922 2002-05-24 TAMURA Kent <kent@netbsd.org>
7923
7924 * config.bfd: Add a target for i386-netbsdpe.
7925
7926 2002-05-24 Alan Modra <amodra@bigpond.net.au>
7927
7928 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7929 and is_func_descriptor.
7930 (func_desc_adjust): Hide function code sym in shared libs unless
7931 there is a matching exported function descriptor sym.
7932
7933 2002-05-23 Jakub Jelinek <jakub@redhat.com>
7934
7935 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7936 for symbols from SHF_TLS section.
7937 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7938 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7939 (map_sections_to_segments): Build PT_TLS segment if necessary.
7940 (assign_file_positions_for_segments): Likewise.
7941 (get_program_header_size): Account for PT_TLS segment.
7942 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7943 SEC_THREAD_LOCAL sections to STT_TLS.
7944 * reloc.c: Add 386 and IA-64 TLS relocs.
7945 * section.c (SEC_THREAD_LOCAL): Define.
7946 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7947 Remove.
7948 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7949 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7950 unconditionally.
7951 (struct elf_final_link_info): Add first_tls_sec.
7952 (elf_bfd_final_link): Set first_tls_sec.
7953 Compute elf_hash_table (info)->tls_segment.
7954 (elf_link_output_extsym): Handle STT_TLS symbols.
7955 (elf_link_input_bfd): Likewise.
7956 * syms.c (BSF_THREAD_LOCAL): Define.
7957 * bfd-in2.h: Rebuilt.
7958 * libbfd.h: Rebuilt.
7959 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7960 elf_i386_mkobject, elf_i386_object_p): New functions.
7961 (elf_howto_table): Add TLS relocs.
7962 (elf_i386_reloc_type_lookup): Support TLS relocs.
7963 (elf_i386_info_to_howto_rel): Likewise.
7964 (struct elf_i386_link_hash_entry): Add tls_type.
7965 (struct elf_i386_obj_tdata): New.
7966 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7967 New macros.
7968 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7969 (link_hash_newfunc): Clear tls_type.
7970 (elf_i386_check_relocs): Support TLS relocs.
7971 (elf_i386_gc_sweep_hook): Likewise.
7972 (allocate_dynrelocs): Likewise.
7973 (elf_i386_size_dynamic_sections): Likewise.
7974 (elf_i386_relocate_section): Likewise.
7975 (elf_i386_finish_dynamic_symbol): Likewise.
7976 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7977 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7978 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7979 want_tprel, want_dtpmod, want_dtprel.
7980 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7981 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7982 R_IA64_LTOFF_TPREL22.
7983 (elf_code_to_howto_index): Add TLS relocs.
7984 (elfNN_ia64_check_relocs): Support TLS relocs.
7985 (allocate_global_data_got): Account for TLS .got data.
7986 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7987 (elfNN_ia64_install_value): Supprt TLS relocs.
7988 (set_got_entry): Support TLS relocs.
7989 (elfNN_ia64_relocate_section): Likewise.
7990
7991 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7992
7993 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7994 BLX reloc round the relocation up rather than down.
7995 * coff-arm.c (coff_arm_relocate_section): Likewise.
7996
7997 2002-05-21 H.J. Lu (hjl@gnu.org)
7998
7999 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8000 definition.
8001
8002 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8003
8004 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8005 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8006
8007 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8008
8009 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8010 unresolved relocs.
8011 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8012
8013 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8014
8015 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8016 non-ELF targets.
8017
8018 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8019
8020 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8021 an error value.
8022 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8023 return with false on error.
8024 (elf_link_input_bfd): Check reloc_emitter return value.
8025
8026 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8027
8028 * config.bfd (armeb-*-netbsdelf*): New target.
8029
8030 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8031
8032 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8033 at the plt call stub.
8034
8035 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8036
8037 * cpu-mips.c (mips_compatible): Don't try to check machine
8038 compatibility.
8039
8040 2002-05-18 Tom Rix <trix@redhat.com>
8041
8042 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8043
8044 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8045
8046 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8047 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8048 we've already warned about an undefined symbol. Report more
8049 detail on reloc errors.
8050
8051 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8052
8053 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8054 * configure.in: Invoke AM_INSTALL_LIBBFD.
8055 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8056 (install_libbfd): .. New target.
8057 (uninstall_libbfd): Likewise.
8058 (install-bfdlibLTLIBRARIES): Likewise.
8059 (uninstall-bfdlibLTLIBRARIES): Likewise.
8060 (bfdlibdir): New.
8061 (bfdincludedir): New.
8062 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8063 * aclocal.m4: Regenerate.
8064 * configure: Regenerate.
8065 * Makefile.in: Regenerate.
8066
8067 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8068
8069 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8070 hash loop.
8071
8072 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8073
8074 * config.bfd: Add targets for sh64-linux (little endian and
8075 big endian).
8076
8077 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8078
8079 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8080 is located in the same section as the import table. Instead
8081 check, and if necessary load the section containing the thunk.
8082
8083 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8084
8085 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8086 bfd_bread.
8087 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8088 with bfd_bread.
8089
8090 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8091
8092 * aix5ppc-core.c: Warning fixes.
8093 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8094 * aout-target.h (MY_bfd_link_just_syms): Define.
8095 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8096 * bfd.c (bfd_link_just_syms): Define.
8097 * binary.c (binary_bfd_link_just_syms): Define.
8098 * bout.c (b_out_bfd_link_just_syms): Define.
8099 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8100 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8101 * coffcode.h (coff_bfd_link_just_syms): Define.
8102 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8103 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8104 (_bfd_elf_link_just_syms): Declare.
8105 * elf.c (_bfd_elf_link_just_syms): New function.
8106 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8107 sections haven't already been discarded by the linker.
8108 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8109 sections and SEC_MERGE sections.
8110 (elf_bfd_discard_info): Similarly here.
8111 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8112 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8113 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8114 * ieee.c (ieee_bfd_link_just_syms): Define.
8115 * ihex.c (ihex_bfd_link_just_syms): Define.
8116 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8117 (_bfd_generic_link_just_syms): Declare.
8118 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8119 * linker.c (_bfd_generic_link_just_syms): New function.
8120 * mmo.c (mmo_bfd_link_just_syms): Define.
8121 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8122 * oasys.c (oasys_bfd_link_just_syms): Define.
8123 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8124 * som.c (som_bfd_link_just_syms): Define.
8125 * srec.c (srec_bfd_link_just_syms): Define.
8126 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8127 (BFD_JUMP_TABLE_LINK): And here.
8128 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8129 * versados.c (versados_bfd_link_just_syms): Define.
8130 * vms.c (vms_bfd_link_just_syms): Define.
8131 * libbfd.h: Regenerate.
8132 * bfd-in2.h: Regenerate.
8133
8134 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8135
8136 * elf32-mips.c: Remove superfluous definitions copied from
8137 elfxx-mips.c.
8138 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8139 SGIish vectors to check the special case.
8140 (mips_elf_hi16_reloc): Fix comment.
8141 (mips_elf_got16_reloc): Likewise.
8142 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8143 (elf_reloc_map): Code cleanup.
8144 (mips_reloc_map): Add comment.
8145 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8146 (mips_elf32_rtype_to_howto): Likewise.
8147 (mips_elf32_discard_info): Likewise.
8148 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8149 lead to IRIX compatibility now.
8150
8151 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8152
8153 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8154
8155 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8156
8157 * config.bfd (shle-*-netbsdelf*): Add target which includes
8158 sh64 support.
8159
8160 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8161
8162 * configure.in: Revert 2002-04-07. Instead, auto-configure
8163 HAVE_ST_C_IMPL.
8164 * configure: Regenerate.
8165 * config.in: Regenerate.
8166 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8167 or AIX_5_CORE.
8168
8169 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8170
8171 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8172 corefiles as well.2
8173 * configure: Regenerate.
8174
8175 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8176
8177 * Makefile.am (install-data-local): Install headers to
8178 $(exec_prefix)/include.
8179 * Makefile.in: Regenerate.
8180
8181 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8182 Daniel Jacobowitz <drow@mvista.com>
8183
8184 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8185 map BFD_RELOC_RVA.
8186
8187 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8188
8189 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8190 hppa*-*-openbsd*): New targets.
8191 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8192 * configure: Regenerate.
8193
8194 2002-05-10 Tom Rix <trix@redhat.com>
8195
8196 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8197 xcoff64_ppc_relocate_section.
8198 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8199 * libxcoff.h: Common xcoff_reloc_type function declaration.
8200
8201 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8202
8203 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8204 added in 2002-05-09 commit.
8205
8206 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8207 don't look for stubs on all undefined syms.
8208
8209 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8210
8211 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8212 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8213 pcrel_offset.
8214
8215 * elf32-i386.c (elf_howto_table): Comments.
8216 (elf_i386_relocate_section): Handle more relocs for relocatable
8217 linking and against SEC_MERGE sections.
8218
8219 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8220
8221 * elf32-ppc.c (ppc_elf_create_got): New function.
8222 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8223 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8224 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8225 _bfd_elf_create_got_section.
8226
8227 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8228
8229 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8230 * elfxx-target.h (elf_backend_rela_normal): Define.
8231 (elfNN_bed): Init rela_normal.
8232 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8233 for section symbols here if rela_normal. Simplify abs section test.
8234 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8235 return immediately. Remove code handling relocatable linking.
8236 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8237 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8238 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8239 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8240 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8241 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8242 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8243 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8244 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8245 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8246 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8247 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8248 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8249 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8250 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8251 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8252 * elf-m10200.c (elf_backend_rela_normal): Define.
8253 * elf-m10300.c (elf_backend_rela_normal): Define.
8254 * elf32-fr30.c (elf_backend_rela_normal): Define.
8255 * elf32-i370.c (elf_backend_rela_normal): Define.
8256 * elf32-i860.c (elf_backend_rela_normal): Define.
8257 * elf32-m68k.c (elf_backend_rela_normal): Define.
8258 * elf32-mcore.c (elf_backend_rela_normal): Define.
8259 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8260 * elf32-ppc.c (elf_backend_rela_normal): Define.
8261 * elf32-s390.c (elf_backend_rela_normal): Define.
8262 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8263 * elf64-ppc.c (elf_backend_rela_normal): Define.
8264 * elf64-s390.c (elf_backend_rela_normal): Define.
8265 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8266 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8267 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8268 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8269
8270 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8271
8272 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8273 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8274
8275 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8276
8277 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8278 when not relocatable. Fix reloc_emitter call for K&R.
8279
8280 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8281
8282 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8283 reloading local sym addend mistakenly removed in 2002-05-01 change.
8284
8285 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8286 (read_abbrevs): Change "offset" param to bfd_vma.
8287 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8288 Change "abbrev_offset" to bfd_vma.
8289 (read_indirect_string): Use correct conversion chars in error
8290 message format string, cast bfd_vma's to unsigned long.
8291 (read_abbrevs): Likewise.
8292 (read_attribute_value): Likewise.
8293 (decode_line_info): Likewise.
8294 (scan_unit_for_functions): Likewise.
8295 (parse_comp_unit): Likewise.
8296
8297 2002-05-04 Tom Rix <trix@redhat.com>
8298
8299 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8300 (coff_swap_reloc_out): Same.
8301 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8302 (xcoff_swap_reloc_out): Same.
8303 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8304 case some 16 bit relocs. Add reloc value to output.
8305 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8306 R_RBR. Improve names.
8307 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8308 (bfd_xcoff_backend_data): Update with new reloc swap names.
8309 (bfd_pmac_xcoff_backend_data) : Same.
8310 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8311 (xcoff64_swap_reloc_out): Same.
8312 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8313 R_POS. Add reloc value to output.
8314 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8315 bit R_RBR. Improve names, masks.
8316 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8317 (bfd_xcoff_backend_data): Update with new reloc swap names.
8318 (bfd_xcoff_aix5_backend_data) : Same.
8319
8320 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8321
8322 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8323 bfd_count top_index, input_list, all_local_syms.
8324 (elf32_hppa_setup_section_lists): New function, split from
8325 elf32_hppa_size_stubs.
8326 (elf32_hppa_next_input_section): Likewise.
8327 (group_sections): Likewise.
8328 (get_local_syms): Likewise.
8329 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8330 stubs on undefined syms too.
8331 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8332 Only access htab elf fields when we have an elf hash table.
8333 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8334 (elf32_hppa_next_input_section): Declare.
8335
8336 2002-05-04 Bob Byrnes <byrnes@curl.com>
8337
8338 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8339 _bfd_new_bfd.
8340
8341 2002-05-03 H.J. Lu (hjl@gnu.org)
8342
8343 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8344 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8345 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8346 to hide a global symbol.
8347 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8348 forced_local to true.
8349
8350 2002-05-02 Richard Henderson <rth@redhat.com>
8351
8352 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8353 vs SHN_UNDEF to zero.
8354
8355 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8356
8357 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8358 16 bit reloc.
8359 <R_PPC64_SECTOFF_DS>: Likewise.
8360 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8361 SECTOFF reloc.
8362 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8363 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8364 SECTOFF reloc.
8365
8366 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8367 (ppc64_elf_ha_reloc): New function.
8368 (ppc64_elf_brtaken_reloc): New function.
8369 (ppc64_elf_sectoff_reloc): New function.
8370 (ppc64_elf_sectoff_ha_reloc): New function.
8371 (ppc64_elf_toc_reloc): New function.
8372 (ppc64_elf_toc_ha_reloc): New function.
8373 (ppc64_elf_toc64_reloc): New function.
8374 (ppc64_elf_unhandled_reloc): New function.
8375 (ppc64_elf_howto_raw): Use the above.
8376 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8377 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8378 <R_PPC64_SECTOFF_DS>: Likewise.
8379 (IS_ABSOLUTE_RELOC): Update.
8380 (struct ppc_link_hash_table): Add have_undefweak.
8381 (ppc64_elf_link_hash_table_create): Init.
8382 (func_desc_adjust): Set have_undefweak.
8383 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8384 add the .sfpr blr when have_undefweak.
8385 (ppc64_elf_setup_section_lists): Check hash table flavour.
8386 (ppc64_elf_next_input_section): Move output_section->owner test to
8387 ppc64elf.em.
8388 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8389 and relocatable test. Return TOCstart and don't set elf_gp.
8390 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8391 offset calculation. Add assert on weak sym branch tweaks.
8392 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8393 (ppc64_elf_toc): Declare.
8394 (ppc64_elf_next_input_section): Update.
8395
8396 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8397
8398 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8399 file_name.
8400
8401 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8402
8403 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8404 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8405 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8406 call branches. Correct undefined weak destination.
8407 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8408 .sfpr, and correct case where either only savef* or restf* is
8409 needed.
8410
8411 Long branch stubs, multiple stub sections.
8412 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8413 (ppc64_elf_next_input_section): Declare.
8414 * elf64-ppc.c: Move linker-only prototypes.
8415 (STUB_SUFFIX): Define.
8416 (enum ppc_stub_type): New.
8417 (struct ppc_stub_hash_entry): New.
8418 (struct ppc_branch_hash_entry): New.
8419 (struct ppc_link_hash_entry): Add stub_cache, oh.
8420 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8421 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8422 Rename plt_overflow to stub_error.
8423 (ppc_stub_hash_lookup): Define.
8424 (ppc_branch_hash_lookup): Define.
8425 (stub_hash_newfunc): New function.
8426 (branch_hash_newfunc): New function.
8427 (link_hash_newfunc): Init new fields.
8428 (ppc64_elf_link_hash_table_create): Likewise.
8429 (ppc64_elf_link_hash_table_free): New function.
8430 (ppc_stub_name): New function.
8431 (ppc_get_stub_entry): New function.
8432 (ppc_add_stub): New function.
8433 (create_linkage_sections): Use bfd_make_section_anyway. Create
8434 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8435 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8436 and set up for plt call stubs. Link func and func desc syms.
8437 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8438 (func_desc_adjust): Avoid hash lookup when func desc sym available
8439 via shortcut, and set links when processing.
8440 (ppc64_elf_hide_symbol): Likewise.
8441 (allocate_dynrelocs): Don't allocate stub section here.
8442 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8443 Remove sstub code.
8444 (ppc_type_of_stub): New function.
8445 (build_one_stub): Delete.
8446 (ppc_build_one_stub): New function.
8447 (ppc_size_one_stub): New function.
8448 (ppc64_elf_setup_section_lists): New function.
8449 (ppc64_elf_next_input_section): New function.
8450 (group_sections): New function.
8451 (get_local_syms): New function.
8452 (ppc64_elf_size_stubs): Rewrite.
8453 (ppc64_elf_build_stubs): Rewrite.
8454 (ppc64_elf_relocate_section): Look up stub entry for REL24
8455 relocs. Don't propagate REL14* to dynamic objects. Look for long
8456 branch stubs if REL14* or REL24 relocs won't reach.
8457 (bfd_elf64_bfd_link_hash_table_free): Define.
8458
8459 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8460
8461 * config.bfd: Add support for powerpc-*-windiss.
8462
8463 2002-04-30 Tom Rix <trix@redhat.com>
8464
8465 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8466 symbol names into the hash table.
8467
8468 2002-04-28 Tom Rix <trix@redhat.com>
8469
8470 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8471 calulating relocations.
8472 (xcoff_complain_overflow) : Function table for relocation errors.
8473 (xcoff_ppc_relocate_section): Use relocation and complain function
8474 tables.
8475 (xcoff_complain_overflow_unsigned_func): New complain function.
8476 (xcoff_complain_overflow_signed_func): Same.
8477 (xcoff_complain_overflow_bitfield_func): Same.
8478 (xcoff_complain_overflow_dont_func): Same.
8479 (xcoff_reloc_type_crel): New recot function.
8480 (xcoff_reloc_type_br): Same.
8481 (xcoff_reloc_type_ba): Same.
8482 (xcoff_reloc_type_toc): Same.
8483 (xcoff_reloc_type_rel): Same.
8484 (xcoff_reloc_type_neg): Same.
8485 (xcoff_reloc_type_pos): Same.
8486 (xcoff_reloc_type_fail): Same.
8487 (xcoff_reloc_type_noop): Same.
8488 * libxcoff.h : Declare common parts for xcoff64.
8489 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
8490 and complain function tables.
8491
8492 2002-04-28 Alan Modra <amodra@bigpond.net.au>
8493
8494 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8495 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8496
8497 2002-04-26 Alan Modra <amodra@bigpond.net.au>
8498
8499 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8500 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8501
8502 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8503 same as the output before calling elf_link_input_bfd.
8504
8505 * coffcode.h (coff_compute_section_file_positions): Set
8506 section_tail after shuffling section list.
8507
8508 2002-04-24 Christian Groessler <chris@groessler.org>
8509
8510 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8511 addresses are 23bit with a special layout, not plain 32bit
8512 values. Prevent relocation of immediate values.
8513
8514 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8515
8516 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8517 MIPS-16 ASE flags are set, print something to indicate that.
8518
8519 2002-04-23 Alan Modra <amodra@bigpond.net.au>
8520
8521 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8522 under which a plt call stub is used.
8523 (final_link_relocate): Similarly.
8524 (allocate_plt_static): Clear h-plabel except when plt entry is
8525 exclusively used for a plabel.
8526 (allocate_dynrelocs): Use the above to simplify plt sizing.
8527 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8528 (elf32_hppa_link_hash_table_create): Init.
8529 (BL22_RP): Define.
8530 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8531 (elf32_hppa_check_relocs): Set has_22bit_branch.
8532
8533 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8534 (final_link_relocate): Likewise.
8535
8536 2002-04-22 Jakub Jelinek <jakub@redhat.com>
8537
8538 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8539 search table if some FDE is DW_EH_PE_aligned encoded either.
8540 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8541
8542 2002-04-22 Richard Smith <richard@ex-parrot.com>
8543 Jakub Jelinek <jakub@redhat.com>
8544
8545 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8546 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8547 encoded personality.
8548 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8549 for CIE/FDE removal.
8550
8551 2002-04-20 Tom Rix <trix@redhat.com>
8552
8553 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8554
8555 2002-04-20 Alan Modra <amodra@bigpond.net.au>
8556
8557 * archures.c (bfd_lookup_arch): Move the list order comment..
8558 (struct bfd_arch_info): ..to where it belongs.
8559 * bfd-in2.h: Regenerate.
8560
8561 * archures.c (bfd_lookup_arch): Add comment on list order.
8562 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8563 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8564 is always at head of list.
8565
8566 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8567
8568 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8569 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8570 definition of these functions for ARM_WINCE builds as they are
8571 not used.
8572 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
8573 for ARM_WINCE builds.
8574
8575 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8576
8577 * coff-arm.c (bfd_arm_process_before_allocation):
8578
8579 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
8580
8581 * cpu-sh.c (scan_mach): Delete.
8582 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8583 (bfd_sh_arch): Likewise.
8584
8585 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8586
8587 * ihex.c (ihex_write_object_contents): Fix check for records
8588 crossing 64K boundaries.
8589
8590 2002-04-16 Alan Modra <amodra@bigpond.net.au>
8591
8592 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8593 type rather than just assuming entries are ELF.
8594 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8595 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8596 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8597 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8598 rather than elf_link_hash_entry.
8599
8600 2002-04-15 Richard Henderson <rth@redhat.com>
8601
8602 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8603 n32 binaries.
8604
8605 2002-04-15 Michael Snyder <msnyder@redhat.com>
8606
8607 * opncls.c (bfd_close): Write contents if writeable.
8608 Minor formatting tidy-ups.
8609
8610 2002-04-15 Alan Modra <amodra@bigpond.net.au>
8611
8612 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8613
8614 2002-04-12 Michael Snyder <msnyder@redhat.com>
8615
8616 * bfd-in.h (bfd_get_section_lma): New access macro.
8617 Minor white-space fix-up.
8618
8619 2002-04-12 Alan Modra <amodra@bigpond.net.au>
8620
8621 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8622 header pad.
8623
8624 2002-04-09 DJ Delorie <dj@redhat.com>
8625
8626 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8627
8628 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8629
8630 * coffcode.h (coff_read_word): New.
8631 (coff_compute_checksum): New.
8632 (coff_apply_checksum): New.
8633 (coff_write_object_contents): Call coff_apply_checksum () to
8634 apply checksum to PE image.
8635
8636 2002-04-08 Randolph Chung <tausq@debian.org>
8637
8638 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8639 (elf32_hppa_final_link): Split out sorting logic to..
8640 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8641 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8642
8643 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8644
8645 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8646 pattern.
8647 * configure: Re-generate.
8648
8649 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8650
8651 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8652 is greater or equal to 4.3.3.
8653 * configure: Regenerate.
8654 Fix PR gdb/344.
8655
8656 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
8657
8658 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8659 R_CRIS_32_PCREL>: Fix typo in name.
8660 (cris_elf_check_relocs): Always create .rela.got here when
8661 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8662 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8663 assume it's created.
8664
8665 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
8666
8667 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8668 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8669 define.
8670 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8671 * bfd.c (bfd_link_hash_table_free): Define.
8672 * binary.c (binary_bfd_link_hash_table_free): Define.
8673 * bout.c (b_out_bfd_link_hash_table_free): Define.
8674 * coff-rs6000.c (rs6000coff_vec): Include
8675 _bfd_generic_link_hash_table_free.
8676 (pmac_xcoff_vec): Likewise.
8677 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8678 (aix5coff64_vec): Likewise.
8679 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8680 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8681 (bfd_elf32_bfd_link_hash_table_free): Define.
8682 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8683 (bfd_elf32_bfd_link_hash_table_free): Define.
8684 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8685 define.
8686 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8687 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8688 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8689 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8690 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8691 (_bfd_generic_link_hash_table_free): Add prototype.
8692 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8693 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8694 * linker.c (_bfd_generic_link_hash_table_free): New function.
8695 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8696 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8697 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8698 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8699 * som.c (som_bfd_link_hash_table_free): Define.
8700 * srec.c (srec_bfd_link_hash_table_free): Define.
8701 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8702 * versados.c (versados_bfd_link_hash_table_free): Define.
8703 * vms.c (vms_bfd_link_hash_table_free): New function.
8704 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8705
8706 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8707 instead of bfd_alloc.
8708 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8709 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8710 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8711 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8712 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8713 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8714 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8715 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8716 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8717 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8718 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8719 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8720 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8721 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8722 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8723 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8724 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8725 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8726 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8727 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8728 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8729 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8730 * m68klinux.c (linux_link_hash_table_create): Likewise.
8731 * sparclinux.c (linux_link_hash_table_create): Likewise.
8732 * sunos.c (sunos_link_hash_table_create): Likewise.
8733 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8734
8735 * targets.c: Add _bfd_link_hash_table_free to xvec.
8736
8737 * bfd-in2.h: Regenerate.
8738 * libbfd.h: Regenerate.
8739 * libcoff.h: Regenerate.
8740
8741 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8742
8743 * dep-in.sed: Cope with absolute paths.
8744 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8745 Run "make dep-am".
8746 * Makefile.in: Regenerate.
8747 * coff-arm.c: Fix copyright date.
8748 * cpu-h8300.c: Likewise.
8749 * cpu-i370.c: Likewise.
8750 * cpu-s390.c: Likewise.
8751 * cpu-mips.c: Likewise.
8752 * po/SRC-POTFILES.in: Regenerate.
8753
8754 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8755
8756 * Makefile.am: Add elfxx-mips.c to the known backends.
8757 (elf32-mips.lo): remove dependency to coff/external.h.
8758 * Makefile.in: Regenerate.
8759 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8760 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8761 accordingly.
8762 * configure: Regenerate.
8763 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8764 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8765 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8766 MIPS specific backend functions.
8767 * elf32-mips.c: Moved most code to elfxx-mips.c.
8768 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8769 static.
8770 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8771 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8772 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8773 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8774 interface to allow selection of the right REL or RELA howto table.
8775 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8776 static. Let it refuse n32 objects.
8777 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8778 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8779 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8780 (elf32_mips_ignore_discarded_relocs): Rename from
8781 _bfd_elf32_mips_ignore_discarded_relocs.
8782 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8783 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8784 (elf_mips_howto_table_rela): Remove.
8785 * elf64-mips.c: Moved most code to elfxx-mips.c.
8786 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8787 (mips_elf64_rtype_to_howto): New function.
8788 (mips_elf64_object_p): Likewise.
8789 (elf64_mips_irix_compat): Likewise.
8790 * elfxx-mips.c: New file containing common code merged together from
8791 elf32-mips.c and elf64-mips.c.
8792 * elfxx-mips.h: New file containing MIPS specific prototypes from
8793 elf-bfd.h.
8794 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8795 elf_backend_mips_rtype_to_howto.
8796
8797 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8798
8799 * srec.c (MAXCHUNK, Chunk): Revise comments.
8800 (srec_write_record): Correct buffer size.
8801 (srec_write_header): Do without intermediate buffer.
8802 (srec_write_section): Validate Chunk.
8803 (srec_write_terminator): Pass NULL instead of dummy buffer.
8804 (srec_write_symbols): Pass file and symbol names directly to
8805 bfd_bwrite so sprintf won't overflow buffer.
8806
8807 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8808
8809 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8810 PC relative relocs against hidden symbols.
8811 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8812
8813 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8814
8815 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8816 LMAs, loop over segments until p_vaddr and p_memsz specify an
8817 extent enclosing the section.
8818
8819 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8820
8821 * ihex.c (ihex_write_object_contents): Do not allow records to
8822 cross a 64K boundary - wrap if necessary.
8823
8824 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8825
8826 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8827 which caused the returned LWP ID to always be 0.
8828
8829 2002-04-01 Richard Henderson <rth@redhat.com>
8830
8831 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8832 (elf32_sparc_relocate_section): Use it to figure out when to
8833 initialize .got entries.
8834 * elf64-sparc.c: Similarly.
8835
8836 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8837
8838 * linker.c (link_action): Ignore duplicate warning syms.
8839 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8840 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8841 (elf_adjust_dynamic_symbol): Likewise.
8842 (elf_export_symbol): Likewise.
8843 (elf_link_find_version_dependencies): Likewise.
8844 (elf_link_assign_sym_version): Likewise.
8845 (elf_link_sec_merge_syms): Likewise.
8846 (elf_link_output_extsym): Likewise.
8847 (elf_gc_sweep_symbol): Likewise.
8848 (elf_gc_propagate_vtable_entries_used): Likewise.
8849 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8850 (elf_gc_allocate_got_offsets): Likewise.
8851 (elf_collect_hash_codes): Likewise.
8852 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8853 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8854 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8855 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8856 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8857 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8858 (elf_cris_discard_excess_dso_dynamics): Likewise.
8859 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8860 (mark_PIC_calls): Likewise.
8861 (allocate_plt_static): Likewise.
8862 (allocate_dynrelocs): Likewise.
8863 (readonly_dynrelocs): Likewise.
8864 * elf32-i386.c (allocate_dynrelocs): Likewise.
8865 (readonly_dynrelocs): Likewise.
8866 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8867 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8868 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8869 (mips_elf_sort_hash_table_f): Likewise.
8870 (mips_elf_check_mips16_stubs): Likewise.
8871 * elf32-s390.c (allocate_dynrelocs): Likewise.
8872 (readonly_dynrelocs): Likewise.
8873 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8874 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8875 (xstormy16_relax_plt_realloc): Likewise.
8876 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8877 (elf64_alpha_output_extsym): Likewise.
8878 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8879 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8880 (mips_elf64_check_mips16_stubs): Likewise.
8881 (mips_elf64_output_extsym): Likewise.
8882 * elf64-ppc.c (func_desc_adjust): Likewise.
8883 (allocate_dynrelocs): Likewise.
8884 (readonly_dynrelocs): Likewise.
8885 * elf64-s390.c (allocate_dynrelocs): Likewise.
8886 (readonly_dynrelocs): Likewise.
8887 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8888 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8889 (readonly_dynrelocs): Likewise.
8890 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8891 * aoutx.h (aout_link_write_other_symbol): Likewise.
8892 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8893 (_bfd_coff_write_global_sym): Likewise.
8894 * i386linux.c (linux_tally_symbols): Likewise.
8895 * m68klinux.c (linux_tally_symbols): Likewise.
8896 * sparclinux.c (linux_tally_symbols): Likewise.
8897 * pdp11.c (aout_link_write_other_symbol): Likewise.
8898 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8899 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8900 (xcoff_write_global_symbol): Likewise.
8901
8902 * cofflink.c (_bfd_coff_final_link): Formatting.
8903 * cpu-mips.c (mips_compatible): Make static, prototype.
8904 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8905 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8906 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8907 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8908 (mips_elf64_final_link): Likewise.
8909 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8910 prototype.
8911
8912 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8913
8914 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8915 (SWAP_OUT_RELOC_OFFSET): Define.
8916
8917 2002-03-27 Gregory Steuck <greg@nest.cx>
8918
8919 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8920 terminating NULL if empty symbol table.
8921 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8922
8923 2002-03-26 H.J. Lu (hjl@gnu.org)
8924
8925 * elflink.h (elf_link_input_bfd): Revert the last change since
8926 the gcc exception handling isn't fixed yet.
8927
8928 2002-03-26 H.J. Lu (hjl@gnu.org)
8929
8930 * elflink.h (elf_link_input_bfd): Complain about relocations
8931 against local symbols in discarded sections.
8932
8933 2002-03-26 Alan Modra <amodra@bigpond.net.au>
8934
8935 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8936
8937 2002-03-23 Alan Modra <amodra@bigpond.net.au>
8938
8939 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8940 section file offset for !SEC_LOAD sections.
8941
8942 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
8943
8944 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8945 <case R_ARM_GOT>): Handle relocations to Thumb functions.
8946
8947 2002-03-21 Alan Modra <amodra@bigpond.net.au>
8948
8949 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8950 Whitespace changes.
8951 * archive.c: Update copyright date.
8952 * bfd-in2.h: Regenerate.
8953 * libbfd.h: Regenerate.
8954 * Makefile.am: Run "make dep-am"
8955 * Makefile.in: Regenerate.
8956 * po/SRC-POTFILES.in: Regenerate.
8957
8958 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
8959
8960 * dwarf2.c (struct funcinfo): Move up.
8961 (lookup_address_in_function_table): New argument function_ptr.
8962 Set it.
8963 (lookup_address_in_line_table): New argument function. If function
8964 is non-NULL, use it to handle ``addr'' before the first line note of
8965 the function.
8966 (comp_unit_find_nearest_line): Update and swap calls to
8967 lookup_address_in_function_table and lookup_address_in_line_table.
8968 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8969 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8970
8971 2002-03-20 Tom Rix <trix@redhat.com>
8972
8973 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
8974 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
8975 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
8976
8977 2002-03-19 Tom Rix <trix@redhat.com>
8978
8979 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
8980 dynamic objects in archives.
8981
8982 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8983
8984 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8985 STT_NOTYPE symbols to STT_OBJECT.
8986
8987 2002-03-18 Jan Hubicka <jh@suse.cz>
8988
8989 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8990
8991 2002-03-18 Tom Rix <trix@redhat.com>
8992
8993 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8994 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8995 * coff-rs6000 (do_pad) : New function for archive padding.
8996 (do_copy) : New function for object file copying in archives.
8997 (do_shared_object_padding) : New function for padding shared
8998 objects to their text section alignment in archives.
8999 (bfd_xcoff_ar_achive_set_magic) : Stub.
9000 (xcoff_write_armap_big) : Use do_copy and do_pad.
9001 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9002 do_copy and do_pad.
9003 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9004 bfd_xcoff_magic_number.
9005 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9006 fop.
9007 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9008 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9009 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9010 * rs6000-core.c : Update copyright date.
9011 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9012 csectpp.
9013 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9014 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9015 (coff_set_flags) : Use bfd_xcoff_magic_number.
9016 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9017 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9018 * Makefile.am : Same.
9019 * config.bfd : Same.
9020 * targets.c : Same.
9021 * configure : Regnerate.
9022 * Makefile.in : Same.
9023 * bfd-in2.h : Same.
9024
9025 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9026
9027 * po/fr.po: Updated version.
9028
9029 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9030
9031 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9032 * libbfd.h: Regenerate.
9033 * archive.c (coff_write_armap): Pass on failures from
9034 bfd_write_bigendian_4byte_int.
9035
9036 2002-03-14 H.J. Lu <hjl@gnu.org>
9037
9038 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9039 error to bfd_error_nonrepresentable_section for reinit_array
9040 section in DSO.
9041
9042 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9043
9044 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9045 OR it in rather than replacing previously selected flags.
9046
9047 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9048 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9049
9050 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9051
9052 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9053 (N): Use the above.
9054 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9055 ensure reloc size matches before calling elf_link_input_bfd.
9056 Add an assert to check reloc size when counting output relocs.
9057
9058 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9059
9060 * mmo.c (mmo_get_loc): Return NULL rather than false.
9061
9062 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9063
9064 * po/fr.po: Updated version.
9065
9066 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9067
9068 * archures.c (bfd_default_compatible): Test bits_per_word.
9069 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9070 bfd_default_compatible.
9071 * cpu-i370.c (i370_compatible): Likewise.
9072 * cpu-sparc.c (sparc_compatible): Likewise.
9073 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9074
9075 * elflink.h: Formatting fixes.
9076 (elf_link_output_extsym): Merge undefined and undef weak cases.
9077
9078 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9079 when word size of input matches output word size.
9080
9081 2002-03-12 Andreas Jaeger <aj@suse.de>
9082
9083 * cpu-i386.c (i386_compatible): New. Use it instead of
9084 bfd_default_compatible.
9085
9086 2002-03-07 H.J. Lu (hjl@gnu.org)
9087
9088 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9089 as the type for bfd_reloc_val.
9090
9091 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9092
9093 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9094 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9095 (elf_hppa_final_link_relocate): Correct relocations for indirect
9096 references to local data through the DLT. Fix .opd creation for
9097 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9098 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9099 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9100 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9101 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9102 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9103 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9104
9105 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9106
9107 * merge.c (_bfd_merge_sections): Don't segfault if there
9108 is nothing to merge due to GC.
9109
9110 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9111
9112 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9113 symbols that have been forced local.
9114
9115 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9116 to output forced local syms for non-shared link.
9117 (elf_link_output_extsym): Tweak condition for calling backend
9118 adjust_dynamic_symbol so that previous behaviour is kept.
9119 Whitespace changes throughout file.
9120
9121 2002-03-04 H.J. Lu <hjl@gnu.org>
9122
9123 * elf.c (bfd_section_from_shdr): Handle special sections,
9124 .init_array, .fini_array and .preinit_array.
9125 (elf_fake_sections): Likewise.
9126
9127 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9128 DT entry only if the section is in output for .init_array,
9129 .fini_array and .preinit_array. Complain about .preinit_array
9130 section in DSO.
9131 (elf_bfd_final_link): Warn zero size for .init_array,
9132 .fini_array and .preinit_array sections.
9133
9134 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9135 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9136 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9137 .preinit_array.
9138
9139 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9140
9141 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9142 * configure: Regenerate.
9143
9144 2002-03-02 Tom Rix <trix@redhat.com>
9145
9146 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9147 symbolic equiv.
9148 * coff-rs6000.c (xcoff_howto_table): Same.
9149
9150 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9151
9152 * elflink.h (size_dynamic_sections): If section named
9153 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9154 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9155 ".init_array" and ".fini_array".
9156 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9157 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9158 DT_FINI_ARRAY.
9159
9160 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9161
9162 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9163 dynsyms.
9164
9165 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9166
9167 * elf64-hppa.h: Update copyright date.
9168
9169 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9170 (ppc64_elf_relocate_section): Don't generate power4 style branch
9171 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9172
9173 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9174
9175 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9176 last patch.
9177 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9178
9179 2002-02-21 Andreas Jaeger <aj@suse.de>
9180
9181 * elf64-x86-64.c: Major rework that introduces all recent changes
9182 to the x86-64 backend. Get a closer match to elf32-i386.
9183 (struct elf64_x86_64_dyn_relocs): Rename from
9184 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9185 all users.
9186 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9187 sections.
9188 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9189 remove casts, initialize new hash members.
9190 (create_got_section): New.
9191 (elf64_x86_64_create_dynamic_sections): New.
9192 (elf64_x86_64_copy_indirect_symbol): New.
9193 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9194 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9195 Reference count possible .plt and .got entries. Don't test input
9196 section SEC_READONLY here to try to avoid copy relocs, and keep
9197 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9198 DF_TEXTREL here. Delay setting of variables until needed. Cache
9199 pointer to "sreloc" section in elf_section_data. Tweak condition
9200 under which .got created. Report files with bad relocation
9201 section names.
9202 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9203 Reference count possible .plt entries. Don't deallocate .got and
9204 .relgot space here.
9205 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9206 do copy reloc processing for weakdefs. Remove redundant casts and
9207 aborts. Delay setting of vars until needed. Move creation of
9208 dynamic symbols and allocation of .plt and .rela.plt to
9209 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9210 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9211 (allocate_dynrelocs): New.
9212 (readonly_dynrelocs): New.
9213 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9214 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9215 Zero out the dynamic allocated content space.
9216 (elf64_x86_64_discard_copies): Removed.
9217 (elf64_x86_64_relocate_section): Make use of dynamic section
9218 short-cuts. Localise vars, and delay setting. Better error
9219 reporting, replace BFD_ASSERT with abort. Check
9220 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9221 regular object file and tread the weak definition as the normal
9222 one. Don't discard relocs for undefweak or undefined symbols and
9223 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9224 relocs.
9225 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9226 symbols that have been forced local. Use same test to decide if
9227 we can use a relative reloc for got as relocate_section. Expand
9228 SHN_UNDEF comment. Move expressions out of function calls.
9229 Replace BFD_ASSERT with abort.
9230 (bfd_elf64_bfd_final_link): Removed.
9231 (elf_backend_copy_indirect_symbol): Define.
9232
9233 2002-02-20 Tom Rix <trix@redhat.com>
9234
9235 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9236 (_bfd_xcoff_reloc_type_lookup): Use it.
9237 * coff64-rs6000.c (xcoff64_howto_table): Same.
9238 (xcoff64_reloc_type_lookup): Same.
9239
9240 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9241
9242 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9243 little endian.
9244
9245 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9246
9247 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9248 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9249 * bfd-in2.h: Regenerate.
9250 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9251 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9252 with "s390:64-bit".
9253 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9254 (elf_s390_reloc_type_lookup): Likewise.
9255 (elf_s390_check_relocs): Likewise.
9256 (elf_s390_gc_sweep_hook): Likewise.
9257 (elf_s390_relocate_section): Likewise.
9258 (elf_s390_object_p): Use renamed architecture define.
9259 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9260
9261 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9262
9263 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9264
9265 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9266
9267 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9268 absptr -> pcrel optimization for shared libs.
9269 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9270 library cannot be converted to pcrel.
9271 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9272 relative.
9273 * elf32-i386.c (elf_i386_relocate_section): If
9274 _bfd_elf_section_offset returned -2, skip, but make sure the
9275 relocation is installed.
9276 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9277 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9278 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9279 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9280 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9281 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9282 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9283 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9284 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9285 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9286 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9287 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9288 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9289 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9290 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9291 _bfd_elf_section_offset returning -2 the same way as -1.
9292 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9293 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9294 and BFD_ASSERT.
9295 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9296
9297 2002-02-18 Tom Rix <trix@redhat.com>
9298
9299 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9300 (bfd_xcoff_size_dynamic_sections): Same.
9301 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9302 (bfd_xcoff_size_dynamic_sections): Same.
9303 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9304 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9305 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9306 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9307 * bfd-in2.h: Regenerate.
9308
9309 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9310
9311 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9312 (struct ppc_link_hash_table): Add sfpr.
9313 (ppc64_elf_link_hash_table_create): Init it.
9314 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9315 .glink out to..
9316 (create_linkage_sections): ..here. Make .sfpr too.
9317 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9318 dynobj early.
9319 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9320 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9321 ._restf* functions, and create as needed.
9322 (func_desc_adjust): Only force_local for shared libs.
9323
9324 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9325
9326 * configure.in: Bump version number post 2.12 branching.
9327 * configure: Regenerate.
9328
9329 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9330
9331 * mmo.c: Correct and improve comments.
9332 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9333 zero-pad. Use input to fill up non-empty bfd buffer.
9334 (mmo_flush_chunk): New function.
9335 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9336 changed. Don't emit location specifier if VMA is same as
9337 *LAST_VMAP after omitting leading zero contents. Call
9338 mmo_flush_chunk before emitting location specifier.
9339 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9340 with mmo_write_loc_chunk calls.
9341 (mmo_internal_write_section): Call mmo_flush_chunk after
9342 mmo_write_chunk.
9343 (mmo_write_symbols_and_terminator): Move :Main to first position
9344 in symbol array. Add faked one if it does not exist if there are
9345 other symbols. Don't add it if there are no symbols at all. Move
9346 out test for value of :Main from symbol loop. Rename table
9347 fakemain to maintable and variable mainsym to fakemain.
9348
9349 2002-02-15 Richard Henderson <rth@redhat.com>
9350
9351 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9352 section with no got matches any got. Simplify error generaion.
9353
9354 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9355
9356 Support arbitrary length fill patterns.
9357 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9358 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9359 Call default_data_link_order.
9360 (default_fill_link_order): Delete.
9361 (default_data_link_order): New function.
9362 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9363 of bfd_fill_link_order with bfd_data_link_order.
9364 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9365 * elf64-mips.c (mips_elf64_final_link): Likewise.
9366
9367 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9368 Correct value returned in "end" for "0x<non-hex>".
9369
9370 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9371
9372 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9373 (scan): Test against 'mach' field in info structure.
9374
9375 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9376
9377 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9378
9379 2002-02-14 Matt Fredette <fredette@netbsd.org>
9380
9381 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9382 EF_M68000.
9383
9384 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9385
9386 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9387 non-zero physical addresses when adjusting the LMAs of new
9388 sections.
9389
9390 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9391
9392 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9393 from _bfd_elf_hppa_gen_reloc_type.
9394 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9395 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9396 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9397 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9398
9399 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9400
9401 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9402 loading its contents if there's nothing to do in it.
9403
9404 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9405
9406 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9407 64k boundary.
9408
9409 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9410 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9411 (ppc64_elf_finish_dynamic_sections): Set values for them.
9412
9413 2002-02-11 Michael Snyder <msnyder@redhat.com>
9414
9415 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9416 * elf.c (elfcore_grok_pstatus): Add prototype.
9417 (elfcore_grok_lwpstatus): Add prototype.
9418 (elfcore_write_lwpstatus): New function.
9419 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9420
9421 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9422
9423 * elf32-sh.c: Added missing prototypes.
9424 * elf32-sh64.c: Likewise.
9425 (sh_elf_align_loads): Mark unused args as such.
9426 * elf64-sh64.c: Added missing prototypes.
9427 (struct elf_sh64_link_hash_entry): Fix typo.
9428 (sh_elf64_relocate_section): Fix info argument passed to
9429 _bfd_elf_section_offset.
9430
9431 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9432
9433 * Makefile.am: "make dep-am".
9434 * Makefile.in: Regenerate.
9435 * aclocal.m4: Regenerate.
9436 * config.in: Regenerate.
9437 * configure: Regenerate.
9438
9439 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9440
9441 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9442 variable warnings.
9443 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9444 comparison warning.
9445 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9446 cast warnings for the common case.
9447
9448 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9449
9450 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9451 vectors.
9452 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9453 vectors.
9454
9455 2002-02-09 Richard Henderson <rth@redhat.com>
9456
9457 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9458 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9459 (elf64_alpha_relocate_section): Likewise.
9460 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9461 * bfd-in2.h, libbfd.h: Rebuild.
9462
9463 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9464
9465 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9466 that base-plus-offset reloc accounting is consistent.
9467 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9468 up to date for undefined symbols.
9469
9470 2002-02-08 Eric Christopher <echristo@redhat.com>
9471
9472 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9473
9474 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9475 sections for the O32 ABI.
9476
9477 2002-02-08 Chris Demetriou <cgd@broadcom.com>
9478
9479 * elf32-arm.h: Fix formatting of _("...").
9480 * elf32-d10v.c: Likewise.
9481 * elf32-m68k.c: Likewise.
9482 * elf32-mips.c: Likewise.
9483
9484 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
9485
9486 * coff-or32.c: Fix compile time warning messages.
9487
9488 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
9489
9490 Contribute sh64-elf.
9491 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9492 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9493 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9494 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9495 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9496 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9497 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9498 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9499 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9500 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9501 New relocs.
9502 * libbfd.h, bfd-in2.h: Rebuilt.
9503 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9504 (sh_reloc_map): Map them.
9505 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9506 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9507 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9508 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9509 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9510 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9511 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9512 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9513 datalabel_got_offset.
9514 (sh_elf_link_hash_newfunc): Initialize it.
9515 (sh_elf_relocate_section): Augment the scope of
9516 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
9517 GOT and GOTOFF handling to new SHmedia relocation types. Support
9518 GOT_BIAS.
9519 (sh_elf_check_relocs): Likewise.
9520 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9521 PLT entries using movi_shori_putval. Support GOT_BIAS.
9522 (sh_elf_finish_dynamic_sections): Likewise.
9523 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9524 relocation, it's now done by the caller.
9525 (GOT_BIAS): New.
9526 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9527 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9528 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9529 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9530 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9531 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9532 sh64_elf64_hash_table): New.
9533 (sh_elf64_howto_table): Introduce new relocs.
9534 (sh_elf64_info_to_howto): Accept new PIC relocs.
9535 (sh_elf64_relocate_section): Augment the scope of
9536 seen_stt_datalabel. Support new PIC relocs.
9537 (sh_elf64_check_relocs): Support new PIC relocs.
9538 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9539 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9540 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9541 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9542 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9543 movi_shori_putval, movi_3shori_putval,
9544 sh64_elf64_create_dynamic_sections,
9545 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9546 sh64_elf64_size_dynamic_sections,
9547 sh64_elf64_finish_dynamic_symbol,
9548 sh64_elf64_finish_dynamic_sections): New.
9549 (elf_backend_create_dynamic-sections,
9550 bfd_elf64_bfd_link_hash_table_create,
9551 elf_backend_adjust_dynamic_symbol,
9552 elf_backend_size_dynamic_sections,
9553 elf_backend_finish_dynamic_symbol,
9554 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9555 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9556 elf_backend_got_header_size, elf_backend_plt_header_size):
9557 Define.
9558 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9559 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9560 match official numbers and names; moved unmaching ones to the
9561 range 0xf2-0xff.
9562 * elf32-sh64.c, elf64-sh64.c: Likewise.
9563 2001-03-12 DJ Delorie <dj@redhat.com>
9564 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9565 sections.
9566 2001-03-12 DJ Delorie <dj@redhat.com>
9567 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9568 be aligned.
9569 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9570 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
9571 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9572 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9573 .cranges section with SEC_SORT_ENTRIES set.
9574 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9575 incoming sorted .cranges section.
9576 (sh64_bfd_elf_copy_private_section_data): New.
9577 (sh64_elf_final_write_processing): Only sort .cranges and modify
9578 start address if called by linker.
9579 2001-01-08 Ben Elliston <bje@redhat.com>
9580 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9581 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
9582 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9583 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9584 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9585 line. Add comments before all entries.
9586 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9587 comment.
9588 (sh_elf64_reloc): Correct head comment.
9589 (sh_elf64_relocate_section): Correct spacing.
9590 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9591 instead call reloc_dangerous callback.
9592 <case R_SH_SHMEDIA_CODE>: New case.
9593 (sh_elf64_gc_mark_hook): Correct spacing.
9594 (sh_elf64_check_relocs): Ditto.
9595 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9596 New case.
9597 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9598 functions.
9599 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9600 clarify describing comment. Add comments before all entries.
9601 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9602 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9603 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9604 Sort .cranges section in final link. Prepare to set bit 0 on
9605 entry address.
9606 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9607 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9608 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9609 .cranges section.
9610 (sh64_backend_section_from_shdr): New, to recognize
9611 SHT_SH5_CR_SORTED on incoming .cranges section.
9612 (elf_backend_section_from_shdr): Define.
9613 (sh64_elf_final_write_processing): Sort outgoing .cranges
9614 section. (New, temporarily disabled:) Set bit 0 on entry address
9615 according to ISA type.
9616 (sh64_find_section_for_address): New.
9617 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9618 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9619 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9620 bfd_malloc, not xmalloc.
9621 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9622 global.
9623 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9624 temporarily disabled) setting bit 0 on entry address.
9625 (elf_backend_final_write_processing): Define.
9626 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
9627 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9628 be a proper relocation for PTA and PTB rather than a marker.
9629 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9630 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9631 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9632 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9633 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9634 Zero src_mask.
9635 * elf64-sh64.c: Ditto.
9636 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9637 * elf32-sh64.c: Include opcodes/sh64-opc.h
9638 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9639 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9640 parameters. No unused parameters. Caller changed.
9641 <case R_SH_PT_16>: New case.
9642 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9643 * Makefile.in: Regenerate.
9644 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
9645 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9646 all code sections.
9647 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9648 (sh64_elf_merge_private_data): Ditto.
9649 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9650 to access stored section flags.
9651 (sh64_elf_final_write_processing): Return immediately unless
9652 called by linker. Use sh64_elf_section_data (cranges) to get size
9653 of linker-generated cranges entries.
9654 (sh64_elf_copy_private_data): Add missing "return true".
9655 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9656 (sh_elf64_merge_private_data): Ditto.
9657 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
9658 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9659 elf64-sh64.c:sh64_elf_fake_sections.
9660 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9661 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
9662 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9663 (sh64_elf_final_write_processing): New.
9664 (elf_backend_final_write_processing): Define.
9665 (sh64_elf_fake_sections): Get header flags from tdata field.
9666 (sh64_elf_copy_private_data): Do not call
9667 sh64_elf_copy_private_data_internal, just copy e_flags field.
9668 (sh64_elf_merge_private_data): Do not call
9669 sh64_elf_copy_private_data_internal.
9670 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
9671 Remove EF_SH64_ABI64, let ELF size make difference.
9672 Remove SH64-specific BFD section flag.
9673 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9674 containing SHmedia through elf_section_data (asect)->tdata
9675 non-zero, not using a BFD section flag.
9676 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9677 (sh64_elf_merge_private_data): Similar.
9678 (elf_backend_section_flags): Don't define.
9679 (sh64_elf_backend_section_flags): Delete.
9680 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9681 not EF_SH64_ABI64.
9682 (sh_elf64_merge_private_data): Similar.
9683 * section.c (Section flags definitions): Don't define
9684 SEC_SH_ISA_SHMEDIA.
9685 (bfd-in2.h): Regenerate.
9686 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
9687 Make DataLabel references work with partial linking.
9688 * elf32-sh64.c: Fix formatting.
9689 (sh64_elf_link_output_symbol_hook): New.
9690 (elf_backend_link_output_symbol_hook): Define to
9691 sh64_elf_link_output_symbol_hook.
9692 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9693 undefined if partial linking. Adjust sanity check.
9694 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9695 (elf_backend_link_output_symbol_hook): Define to
9696 sh64_elf64_link_output_symbol_hook.
9697 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9698 undefined if partial linking. Adjust sanity check.
9699 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
9700 Implement semantics for inter-file DataLabel references.
9701 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9702 (sh64_elf64_add_symbol_hook): New.
9703 (sh_elf64_relocate_section): If passing an indirect symbol with
9704 st_type STT_DATALABEL on the way to a symbol with st_other
9705 STO_SH5_ISA32, do not bitor 1 to the relocation.
9706 (elf_backend_add_symbol_hook): Define to
9707 sh64_elf64_add_symbol_hook.
9708 * elf64-sh32.c: Tweak comments.
9709 (DATALABEL_SUFFIX): Define.
9710 (sh64_elf_add_symbol_hook): New.
9711 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9712 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9713 symbol with st_type STT_DATALABEL on the way to a symbol with
9714 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9715 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
9716 Pass through STT_DATALABEL.
9717 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9718 (elf_backend_get_symbol_type): Define.
9719 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9720 (elf_backend_get_symbol_type): Define.
9721 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
9722 * elf32-sh64.c: Tweak comments.
9723 (sh64_elf_copy_private_data_internal): Add prototype.
9724 (bfd_elf32_bfd_set_private_flags): Define.
9725 (sh64_elf_copy_private_data_internal): Compare machine name, not
9726 textual BFD target name, to check whether to copy section flag
9727 SHF_SH5_ISA32.
9728 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9729 Tweak section-contents-type-mismatch message.
9730 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9731 Validize reloc-types.
9732 * elf64-sh64.c: New file.
9733 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9734 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9735 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9736 Regenerate dependencies.
9737 * Makefile.in: Regenerate.
9738 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9739 bfd_elf64_sh64l_vec.
9740 * configure.in: Handle bfd_elf64_sh64_vec and
9741 bfd_elf64_sh64l_vec.
9742 * configure: Regenerate.
9743 * po/POTFILES.in: Regenerate.
9744 * po/bfd.pot: Regenerate.
9745 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
9746 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9747 anything else but EF_SH64 and EF_SH64_ABI64.
9748 (sh64_elf_merge_private_data): Emit error for anything else but
9749 EF_SH64 and EF_SH64_ABI64.
9750 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9751 from targ_selvecs.
9752 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9753 bfd_elf32_sh64l_vec as a temporary measure.
9754 * configure: Regenerate.
9755 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
9756 * cpu-sh.c (arch_info_struct): Include sh5 item
9757 unconditionalized.
9758 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9759 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9760 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9761 * elf32-sh64.c: Tweak comments.
9762 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9763 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9764 (sh64_elf_copy_private_data_internal): Wrap long line.
9765 (sh64_elf_merge_private_data): Rewrite to allow objects from
9766 SH64 subsets to be linked together.
9767 (INCLUDE_SHMEDIA): Define.
9768 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9769 Parenthesize plus-expression inside or-expression.
9770 <global symbol>: Ditto.
9771 (sh_elf_set_mach_from_flags): Remove code refusing
9772 deleted EF_SH64_32BIT_ABI flag.
9773 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
9774 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9775 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9776 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9777 (sh_elf_relocate_section) <local symbol>: Or 1 in
9778 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9779 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9780 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9781 relocation.
9782 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
9783 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9784 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9785 Regenerate dependencies.
9786 * Makefile.in: Regenerate.
9787 * archures.c: Add bfd_mach_sh5.
9788 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9789 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9790 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9791 * configure: Regenerate.
9792 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9793 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9794 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9795 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9796 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9797 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9798 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9799 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9800 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9801 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9802 in item for SH5.
9803 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9804 for SHmedia relocs.
9805 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9806 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9807 shmedia_prepare_reloc, goto final_link_relocate if it returns
9808 non-zero, else fail as before.
9809 (sh_elf_set_mach_from_flags): Provide function only if not defined
9810 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9811 (sh_elf_set_private_flags): Provide function only if not defined
9812 as a macro.
9813 (sh_elf_copy_private_data): Similar.
9814 (sh_elf_merge_private_data): Similar.
9815 * section.c (SEC_SH_ISA_SHMEDIA): New.
9816 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9817 * elf32-sh64.c: New file.
9818 * libbfd.h: Regenerate.
9819 * bfd-in2.h: Regenerate.
9820 * po/POTFILES.in: Regenerate.
9821 * po/bfd.pot: Regenerate.
9822 * bfd-in2.h: Regenerate.
9823 * libbfd.h: Regenerate.
9824
9825 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9826
9827 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9828 been included, not drag it in.
9829 * bfd-in2.h: Regenerate.
9830
9831 2002-02-06 H.J. Lu (hjl@gnu.org)
9832
9833 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9834 the mach and ISA fields if necessary.
9835
9836 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9837
9838 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9839 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9840 be sure exactly which architecture this represents.
9841
9842 2002-02-05 Nick Clifton <nickc@redhat.com>
9843
9844 * po/tr.po: Updated translation.
9845
9846 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9847
9848 From Jimi X <jimix@watson.ibm.com>
9849 * archures (bfd_mach_ppc64): Define.
9850 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9851 (bfd_powerpc_arch): Define.
9852 * bfd-in2.h: Regenerate.
9853 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9854 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9855 (bfd_powerpc_archs): Add default powerpc64 arch.
9856
9857 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9858
9859 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9860 against section syms in readonly sections. Don't do the global
9861 sym check if we find one.
9862 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9863 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9864 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9865 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9866 (elf_s390_grok_prstatus): Add missing prototype.
9867
9868 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9869
9870 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9871 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9872 Call bfd_get_section_by_name only once. Initialize
9873 bpodata->n_bpo_relocs_this_section.
9874 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9875 referring to DSOs.
9876 (bpo_reloc_request_sort_fn): Don't use difference of values as
9877 return-value.
9878
9879 2002-02-02 David O'Brien <obrien@FreeBSD>
9880
9881 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9882 version 4.5 and later the same as 5-CURRENT.
9883 * configure: Re-generate.
9884
9885 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9886
9887 * config.bfd (hppa*-*-netbsd*): New target.
9888
9889 2002-01-31 Philipp Thomas <pthomas@suse.de>
9890
9891 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9892 to front of message. Unify messages with elf32-arm.h. Use
9893 commas where neccessary.
9894 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9895 ERROR in messages. Unify messages with coff-arm.c. Correct
9896 VFP/FPA error message.
9897 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9898 APCS-32 for translation.
9899
9900 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9901
9902 Perform on-demand global register allocation from
9903 R_MMIX_BASE_PLUS_OFFSET relocs.
9904 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9905 bpo_reloc_request, struct bpo_greg_section_info): New.
9906 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9907 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9908 _bfd_mmix_check_all_relocs,
9909 _bfd_mmix_prepare_linker_allocated_gregs,
9910 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9911 (elf_mmix_howto_table): Correct src_mask for most relocs.
9912 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9913 case.
9914 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9915 case. Fix typo in comment. New label do_mmix_reloc.
9916 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9917 store first object file with a base-plus-offset reloc. Call
9918 mmix_elf_check_common_relocs for the part common with mmo.
9919 (mmix_elf_final_link): Write out linker-allocated register
9920 contents section.
9921 (elf_backend_gc_sweep_hook): Define.
9922 (bfd_elf64_bfd_relax_section): Define.
9923
9924 * mmo.c: Don't include <ctype.h>
9925 (mmo_init): Correct init-once logic.
9926
9927 2002-02-01 Tom Rix <trix@redhat.com>
9928
9929 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9930
9931 2002-02-01 Alan Modra <amodra@bigpond.net.au>
9932
9933 * Makefile.am: Run "make dep-am"
9934 * Makefile.in: Regenerate.
9935
9936 2002-01-31 David O'Brien <obrien@FreeBSD>
9937
9938 * configure.in: Recognize the differences in core files from FreeBSD
9939 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9940 5-CURRENT.
9941 * configure: Regenerate.
9942
9943 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
9944
9945 * coff-or32.c: New file.
9946 * cpu-or32.c: New file.
9947 * elf32-or32.c: New file.
9948 * archures.c: Add support for or32.
9949 * targets.c: Add support for or32.
9950 * bfd-in2.h: Regenerate.
9951 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
9952 coff_write_object_contents): Add support for or32.
9953 * config.bfd: Add target.
9954 * configure.in: Add support for or32.
9955 * configure: Regenerate.
9956 * Makefile.am: Add support for or32.
9957 * Makefile.in: Regenerate.
9958 * po/SRC-POTFILES.in: Add or32 files.
9959 * po/bfd.pot: Regenerate.
9960
9961 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9962 Don Lindsay <lindsayd@cisco.com>
9963
9964 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9965 false' with a return of a bfd_reloc_ error code.
9966
9967 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
9968
9969 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9970 unexport unreferenced symbols when --export-dynamic. Call
9971 _bfd_elf_strtab_delref when unexporting.
9972
9973 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
9974
9975 * bfd-in.h: Include <stdbool.h> if it is available.
9976 * bfd-in2.h: Regenerated.
9977
9978 2002-01-31 Alan Modra <amodra@bigpond.net.au>
9979
9980 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9981 not go via the plt.
9982
9983 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9984
9985 * archures.c: Tidy up formatting of embedded comments.
9986 * bfd.c: Tidy up formatting of embedded comments.
9987 * bfd-in.h: Fix formatting of comments.
9988 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9989 * section.c: Tidy up formatting of embedded comments.
9990 * syms.c: Tidy up formatting of embedded comments.
9991 * targets.c: Tidy up formatting of embedded comments.
9992
9993 * bfd-in2.h: Regenerate.
9994
9995 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9996
9997 * vms-tir.c (cmd_name): New function.
9998 (tir_cmd_name): New function.
9999 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10000 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10001 Fix formatting.
10002
10003 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10004 translation.
10005 (pe_print_pdata): Rearrange message to aid in translation.
10006
10007 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10008 translation.
10009
10010 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10011
10012 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10013
10014 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10015 message to aid in translation.
10016
10017 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10018 to aid in translation.
10019
10020 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10021
10022 2002-01-30 Philipp Thomas <pthomas@suse.de>
10023
10024 * coff-arm.c, elf32-elf.h: Unify messages.
10025
10026 2002-01-30 Nick Clifton <nickc@redhat.com>
10027
10028 * po/sv.po: Updated translation.
10029
10030 2002-01-30 Philipp Thomas <pthomas@suse.de>
10031
10032 * dwarf2.c (read_abbrev): Use full section name in error message.
10033 (decode_line_info): Likewise.
10034
10035 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10036 message.
10037
10038 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10039
10040 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10041 descriptor symbols for undefined function code syms. Clear
10042 ELF_LINK_NON_ELF so that they can stay weak.
10043
10044 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10045 Mitch Lichtenberg <mpl@broadcom.com>
10046
10047 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10048 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10049 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10050 generation.
10051 * bfd-in2.h: Regenerate.
10052
10053 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10054
10055 * elf32-mips.c: Add additional comments about HI16 relocation
10056 processing.
10057 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10058 pc-relative relocations. (Reverts change made on 2001-10-31.)
10059 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10060 for pc-relative relocations.
10061 (mips_elf_calculate_relocation): Add a comment about a kludge
10062 in the R_MIPS_GNU_REL_HI16 handling.
10063 (_bfd_mips_elf_relocate_section): Implement that kludge;
10064 adjust pc-relative HI16 relocation for difference in HI16 and
10065 LO16 addresses, since it can't easily be done in
10066 mips_elf_calculate_relocation.
10067
10068 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10069
10070 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10071 relocations with PC32 relocations for undefined or weak symbols.
10072 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10073 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10074
10075 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10076
10077 * elfcore.h (elf_core_file_p): Improve comment for last change.
10078
10079 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10080
10081 * configure: Regenerated.
10082
10083 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10084
10085 * elfcore.h (elf_core_file_p): Set the machine architecture
10086 before processing the program headers.
10087
10088 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10089
10090 * configure.in <64-bit configuration>: If using gcc, check and
10091 emit error for egcs-1.1.2.
10092 * configure: Regenerate.
10093
10094 2002-01-26 Egor Duda <deo@logos-m.ru>
10095
10096 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10097 as possible to avoid stack corruption.
10098
10099 2002-01-26 Richard Henderson <rth@redhat.com>
10100
10101 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10102 for non-allocated sections.
10103
10104 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10105
10106 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10107 prstat.pr_reg even if it is a struct.
10108
10109 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10110
10111 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10112
10113 2002-01-25 Philipp Thomas <pthomas@suse.de>
10114
10115 * coffgen.c (coff_print_symbol): Don't mark info message
10116 for translation.
10117
10118 2002-01-25 Nick Clifton <nickc@redhat.com>
10119
10120 * po/fr.po: Updated translation.
10121 * po/es.po: Updated translation.
10122
10123 2002-01-25 Philipp Thomas <pthomas@suse.de>
10124
10125 * coff-alpha.c (alpha_relocate_section): Unify warning message
10126 for GP relative relocations without GP defined.
10127 * coff-mips.c (mips_relocate_section): Likewise.
10128
10129 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10130
10131 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10132 unsigned overflow when new_offset < old_offset.
10133
10134 2002-01-24 Philipp Thomas <pthomas@suse.de>
10135
10136 * bfd.c (_bfd_abort): Fix typo.
10137
10138 2002-01-23 Richard Henderson <rth@redhat.com>
10139
10140 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10141 plt entries for undefweak symbols.
10142
10143 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10144
10145 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10146 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10147 (bfd_elf32_h8300_vec): Ditto.
10148
10149 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10150
10151 * elf64-ppc.c: Remove stale part of ABI comment.
10152 (NO_OPD_RELOCS): Define.
10153 (ppc64_elf_check_relocs): Use it.
10154 (ppc64_elf_relocate_section): Here too.
10155 (build_one_stub): Don't point function syms at the stub. Instead,
10156 hijack plt.offset.
10157 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10158 really go to the stub. Make all dynamic relocs in opd against
10159 locals.
10160 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10161 plt.offset.
10162
10163 2002-01-22 Richard Henderson <rth@redhat.com>
10164
10165 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10166
10167 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10168
10169 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10170 TOC_BASE_OFF adjustment.
10171
10172 * Makefile.am: Run "make dep-am".
10173 * Makefile.in: Regenerate.
10174 * po/SRC-POTFILES.in: Regenerate.
10175
10176 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10177
10178 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10179 host defines.
10180
10181 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10182
10183 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10184 Check for and emit error if sgot is NULL at this point.
10185
10186 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10187
10188 * config.bfd (ia64*-*-netbsd*): New target.
10189
10190 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10191
10192 * som.c (som_write_space_strings): Comment typo fix.
10193
10194 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10195
10196 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10197 is_func_descriptor fields.
10198 (link_hash_newfunc): Init them.
10199 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10200 dot are candidates for plt entries. When processing .opd relocs,
10201 set function descriptor strings to point inside function code
10202 string, and set new ppc_link_hash_entry fields.
10203 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10204 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10205 function descriptors. It's now done in..
10206 (func_desc_adjust): New.
10207 (ppc64_elf_func_desc_adjust): New.
10208 (define elf_backend_always_size_sections): Define.
10209 (ppc64_elf_hide_symbol): New.
10210 (define elf_backend_hide_symbol): Define.
10211 (allocate_dynrelocs): Remove code looking up function descriptors
10212 as that has been done earlier.
10213 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10214 table.
10215 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10216 up function descriptor.
10217 (build_one_stub): Look up the function code sym. Check for
10218 invalid plt offsets.
10219 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10220 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10221
10222 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10223 boolean param.
10224 (_bfd_elf_link_hash_hide_symbol): Likewise.
10225 * elflink.h (elf_link_add_object_symbols): Adjust call to
10226 elf_backend_hide_symbol.
10227 (elf_fix_symbol_flags): Likewise.
10228 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10229 than bfd_alloc.
10230 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10231 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10232 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10233 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10234 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10235 and adjust to suit.
10236 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10237 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10238 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10239
10240 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10241
10242 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10243 dynamic function descriptor symbol, not the associated function
10244 symbol.
10245
10246 2002-01-17 Eric Christopher <echristo@redhat.com>
10247
10248 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10249
10250 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10251
10252 * po/bfd.pot: Regenerate.
10253 * po/fr.po: Regenerate.
10254
10255 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10256
10257 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10258 Remove "Elf_Internal_Shdr *" param.
10259 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10260 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10261 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10262 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10263 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10264 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10265 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10266 function to override special sections. Remove hdr arg from
10267 backend call, and don't loop.
10268
10269 2002-01-16 Eric Christopher <echristo@redhat.com>
10270
10271 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10272 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10273 relocations requiring gp0 and gp.
10274
10275 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10276
10277 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10278 EF_ARM_VFP_FLOAT.
10279 (elf32_arm_print_private_bfd_data): Likewise.
10280
10281 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10282
10283 * po/tr.po: Import new version.
10284
10285 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10286
10287 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10288 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10289 (ORI_R0_R0_0): Correct.
10290
10291 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10292
10293 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10294 when plt_not_loaded.
10295 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10296 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10297 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10298 (ppc64_elf_glink_code): Delete.
10299 (PPC64_ELF_GLINK_SIZE): Delete.
10300 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10301 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10302 ORI_R0_R0_0): Define.
10303 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10304 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10305 (ppc64_elf_link_hash_table_create): Init them.
10306 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10307 Don't copy to shared lib.
10308 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10309 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10310 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10311 room for .stub and .glink code.
10312 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10313 DT_PPC64_GLINK.
10314 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10315 bfd_elf64_bfd_final_link.
10316 (bfd_elf64_bfd_final_link): Don't define.
10317 (ppc64_elf_size_stubs): New.
10318 (build_plt_stub): New.
10319 (build_one_stub): New.
10320 (ppc64_elf_build_stubs): New.
10321 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10322 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10323 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10324 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10325 case output sections not separate. Adjust DT_RELASZ to not
10326 include plt relocs. Set reserved got entry. Set got and plt
10327 entry size.
10328 (elf_backend_got_header_size): Set to 8.
10329 * elf64-ppc.h: New file.
10330
10331 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10332
10333 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10334 sections, use bfd_section_list_remove.
10335 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10336 * elflink.h (elf_link_add_object_symbols): When removing all
10337 sections, use bfd_section_list_clear.
10338
10339 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10340
10341 * po/sv.po: New file: Swedish translation.
10342 * configure.in (ALL_LINGUAS): Add sv.
10343 * configure: Regenerate.
10344
10345 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10346
10347 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10348 * elf.c (merge_sections_remove_hook): New function.
10349 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10350 _bfd_merge_sections.
10351 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10352 * libbfd.h: Rebuilt.
10353 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10354 Call remove_hook if a SEC_EXCLUDE section is encountered.
10355
10356 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10357
10358 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10359 (xstormy16_reloc_map): Initialise new field with correct howto
10360 table.
10361 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10362 howto entry.
10363
10364 2002-01-10 Michael Snyder <msnyder@redhat.com>
10365
10366 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10367 (elfcore_write_pstatus): Use long instead of pid_t;
10368 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10369
10370 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10371
10372 * elf.c: Update copyright years.
10373 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10374 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10375
10376 2002-01-08 Michael Snyder <msnyder@redhat.com>
10377
10378 Add capability to write corefile note sections, for gdb.
10379 * elf.c (elfcore_write_note): New function.
10380 (elfcore_write_prpsinfo): New function.
10381 (elfcore_write_prstatus): New function.
10382 (elfcore_write_pstatus): New function.
10383 (elfcore_write_prfpreg): New function.
10384 (elfcore_write_prxfpreg): New function.
10385 * elf-bfd.h: Add prototypes for above functions.
10386
10387 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10388
10389 * elf.c (elf_fake_sections): Propagate errors from
10390 elf_backend_fake_section.
10391
10392 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10393
10394 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10395 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10396 (elf32-sh-nbsd.lo): New rule.
10397 * Makefile.in: Regenerate.
10398 * config.bfd (sh*le-*-netbsdelf*): New target.
10399 (sh*-*-netbsdelf*): New target.
10400 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10401 (bfd_elf32_shnbsd_vec): New vector.
10402 (bfd_elf32_shlnbsd_vec): New vector.
10403 * configure: Regenerate.
10404 * elf32-sh-nbsd.c: New file.
10405 * targets.c: Update copyright years.
10406 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10407 bfd_elf32_shnbsd_vec.
10408
10409 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10410
10411 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10412
10413 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10414
10415 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10416 of a symbol in a section that will be deleted.
10417
10418 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10419
10420 * po/es.po: New file: Spanish translation.
10421 * configure.in (ALL_LINGUAS): Add es.
10422 * configure: Regenerate.
10423
10424 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10425
10426 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10427 argument so we can handle HP-UX specially.
10428 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10429 (elfNN_hpux_backend_section_from_bfd_section): New for support
10430 of SHN_IA_64_ANSI_COMMON.
10431 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10432 (is_unwind_section_name): Add special HP-UX support.
10433 (elfNN_ia64_section_from_shdr): Add support for more sections.
10434 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10435 add support for more sections.
10436 (elfNN_ia64_additional_program_headers): Modify
10437 is_unwind_section_name call.
10438 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10439 only one unwind section in segment.
10440
10441 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10442
10443 * syms.c (_bfd_generic_make_empty_symbol): New function.
10444 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10445 _bfd_generic_make_empty_symbol.
10446 * libbfd.h: Regenerate.
10447 * bfd-in2.h: Regenerate.
10448 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10449 (hppabsd_core_get_symtab_upper_bound): Don't define.
10450 (hppabsd_core_get_symtab): Likewise.
10451 (hppabsd_core_print_symbol): Likewise.
10452 (hppabsd_core_get_symbol_info): Likewise.
10453 (hppabsd_core_bfd_is_local_label_name): Likewise.
10454 (hppabsd_core_get_lineno): Likewise.
10455 (hppabsd_core_find_nearest_line): Likewise.
10456 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10457 (hppabsd_core_read_minisymbols): Likewise.
10458 (hppabsd_core_minisymbol_to_symbol): Likewise.
10459 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10460 Formatting fixes.
10461 * hpux-core.c: Similarly.
10462 * irix-core.c: Similarly.
10463 * osf-core.c: Similarly.
10464 * sco5-core.c: Similarly.
10465 * binary.c (binary_make_empty_symbol): Remove function, define as
10466 _bfd_generic_make_empty_symbol.
10467 * ihex.c (ihex_make_empty_symbol): Likewise.
10468 * mmo.c (mmo_make_empty_symbol): Likewise.
10469 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10470 * srec.c (srec_make_empty_symbol): Likewise.
10471 * versados.c (versados_make_empty_symbol): Likewise.
10472 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10473 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10474 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10475 rather than _bfd_vms_make_empty_symbol.
10476 * vms-misc.c (new_symbol): Likewise.
10477
10478 2002-01-05 Alan Modra <amodra@bigpond.net.au>
10479
10480 * section.c (bfd_section_init): Remove unnecessary initialisations.
10481 (bfd_section_list_clear): New function.
10482 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10483 (_bfd_strip_section_from_output): Use them.
10484 * coffcode.h (coff_set_alignment_hook): Likewise.
10485 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10486 * elf64-mips.c (mips_elf64_final_link): Likewise.
10487 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10488 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10489 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10490 * bfd-in2.h: Regenerate.
10491
10492 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10493 rather than doing our own section handling. Clean up after errors
10494 with bfd_release and bfd_section_list_clear. Handle unexpected
10495 flags.
10496 * aoutf1.h (sunos4_core_file_p): Likewise.
10497 * aix386-core.c (aix386_core_file_p): Likewise.
10498 * cisco-core.c (cisco_core_file_validate): Likewise.
10499 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10500 * trad-core.c (trad_unix_core_file_p): Likewise.
10501
10502 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
10503 with bfd_release and bfd_section_list_clear.
10504 * hpux-core.c (hpux_core_core_file_p): Likewise.
10505 * irix-core.c (irix_core_core_file_p): Likewise.
10506 * lynx-core.c (lynx_core_file_p): Likewise.
10507 * osf-core.c (osf_core_core_file_p): Likewise.
10508 * rs6000-core.c (rs6000coff_core_p): Likewise.
10509 * sco5-core.c (sco5_core_file_p): Likewise.
10510
10511 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10512 sign extension adjustments without conditionals.
10513
10514 2002-01-04 Jakub Jelinek <jakub@redhat.com>
10515
10516 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10517 CIE at .eh_frame start is removed due to no FDEs referencing it.
10518
10519 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10520
10521 * config.bfd (x86_64-*-netbsd*): New target.
10522 * configure.in (x86_64-*-netbsd*): Set COREFILE
10523 to netbsd-core.lo.
10524 * configure: Regenerated.
10525
10526 2002-01-03 Tom Rix <trix@redhat.com>
10527
10528 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10529 for recent bfd_make_section_anyway change.
10530
10531 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10532
10533 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10534 R_ARM_THM_PC11 reloc.
10535
10536 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10537
10538 * configure.in (LINGUAS): Add ja.
10539 * configure: Regenerate.
10540 * po/ja.po: Import from translation project's web site.
10541
10542 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10543
10544 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10545 messages to ease translation into other languages.
10546
10547 For older changes see ChangeLog-0001
10548 \f
10549 Local Variables:
10550 mode: change-log
10551 left-margin: 8
10552 fill-column: 74
10553 version-control: never
10554 End:
This page took 0.257553 seconds and 4 git commands to generate.