05e8f130f4383504e3573a0208166a8fe598c2a8
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-10-30 Alan Modra <amodra@bigpond.net.au>
2
3 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
4 Add "val" and "sval" fields.
5 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
6 (read_attribute_value): Expand and adjust DW_* occurrences.
7 (scan_unit_for_functions, parse_comp_unit): Likewise.
8
9 2003-10-30 Phil Edwards <phil@codesourcery.com>
10
11 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
12 other common ELF triples.
13 (i[3-7]86-*-vxworks): Change to ELF format.
14 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
15 (sh-*-vxworks): New stanza.
16
17 2003-10-30 Lars Knoll <lars@trolltech.com>
18 Michael Matz <matz@suse.de>
19 Jakub Jelinek <jakub@redhat.com>
20 Alan Modra <amodra@bigpond.net.au>
21
22 * merge.c (struct sec_merge_sec_info): Update comment.
23 (struct sec_merge_hash_entry): Remove entsize.
24 (sec_merge_hash_lookup): Only adjust alignment when creating.
25 (sec_merge_emit): Remove register keyword.
26 (cmplengthentry, last4_eq, last_eq): Delete.
27 (strrevcmp, strrevcmp_align, is_suffix): New.
28 (merge_strings): Use them to implement fast suffix merging.
29 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
30 Make "len" signed.
31 (_bfd_elf_strtab_add): Lose on >2G strings.
32 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
33 (cmplengthentry, last4_eq): Delete.
34 (strrevcmp, is_suffix): New.
35 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
36
37 2003-10-29 Daniel Jacobowitz <drow@mvista.com>
38
39 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
40 SEC_ALLOC.
41
42 2003-10-29 Philip Blundell <philb@gnu.org>
43
44 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
45 code sequence.
46 (PLT_HEADER_SIZE): New.
47 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
48 (struct elf32_arm_relocs_copied): ... this. Count both
49 pcrel and non-pcrel relocs. All uses updated.
50 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
51 sections and symbol/section mapping cache.
52 (create_got_section): New.
53 (elf32_arm_create_dynamic_sections): New.
54 (elf_backend_create_dynamic_sections): Use it.
55 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
56 (elf32_arm_check_relocs): Likewise.
57 (elf32_arm_adjust_dynamic_symbol): Likewise.
58 (elf32_arm_copy_indirect_symbol): New.
59 (elf32_arm_link_hash_table_create): Initialise new fields.
60 (elf32_arm_gc_sweep_hook): Implement.
61 (elf32_arm_discard_copies): Delete.
62 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
63 (elf32_arm_finish_dynamic_sections): Likewise.
64 (elf_backend_can_refcount): Define.
65 (elf_backend_copy_indirect_symbol): Likewise.
66 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
67
68 2003-10-29 Alan Modra <amodra@bigpond.net.au>
69
70 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
71 (elf_backend_grok_psinfo): Define.
72 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
73
74 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
75 sections with the same name.
76 (elfcore_grok_lwpstatus): Likewise.
77 (elfcore_grok_win32pstatus): Likewise.
78 (elfcore_grok_note): Likewise.
79 (elfcore_grok_nto_status): Likewise.
80 (elfcore_grok_nto_gregs): Likewise.
81
82 2003-10-27 Daniel Jacobowitz <drow@mvista.com>
83
84 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
85 objects.
86
87 2003-10-14 Richard Sandiford <rsandifo@redhat.com>
88
89 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
90
91 2003-10-24 H.J. Lu <hongjiu.lu@intel.com>
92
93 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
94 hash table for real symbols.
95
96 2003-10-23 Michael Snyder <msnyder@redhat.com>
97
98 * section.c (asection): Fix typo in comment.
99
100 2003-10-23 Alan Modra <amodra@bigpond.net.au>
101
102 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
103 reloc symbol index to it. Don't allow gd syms in shared libs
104 to be optimized.
105 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
106 (ppc64_elf_size_stubs): Likewise.
107 (ppc64_elf_relocate_section): Check that tls relocs are only used
108 with tls syms, and similarly for non-tls. Correct symbol used
109 when optimizing toc tls code.
110
111 2003-10-22 Nick Clifton <nickc@redhat.com>
112
113 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
114 processing an executable.
115
116 2003-10-22 Jakub Jelinek <jakub@redhat.com>
117
118 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
119 field changes.
120 (_bfd_elf_link_assign_sym_version): Likewise.
121 * elflink.h (size_dynamic_sections): Likewise.
122
123 2003-10-21 Alexandre Oliva <aoliva@redhat.com>,
124 Michael Snyder <msnyder@redhat.com>
125
126 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
127 bfd_mach_sh4a_nofpu): New machine types.
128 * bfd-in2.h: Rebuilt.
129 * cpu-sh.c (compatible): Remove unused function.
130 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
131 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
132 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
133
134 2003-10-21 Wouter van Heyst <wouter@vidicode.nl>
135
136 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
137 describing mismatched formats involving the Maverick FP type.
138
139 2003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
140
141 * binary.c (binary_object_p): Pass machine flag along with
142 architecture.
143
144 2003-10-21 Thorsten Brehm <brehm@gmx.net>
145
146 * archures.c (bfd_default_scan): Add support for mcf528x.
147 * ieee.c (ieee_write_processor): Likewise.
148
149 2003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
150 Bernardo Innocenti <bernie@develer.com>
151
152 * archures.c: Add MCF528x (MCFv4) support.
153 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
154 * bfd-in2.h: Regenerate.
155
156 2003-10-20 Andrew Cagney <cagney@redhat.com>
157
158 * targets.c: Replace "struct sec" with "struct bfd_section"
159 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
160 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
161 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
162 * aout-tic30.c, aout-target.h:
163 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
164
165 2003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
166
167 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
168 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
169 (struct _mmix_elf_section_data): New member pjs.
170 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
171 functions.
172 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
173 (mmix_reloc_map): Ditto.
174 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
175 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
176 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
177 unused.
178 (mmix_elf_check_relocs): Move early return to after
179 mmix_elf_check_common_relocs call.
180 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
181 (_bfd_mmix_before_linker_allocation): Rename from
182 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
183 Arrange to set the initial relaxable size of sections.
184 (_bfd_mmix_after_linker_allocation): Rename from
185 _bfd_mmix_finalize_linker_allocated_gregs.
186 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
187 (bfd_elf64_get_section_contents): Define.
188 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
189 * libbfd.h, bfd-in2.h: Regenerate.
190
191 * reloc.c (bfd_generic_relax_section): Default-set
192 section->_cooked_size here.
193 (bfd_generic_get_relocated_section_contents): Don't set it here.
194 Explain why.
195
196 2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
197
198 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
199 output section has been discarded.
200
201 2003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
202
203 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
204 (h8300_reloc16_extra_cases): Likewise.
205 (h8300_bfd_link_add_symbols): Likewise.
206
207 2003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
208
209 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
210 (h8300sn_info_struct): Likewise.
211 (h8300hn_info_struct): Likewise.
212
213 2003-10-16 Pavel Roskin <proski@gnu.org>
214
215 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
216 for sections which lack size info.
217
218 2003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
219
220 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
221 mingw32.
222
223 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
224
225 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
226 undefined patterns with '*'.
227
228 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
229
230 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
231 use the last CIE from a different section.
232 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
233 size of the output section.
234
235 2003-10-07 Roland McGrath <roland@redhat.com>
236
237 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
238 new section from p_align header field.
239
240 2003-10-16 H.J. Lu <hongjiu.lu@intel.com>
241
242 * elf32-xtensa.c (xtensa_read_table_entries): The external size
243 of entry is 8 bytes.
244
245 2003-10-15 Andrew Cagney <cagney@redhat.com>
246
247 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
248 with NAME##_canonicalize_symtab.
249 * libcoff-in.h (coff_canonicalize_symtab): Update.
250 * xsym.h (bfd_sym_canonicalize_symtab): Update.
251 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
252 * coffgen.c (coff_canonicalize_symtab): Update.
253 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
254 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
255 * ieee.c (ieee_vec): Update comment.
256 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
257 * mmo.c (mmo_canonicalize_symtab): Update.
258 * nlm-target.h (nlm_canonicalize_symtab): Update.
259 * nlmcode.h (nlm_canonicalize_symtab): Update.
260 * i386msdos.c (msdos_canonicalize_symtab): Update.
261 * hp300hpux.c (MY (canonicalize_symtab)): Update.
262 * oasys.c (oasys_canonicalize_symtab): Update.
263 * som.c (som_canonicalize_symtab): Update.
264 * pef.c (bfd_pef_canonicalize_symtab): Update.
265 * nlmcode.h (nlm_canonicalize_symtab): Update.
266 * xsym.c (bfd_sym_canonicalize_symtab): Update.
267 * vms.c (vms_canonicalize_symtab): Update.
268 * versados.c (versados_canonicalize_symtab): Update.
269 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
270 * ieee.c (ieee_canonicalize_symtab): Update.
271 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
272 * reloc.c: Update comment.
273 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
274 * coff64-rs6000.c (aix5coff64_vec): Update.
275 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
276 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
277 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
278 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
279 * hp300hpux.c (MY_canonicalize_symtab): Update.
280 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
281 * aout-tic30.c (MY_canonicalize_symtab): Update.
282 * aout-target.h (MY_canonicalize_symtab): Update.
283 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
284 * elf.c (_bfd_elf_canonicalize_symtab): Update.
285 * elfcode.h (elf_canonicalize_symtab): Update.
286 * ihex.c (ihex_canonicalize_symtab): Update.
287 * tekhex.c (tekhex_canonicalize_symtab): Update.
288 * binary.c (binary_canonicalize_symtab): Update.
289 * srec.c (srec_canonicalize_symtab): Update.
290
291 2003-10-15 Kazu Hirata <kazu@cs.umass.edu>
292
293 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
294
295 2003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
296
297 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
298 relocations.
299 (sh_elf_check_relocs): Likewise.
300
301 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
302 (sh64_elf_merge_symbol_attribute): New.
303 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
304 (sh64_elf64_merge_symbol_attribute): New.
305
306 2003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
307
308 * elf-bfd.h (struct elf_backend_data): New function pointer member
309 elf_backend_merge_symbol_attribute.
310 * elflink.h (elf_link_add_object_symbols): Adjust call to
311 elf_backend_merge_symbol_attribute if the backend defined it.
312 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
313 (elfNN_bed): Add that to the initializer.
314
315 2003-10-14 Bob Wilson <bob.wilson@acm.org>
316
317 * elf32-xtensa.c (get_is_linkonce_section): Delete.
318 (xtensa_is_property_section, xtensa_is_littable_section): Use
319 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
320 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
321 (xtensa_get_property_section_name): Check section name instead of
322 calling get_is_linkonce_section. Remove unused bfd parameter. Use
323 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
324 linkonce section names by appending ".xt.insn" or ".xt.lit".
325 (xtensa_read_table_entries): Remove bfd argument in call to
326 xtensa_get_property_section_name. Free section name when done.
327 (elf_xtensa_combine_prop_entries): Free leaking table.
328
329 2003-10-13 Richard Sandiford <rsandifo@redht.com>
330
331 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
332 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
333 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
334 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
335 that were needed.
336 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
337 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
338
339 2003-10-13 H.J. Lu <hongjiu.lu@intel.com>
340
341 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
342 (bfd_elf64_ia64_after_parse): Likewise.
343 * bfd-in2.h: Regenerated.
344
345 * elfxx-ia64.c (oor_ip): New.
346 (oor_branch_size): Likewise.
347 (bfd_elfNN_ia64_after_parse): Likewise.
348 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
349 equals sizeof (oor_ip).
350
351 2003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
352
353 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
354 renumbering of some relocation numbers.
355
356 2003-10-11 Alan Modra <amodra@bigpond.net.au>
357
358 * coff-sh.c: Move definition of MAP and guard more code with
359 COFF_IMAGE_WITH_PE.
360
361 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
362 * bfd-in2.h: Regenerate.
363
364 2003-10-10 H.J. Lu <hongjiu.lu@intel.com>
365
366 * Makefile.am: Run "make dep-am".
367 * Makefile.in: Regenerate.
368 * doc/Makefile.in: Likewise.
369
370 2003-10-09 H.J. Lu <hongjiu.lu@intel.com>
371
372 * cofflink.c: Include "safe-ctype.h".
373 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
374
375 2003-10-08 Dave Brolley <brolley@redhat.com>
376 On behalf of Michael Snyder <msnyder@redhat.com>
377
378 * archures.c: Add FRV fr550 machine.
379 * cpu-frv.c: Ditto.
380 * elf32-frv.c: Ditto.
381 * bfd-in2.h: Regenerate.
382
383 2003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
384
385 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
386 for non-SGI N64 ABI. Improve code consitency.
387
388 2003-10-07 Alexandre Oliva <aoliva@redhat.com>
389
390 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
391 rightshift to 2.
392
393 2003-10-07 Nathan Sidwell <nathan@codesourcery.com>
394
395 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
396 parameter.
397 * cofflink.c (coff_link_add_symbols): Deal with split stab
398 sections.
399 * elflink.h (elf_link_add_object_symbols): Deal with split stab
400 sections.
401 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
402 * libbfd.h: Regenerated.
403
404 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
405 overflow, set reloc start position to after the count
406 reloc. Subtract one from num relocs. Give error on 0xffff relocs
407 and no overflow.
408 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
409 overflow.
410 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
411 0xffff.
412
413 2003-10-06 H.J. Lu <hongjiu.lu@intel.com>
414
415 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
416 last CIE/FDE if needed.
417
418 2003-10-06 Nick Clifton <nickc@redhat.com>
419
420 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
421 BFD64 is enabled.
422
423 2003-10-06 Matt Thomas <matt@3am-software.com>
424
425 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
426
427 2003-10-06 Robert Millan <robertmh@gnu.org>
428
429 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
430 * config.bfd: Likewise.
431 * configure: Regenerate.
432
433 2003-10-04 Christian Groessler <chris@groessler.org>
434
435 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
436 and R_CALLR.
437
438 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
439
440 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
441 * elf32-m68hc11.c: Likewise.
442 * elf32-m68hc12.c: Likewise.
443 * elf32-m68hc1x.h: Likewise.
444
445 2003-10-04 Stephane Carrez <stcarrez@nerim.fr>
446
447 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
448 of flags between HC12 and HCS12.
449
450 2003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
451
452 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
453 which become empty after merging.
454
455 2003-09-30 Jakub Jelinek <jakub@redhat.com>
456
457 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
458 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
459
460 2003-09-30 Chris Demetriou <cgd@broadcom.com>
461
462 * archures.c (bfd_mach_mipsisa64r2): New define.
463 * bfd-in2.h: Regenerate.
464 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
465 * cpu-mips.c (I_mipsisa64r2): New enum value.
466 (arch_info_struct): Add entry for I_mipsisa64r2.
467 * elfxx-mips.c (_bfd_elf_mips_mach)
468 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
469 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
470 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
471
472 2003-09-29 H.J. Lu <hongjiu.lu@intel.com>
473
474 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
475 Handle SHN_IA_64_ANSI_COMMON.
476 (elf_backend_section_from_bfd_section): Defined.
477
478 2003-09-26 H.J. Lu <hongjiu.lu@intel.com>
479
480 * elflink.c (elf_link_read_relocs_from_section): Add an argument
481 of a pointer to section. Check bad symbol index.
482 (_bfd_elf_link_read_relocs): Modify calls to
483 elf_link_read_relocs_from_section.
484
485 2003-09-23 DJ Delorie <dj@redhat.com>
486
487 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
488 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
489 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
490 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
491 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
492 R_SH_PSHA, R_SH_PSHL added.
493 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
494 (sh_elf_relocate_section): Support new relocs.
495
496 2003-09-23 Bob Wilson <bob.wilson@acm.org>
497
498 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
499 dynamic relocation offsets.
500
501 2003-09-23 Alan Modra <amodra@bigpond.net.au>
502
503 * simple.c (bfd_simple_get_relocated_section_contents): Free the
504 hash table using _bfd_generic_link_hash_table_free.
505
506 2003-09-23 Alan Modra <amodra@bigpond.net.au>
507
508 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
509 type of prefix_length and suffix_length to int. Rename "attributes"
510 to "attr". Comment.
511 (_bfd_elf_get_sec_type_attr): Update prototype.
512 * elf.c (get_special_section): Rewrite.
513 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
514 attr and type pointers.
515 (_bfd_elf_new_section_hook): Adjust for above.
516 (special_sections): Merge suffix with prefix. Set
517 prefix_length for all entries. Set suffix_length appropriately.
518 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
519 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
520 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
521 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
522 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
523 * elf32-v850.c (v850_elf_special_sections): Likewise.
524 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
525 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
526 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
527 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
528 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
529 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
530 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
531 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
532
533 2003-09-21 Daniel Jacobowitz <drow@mvista.com>
534
535 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
536 ->got if the section already exists.
537
538 2003-09-19 Nathan Sidwell <nathan@codesourcery.com>
539
540 * dwarf2.c (decode_line_info): Cope with an initially empty
541 filename table.
542
543 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
544
545 * acinclude.m4: Include ../config/accross.m4.
546 * aclocal.m4: Regenerated.
547
548 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
549 or long long.
550 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
551 (host64): Remove if HOST_64BIT_TYPE is set to long.
552
553 * configure.in (HOST_64BIT_TYPE): Set according to the size of
554 long and long long.
555 (HOST_U_64BIT_TYPE): Likewise.
556 (host64): Likewise.
557 * configure: Regenerated.
558
559 2003-09-19 Alan Modra <amodra@bigpond.net.au>
560
561 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
562 since some ABIs round up the size of the struct.
563
564 2003-09-18 H.J. Lu <hongjiu.lu@intel.com>
565
566 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
567 the old symbol is undefined and the new symbol is defined.
568
569 2003-09-18 Andreas Schwab <schwab@suse.de>
570
571 * simple.c (bfd_simple_get_relocated_section_contents): Use
572 _bfd_generic_link_hash_table_create instead of
573 bfd_link_hash_table_create.
574
575 2003-09-10 H.J. Lu <hongjiu.lu@intel.com>
576
577 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
578 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
579
580 2003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
581 Randolph Chung <randolph@tausq.org>
582
583 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
584 hppa_link_hash_newfunc, hppa_build_one_stub,
585 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
586 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
587 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
588 for generating import stubs for calls to statically linked PIC
589 functions.
590 (hppa_type_of_stub): Don't generate an import stub for calls to
591 statically linked pic functions. Generate import stubs for calls
592 in a shared object, to functions not in a regular file, and to
593 defined weak functions. Add new argument INFO.
594 (hppa_build_one_stub): Don't undef ADDIL_DP.
595 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
596 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
597 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
598 non-shared link. Convert instructions that use the the linkage table
599 pointer, or a facsimile thereof, to use the global data pointer when
600 the reloc has been changed.
601
602 2003-09-08 Joel Brobecker <brobecker@gnat.com>
603
604 * archures.c: Add new machine names for hppa.
605 * bfd-in2.h: Regenerate.
606 * cpu-hppa.c: Use the new machine names.
607
608 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
609
610 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
611 all_local_syms member.
612 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
613 to get the local symbols.
614
615 2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
616
617 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
618 (elf_backend_special_sections): Define.a
619
620 PR savannah/4950:
621 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
622 section is read-only.
623
624 2003-09-04 Nick Clifton <nickc@redhat.com>
625
626 * archures.c (bfd_mach_v850e1): Define.
627 * bfd-in2.h: Regenerate.
628 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
629 (arch_info_struct): Include an entry for bfd_mach_v850e1.
630 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
631 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
632 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
633 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
634 linked with v850e binaries. Mark the output as v850e.
635
636 2003-09-03 Nick Clifton <nickc@redhat.com>
637
638 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
639 symbols that are used in relocs.
640
641 2003-08-30 Robert Millan <robertmh@gnu.org>
642
643 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
644 * config.bfd: Likewise.
645 * configure: Regenerate.
646
647 2003-08-31 Christian Groessler <chris@groessler.org>
648
649 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
650 instead of returning bfd_reloc_continue.
651
652 2003-08-31 Andreas Jaeger <aj@suse.de>
653
654 * merge.c: Update to ISO C90.
655
656 2003-08-27 Ian Lance Taylor <ian@airs.com>
657
658 * configure.in: Check for strtoull.
659 * bfd.c (bfd_scan_vma): Use strtoull when available.
660 * configure, config.in: Regenerate.
661
662 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
663 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
664 __GNUC__ when deciding whether to use long long for
665 BFD_HOST_64_BIT.
666 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
667
668 2003-08-27 Christian Groessler <chris@groessler.org>
669
670 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
671 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
672 functions.
673 (elf32_i860_howto_table): Insert the new functions as
674 'special_function's in the proper reloc type entries.
675
676 2003-08-27 Richard Sandiford <rsandifo@redhat.com>
677
678 * elf32-frv.c (elf32_frv_relocate_section): Use
679 _bfd_elf_rela_local_sym.
680
681 2003-08-26 Michael Snyder <msnyder@redhat.com>
682
683 * cpu-frv.c: Remove unused enum.
684
685 2003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
686
687 * reloc.c: Fix documentation for MIPS ELF relocations.
688 libbfd.h: Regenerate.
689 bfd-in2.h: Regenerate.
690
691 2003-08-24 Jason Eckhardt <jle@rice.edu>
692
693 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
694
695 2003-08-24 Jason Eckhardt <jle@rice.edu>
696
697 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
698 shift by 2 before storing the relocated value.
699
700 2003-08-23 Jason Eckhardt <jle@rice.edu>
701
702 * coff-i860.c (coff_i860_reloc_nyi): New function.
703 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
704 LOWn, SPLITn, and BRADDR.
705 (RTYPE2HOWTO): Check that the r_type is within the howto_table
706 before trying to access the entry.
707 (coff_i860_rtype_to_howto): Likewise.
708 (coff_i860_reloc_type_lookup): New function.
709 (i860_reloc_processing): New function.
710 (coff_bfd_reloc_type_lookup): Define macro.
711 (RELOC_PROCESSING): Define macro.
712 Minor formatting adjustments.
713
714 2003-08-23 Alan Modra <amodra@bigpond.net.au>
715
716 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
717
718 2003-08-22 H.J. Lu <hongjiu.lu@intel.com>
719
720 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
721 .got section at 8 bytes.
722
723 2003-08-21 Nick Clifton <nickc@redhat.com>
724
725 * cofflink.c: Update to ISO C90 and tidy up formatting.
726
727 2003-08-21 Randolph Chung <tausq@debian.org>
728
729 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
730 can have OSABI=Linux or OSABI=SysV. Check for both.
731 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
732
733 2003-08-21 Nick Clifton <nickc@redhat.com>
734
735 * po/sv.po: Updated Swedish translation.
736
737 2003-08-20 Richard Sandiford <rsandifo@redhat.com>
738
739 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
740
741 2003-08-20 Nick Clifton <nickc@redhat.com>
742
743 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
744 replace some duplicated code in most elfxx-xxxx.c files. This
745 version uses the new fields in bfd_link_info.
746
747 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
748 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
749 * elf32-cris.c (cris_elf_relocate_section): Likewise.
750 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
751 * elf32-i386.c (elf_i386_relocate_section): Likewise.
752 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
753 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
754 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
755 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
756 * elf32-s390.c (elf_s390_relocate_section): Likewise.
757 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
758 * elf32-vax.c (elf_vax_relocate_section): Likewise.
759 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
760 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
761 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
762 * elf64-s390.c (elf_s390_relocate_section): Likewise.
763 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
764 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
765 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
766
767 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
768 elf_hppa_remark_useless_dynamic_symbols,
769 elf_hppa_relocate_section): Use the new fields in
770 bfd_link_info structure.
771 * elf32-sh.c (sh_elf_relocate_section): Likewise.
772 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
773 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
774 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
775 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
776 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
777
778 * elflink.h (elf_link_output_extsym): Fix test for reporting
779 undefined symbols in shared libraries. Remove redundant test
780 of shlib_undefined when reporting references to forced local
781 symbols.
782
783 2003-08-18 Andreas Schwab <schwab@suse.de>
784
785 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
786 executables.
787
788 2003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
789
790 * simple.c (bfd_simple_get_relocated_section_contents): Move
791 reloc_done hack to before first bfd_section_size call. Change all
792 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
793
794 2003-08-16 Alan Modra <amodra@bigpond.net.au>
795
796 * elf64-ppc.c: Don't include elf/ppc.h.
797
798 2003-08-14 Richard Sandiford <rsandifo@redhat.com>
799
800 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
801 code to work with 64-bit bfds.
802
803 2003-08-14 Alan Modra <amodra@bigpond.net.au>
804
805 * dep-in.sed: Remove libintl.h.
806 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
807 (POTFILES.in): Remove target.
808 * Makefile.in: Regenerate.
809
810 2003-08-12 Alan Modra <amodra@bigpond.net.au>
811
812 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
813 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
814 use the function sym from the previous reloc.
815
816 2003-08-11 Jakub Jelinek <jakub@redhat.com>
817
818 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
819 fatal if -pie.
820 * elf32-s390.c (elf_s390_relocate_section): Likewise.
821 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
822 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
823 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
824 * elf64-s390.c (elf_s390_relocate_section): Likewise.
825 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
826 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
827 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
828 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
829 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
830 on undefined symbols if -pie.
831 * elf32-sh.c (sh_elf_relocate_section): Likewise.
832
833 2003-08-11 Alan Modra <amodra@bigpond.net.au>
834
835 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
836 branch to __libc_start_main.
837
838 2003-08-08 Dmitry Diky <diwil@mail.ru>
839
840 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
841 gcc order.
842 * cpu-msp430.c: Likewise.
843 * elf32-msp430.c: Likewise.
844 * bfd-in2.h: Regenerate.
845
846 2003-08-07 Alan Modra <amodra@bigpond.net.au>
847
848 * elfxx-target.h: Remove PTR cast.
849 * targets.c (bfd_target): Make backend_data const void *.
850 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
851 * elf-m10300.c: Likewise.
852 * elf.c: Likewise.
853 * elf32-hppa.c: Likewise.
854 * elf32-i386.c: Likewise.
855 * elf32-m68hc1x.c: Likewise.
856 * elf32-ppc.c: Likewise.
857 * elf32-s390.c: Likewise.
858 * elf32-sh.c: Likewise.
859 * elf32-sh64.c: Likewise.
860 * elf32-sparc.c: Likewise.
861 * elf32-xtensa.c: Likewise.
862 * elf64-mips.c: Likewise.
863 * elf64-ppc.c: Likewise.
864 * elf64-s390.c: Likewise.
865 * elf64-sh64.c: Likewise.
866 * elf64-sparc.c: Likewise.
867 * elf64-x86-64.c: Likewise.
868 * elfcode.h: Likewise.
869 * elfcore.h: Likewise.
870 * elflink.c: Likewise.
871 * elflink.h: Likewise.
872 * elfxx-ia64.c: Likewise.
873 * elfxx-mips.c: Likewise.
874 * elfxx-mips.h: Likewise.
875 * elf.c (prep_headers): Remove useless check for null backend_data.
876 * bfd-in2.h: Regenerate.
877
878 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
879 (NAME): Use ## rather than CONCAT4 macro.
880 * elfcode.h: Remove one remaining PARAMS macro.
881 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
882 * elf-strtab.c: Likewise.
883 * elf-hppa.h: Likewise.
884 * elf32-hppa.h: Likewise.
885 * elf32-hppa.c: Likewise.
886 (elf32_hppa_add_symbol_hook): Delete.
887 (elf_backend_add_symbol_hook): Don't define.
888 * libhppa.h: Convert to C90. Replace INLINE with inline.
889
890 2003-08-06 Alan Modra <amodra@bigpond.net.au>
891
892 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
893 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
894 function descriptors, but warn.
895 (ppc_build_one_stub): Remove a couple of vars. Move code creating
896 stub syms so that we can avoid a stub sym if we already have a
897 plt sym. Do not redefine an existing symbol.
898 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
899 glink.
900
901 2003-08-06 Nick Clifton <nickc@redhat.com>
902
903 * po/fr.po: Updated French translation.
904
905 2003-08-06 Alan Modra <amodra@bigpond.net.au>
906
907 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
908 SEC_LINKER_CREATED.
909
910 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
911
912 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
913 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
914
915 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
916
917 * coffcode.h (coff_slurp_line_table): Return with a warning
918 message if the line number table could not be read.
919
920 2003-08-04 Nick Clifton <nickc@redhat.com>
921
922 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
923 to messages produced for .gnu.warning.SYMBOL sections.
924
925 2003-08-04 Alan Modra <amodra@bigpond.net.au>
926
927 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
928 * elfcore.h: Likewise.
929 * elflink.c: Likewise.
930 * elflink.h: Likewise.
931 * elf.c (sym_is_global): Remove INLINE.
932 (align_file_position): Replace INLINE with inline.
933 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
934 (elf_file_p): Replace INLINE with inline.
935
936 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
937
938 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
939
940 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
941
942 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
943
944 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
945
946 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
947 ElfNN_External_Rela instead of Elf64_External_Rela.
948
949 2003-08-01 Nick Clifton <nickc@redhat.com>
950
951 * config.bfd: Add code to catch obsolete configurations and warn
952 about them unless --enable-obsolete is used. Use this to mark
953 vax-vms port as obsolete.
954
955 2003-07-30 Alan Modra <amodra@bigpond.net.au>
956
957 * elf32-ppc.c (ppc_elf_install_value): Tidy.
958 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
959 Formatting.
960 * elfxx-target.h: Remove PARAMS macro. Formatting.
961
962 2003-07-30 Alan Modra <amodra@bigpond.net.au>
963
964 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
965 * elf64-ppc.c (get_fdh): New function, split out from
966 ppc64_elf_edit_opd.
967 (ppc64_elf_check_relocs): Use get_fdh.
968 (func_desc_adjust): Likewise. Tidy.
969 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
970 exit. Use get_fdh. Account for superfluous dynamic relocs.
971 (ppc64_elf_relocate_section): Warning fix.
972
973 2003-07-30 Jason Eckhardt <jle@rice.edu>
974
975 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
976
977 2003-07-30 Jason Eckhardt <jle@rice.edu>
978
979 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
980
981 2003-07-30 Randolph Chung <tausq@debian.org>
982
983 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
984 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
985
986 2003-07-30 Alan Modra <amodra@bigpond.net.au>
987
988 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
989 Replace PTR with void *. Formatting.
990 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
991 (make_mapping): Likewise.
992
993 2003-07-29 Alan Modra <amodra@bigpond.net.au>
994
995 * elf64-ppc.c (func_desc_adjust): Give linker created function
996 descriptor symbols a size and type.
997 (ppc64_elf_relocate_section): Correct lq insn test.
998
999 2003-07-28 Eric Christopher <echristo@redhat.com>
1000
1001 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1002 (ppc_elf_install_value): New function.
1003 (ppc_elf_sort_rela): Remove.
1004 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1005 and replace with out of range branch stubs.
1006 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1007
1008 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
1009
1010 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1011 from input_bfd.
1012
1013 2003-07-28 Alan Modra <amodra@bigpond.net.au>
1014
1015 * elf.c (special_sections): Set attributes for .got and .plt.
1016
1017 2003-07-27 Alan Modra <amodra@bigpond.net.au>
1018
1019 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1020 on function descriptors.
1021 (ELIMINATE_COPY_RELOCS): Expand comment.
1022 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1023 Do include ".toc1".
1024
1025 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1026
1027 * elf.c (_bfd_elf_new_section_hook): Set the default section
1028 type to SHT_NULL.
1029 (elf_fake_sections): Set the section type based on asect->flags
1030 if it is SHT_NULL. Don't abort on processor specific section
1031 types.
1032
1033 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1034
1035 * bfd-in2.h: Regenerated.
1036
1037 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1038
1039 * elf-bfd.h (bfd_elf_special_section): New.
1040 (elf_backend_data): Add special_sections, a pointer to
1041 bfd_elf_special_section.
1042 (elf_section_type). New.
1043 (elf_section_flags): New.
1044 (_bfd_elf_get_sec_type_attr): New.
1045
1046 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1047 real section type/flags.
1048 (special_sections): New.
1049 (get_special_section): New.
1050 (_bfd_elf_get_sec_type_attr): New.
1051 (_bfd_elf_new_section_hook): Check special_section to set
1052 elf_section_type and elf_section_flags.
1053 (elf_fake_sections): Don't use section name to set ELF section
1054 data.
1055
1056 * elf32-m32r.c (m32r_elf_special_sections): New.
1057 (elf_backend_special_sections): Defined.
1058
1059 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1060 (elf_backend_special_sections): Defined.
1061
1062 * elf32-mcore.c (mcore_elf_special_sections): New.
1063 (elf_backend_special_sections): Defined.
1064
1065 * elf32-ppc.c (ppc_elf_special_sections): New.
1066 (elf_backend_special_sections): Defined.
1067
1068 * elf32-sh64.c (sh64_elf_special_sections): New.
1069 (elf_backend_special_sections): Defined.
1070
1071 * elf32-v850.c (v850_elf_special_sections): New.
1072 (elf_backend_special_sections): Defined.
1073
1074 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1075 (elf_backend_special_sections): Defined.
1076
1077 * elf64-alpha.c (elf64_alpha_special_sections): New.
1078 (elf_backend_special_sections): Defined.
1079
1080 * elf64-hppa.c (elf64_hppa_special_sections): New.
1081 (elf_backend_special_sections): Defined.
1082
1083 * elf64-ppc.c (ppc64_elf_special_sections): New.
1084 (elf_backend_special_sections): Defined.
1085
1086 * elf64-sh64.c (sh64_elf64_special_sections): New.
1087 (elf_backend_special_sections): Defined.
1088
1089 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1090 (elf_backend_special_sections): Defined.
1091
1092 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1093
1094 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1095 (elf_backend_special_sections): Defined.
1096
1097 * elfxx-target.h (elf_backend_special_sections): New. Default
1098 to NULL.
1099 (elfNN_bed): Initialize special_sections.
1100
1101 * section.c (bfd_abs_section): Remove const.
1102 (bfd_und_section): Likewise.
1103 (bfd_com_section): Likewise.
1104 (bfd_ind_section): Likewise.
1105
1106 2003-07-24 Nick Clifton <nickc@redhat.com>
1107
1108 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1109 sections are assigned the LOAD attribute.
1110
1111 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1112
1113 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1114 * elf32-sh64-com.c: Likewise.
1115 * elf32-sh64.c: Likewise.
1116 * elf32-sh64.h: Likewise.
1117 * elf64-sh64.c: Likewise.
1118
1119 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1120
1121 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1122 (allocate_dynrelocs): Likewise.
1123 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1124 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1125
1126 2003-07-24 Nick Clifton <nickc@redhat.com>
1127
1128 * po/fr.po: Updated French translation.
1129
1130 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1131
1132 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1133 near the beginning of the file. Swap order of arguments. Call
1134 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1135 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1136 (elf_xtensa_relocate_section): Likewise.
1137 (shrink_dynamic_reloc_sections): Likewise.
1138
1139 2003-07-23 Bob Wilson <bob.wilson@acm.org>
1140
1141 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1142 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1143 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1144 first printing an error message.
1145 (elf_xtensa_finish_dynamic_sections): Likewise.
1146 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1147 discarding literal table entries.
1148 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1149 (elf_xtensa_do_asm_simplify): Likewise.
1150
1151 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1152
1153 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1154 we have a local symbol in common section.
1155
1156 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1157
1158 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1159 weak symbols.
1160
1161 2003-07-22 Nick Clifton <nickc@redhat.com>
1162
1163 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1164 expected RS6000 storage classes.
1165
1166 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1167
1168 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1169 output_bfd unused to silence gcc.
1170
1171 2003-07-21 Nick Clifton <nickc@redhat.com>
1172
1173 * po/sv.po: Updated Swedish translation.
1174
1175 2003-07-21 Alan Modra <amodra@bigpond.net.au>
1176
1177 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1178 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1179 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1180 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1181 now done in _bfd_elf_symbol_refs_local_p.
1182 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1183 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1184 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1185
1186 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1187
1188 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1189
1190 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1191
1192 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1193 (SYMBOL_CALLS_LOCAL): Likewise.
1194
1195 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1196 immediately if symbol isn't defined locally.
1197
1198 2003-07-18 Richard Henderson <rth@redhat.com>
1199
1200 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1201 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1202 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1203 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1204 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1205 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1206 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1207 Update all callers to provide the relocation being resolved.
1208
1209 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1210
1211 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1212 targ_cflags.
1213
1214 2003-07-17 Nick Clifton <nickc@redhat.com>
1215
1216 * po/es.po: New Spanish translation.
1217 * po/sv.po: New Swedish translation.
1218 * po/opcodes.pot: Regenerate.
1219
1220 2003-07-16 Richard Henderson <rth@redhat.com>
1221
1222 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1223 * elfxx-ia64.c, targets.c: Likewise.
1224
1225 2003-07-16 Richard Henderson <rth@redhat.com>
1226
1227 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1228 for symbols defined locally plus -Bsymbolic. Tidy logic.
1229
1230 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
1231
1232 * archures.c (bfd_mach_mips7000): New.
1233 * bfd-in2.h: Regenerated.
1234 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1235 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1236 (mips_mach_extensions): Add an entry for it.
1237
1238 2003-07-14 Nick Clifton <nickc@redhat.com>
1239
1240 * po/tr.po: Update with latest version.
1241 * po/SRC-POTFILES.in: Regenerate.
1242 * po/bfd.pot: Regenerate.
1243 * Makfile.in: Regenerate.
1244 * configure: Regenerate.
1245
1246 2003-07-12 Jeff Baker <jbaker@qnx.com>
1247
1248 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1249 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1250 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1251 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1252
1253 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1254
1255 * coffcode.h (coff_set_section_contents): Set the
1256 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1257
1258 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1259
1260 * bfd-in.h (bfd_h8300_pad_address): Declare.
1261 * bfd-in2.h: Regenerate.
1262 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1263 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1264 addresses before checking whether they can be relaxed.
1265 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1266 Don't complain about overflows in general 8-bit relocations.
1267 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1268 Fix handling of R_H8_DIR24A8.
1269
1270 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
1271
1272 * elf32-h8300.c: Convert function prototypes and definitions
1273 to C90 syntax.
1274 * coff-h8300.c: Likewise.
1275 * cpu-h8300.c: Likewise.
1276
1277 2003-07-11 Alan Modra <amodra@bigpond.net.au>
1278
1279 * po/SRC-POTFILES.in: Regenerate.
1280 * po/bfd.pot: Likewise.
1281
1282 2003-07-10 Bob Wilson <bob.wilson@acm.org>
1283
1284 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1285 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1286 .xt.lit.plt section.
1287 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1288 and allocate memory for it.
1289 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1290 section to the .got.loc section.
1291 (elf_xtensa_finish_dynamic_sections): Fix up call to
1292 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1293 the address of .got.loc.
1294 (relax_property_section): Shrink .got.loc to match changes in any
1295 literal table section.
1296 (xtensa_is_property_section): Change to match
1297 xtensa_get_property_section_name.
1298 (xtensa_is_littable_section): New.
1299
1300 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1301
1302 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1303 -1LL.
1304
1305 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1306
1307 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1308 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1309 Run "make dep-am".
1310 * Makefile.in: Regenerate.
1311
1312 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
1313
1314 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1315 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1316 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1317 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1318 * elf32-am33lin.c: Rename global functions.
1319 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1320 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1321 * configure.in (bfd_elf32_am33lin_vec): Added.
1322 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1323 (elf32-am33lin.lo): List dependencies.
1324 * aclocal.m4, configure, Makefile.in: Rebuilt.
1325 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1326 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1327 ELF_ARCH was not defined before.
1328 (elf_symbol_leading_char): Define if not defined.
1329 * elf32-am33lin.c: Override the definitions above.
1330 * targets.c (bfd_elf32_am33lin_vec): New.
1331
1332 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1333
1334 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1335 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1336 pcrel_relocs_copied.
1337 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1338 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1339 ld-linux.so.2 to ld.so.1.
1340 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1341 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1342 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1343 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1344 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1345 .rela.* section contents with bfd_zalloc.
1346 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1347 * elf-m10300.c: Added declarations for functions missing them.
1348 Merge some shared-library changes from the i386 back-end. Use
1349 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1350 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1351 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1352 members of elf_link_hash_entry. Adjusted references.
1353 (mn10300_elf_final_link_relocate): dynobj was already loaded
1354 into a local variable, use it.
1355 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1356 * elf-m10300.c: Add missing function prototypes.
1357 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1358 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1359 relocation for dynamic relocations.
1360 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1361 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1362 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1363 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1364 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1365 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1366 adress is already known at the time we compute relaxations.
1367 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1368 and PLT32 to narrower relocations.
1369 * libbfd.h, bfd-in2.h: Rebuilt.
1370 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1371 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1372 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1373 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1374 BFD_RELOC_MN10300_RELATIVE): New relocs.
1375 * libbfd.h, bfd-in2.h: Rebuilt.
1376 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1377 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1378 fields.
1379 (elf_mn10300_howto): Defined new relocation types.
1380 (mn10300_reloc_map): Map them.
1381 (_bfd_mn10300_elf_create_got_section): New fn.
1382 (mn10300_elf_check_relocs): Handle PIC relocs.
1383 (mn10300_elf_final_link_relocate): Likewise.
1384 (mn10300_elf_relocate_section): Handle DSOs.
1385 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1386 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1387 elf_mn10300_pic_plt_entry): New.
1388 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1389 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1390 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1391 elf_mn10300_plt_reloc_offset: New macros.
1392 (ELF_DYNAMIC_INTERPRETER): Likewise.
1393 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1394 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1395 (_bfd_mn10300_elf_discard_copies): Likewise.
1396 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1397 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1398 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1399 (elf_backend_can_gc_sections,
1400 elf_backend_create_dynamic_sections,
1401 elf_backend_adjust_dynamic_sections,
1402 elf_backend_size_dynamic_sections,
1403 elf_backend_finish_dynamic_symbol,
1404 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1405 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1406 elf_backend_got_header_size, elf_backend_plt_header_size): New
1407 macros.
1408
1409 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
1410
1411 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1412 * elf-m10300.c (compute_function_info): Account for AM33
1413 registers in `movm' when computing stack space for `call' when
1414 linking for AM33/2.0 link.
1415 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1416 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1417 * bfd-in2.h: Rebuilt.
1418 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1419 * elf-m10300.c: Updated.
1420 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1421 * archures.c (bfd_mach_am332): Defined.
1422 * bfd-in2.h: Rebuilt.
1423 * cpu-m10300.c (bfd_am332_arch): Defined.
1424 (bfd_am33_arch): Chained with am33-2.
1425 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1426 (_bfd_mn10300_elf_final_write_processing): Likewise.
1427
1428 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1429
1430 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1431
1432 2003-07-10 Alan Modra <amodra@bigpond.net.au>
1433
1434 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1435 (struct ppc64_elf_obj_tdata): New.
1436 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1437 (ppc64_elf_mkobject): New function.
1438 (struct got_entry): Add "owner". Move "tls_type".
1439 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1440 (ppc64_elf_init_stub_bfd): New function.
1441 (create_got_section): Create header .got in dynobj. Create .got
1442 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1443 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1444 Look for dynobj .got, and test it.
1445 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1446 (update_local_sym_info): Likewise.
1447 (ppc64_elf_check_relocs): Likewise.
1448 (ppc64_elf_gc_sweep_hook): Likewise.
1449 (ppc64_elf_tls_optimize): Likewise.
1450 (allocate_dynrelocs): Likewise.
1451 (ppc64_elf_size_dynamic_sections): Likewise.
1452 (ppc64_elf_relocate_section): Likewise.
1453 (ppc64_elf_next_toc_section): Update comment.
1454 (toc_adjusting_stub_needed): Remove unneeded cast.
1455 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1456 testing section flags.
1457 (ppc64_elf_build_stubs): Likewise.
1458 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1459 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1460 (func_desc_adjust): Copy over dynamic info for undef weaks.
1461 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1462 (ppc64_elf_size_stubs): Update prototype.
1463 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1464 input sections rather than scanning dynobj.
1465
1466 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1467
1468 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1469 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1470 (mips_elf_create_msym_section): Delete.
1471 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1472 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1473 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1474 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1475 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1476 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1477 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1478
1479 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1480
1481 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1482 symbols protected.
1483
1484 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1485
1486 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1487 of relocations whose offset is -2.
1488
1489 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1490
1491 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1492 forced-local symbols like other locals. Don't create relocations
1493 against STN_UNDEF in irix objects.
1494
1495 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1496
1497 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1498 compatible objects, add the values of defined external symbols
1499 to the addend.
1500
1501 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
1502
1503 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1504 initialize a GOT entry to the symbol's st_value.
1505
1506 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1507
1508 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1509 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1510 (ppc_elf_tdata): Define.
1511 (elf_local_ptr_offsets): Adjust.
1512 (ppc_elf_mkobject): New function.
1513 (bfd_elf32_mkobject): Define.
1514
1515 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1516 * elfcore.h (elf_core_file_p): Likewise.
1517 * section.c (bfd_section_init): Remove prototype.
1518
1519 2003-07-08 Alan Modra <amodra@bigpond.net.au>
1520
1521 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1522 field.
1523 (enum elf_linker_section_enum): Delete.
1524 (struct elf_linker_section): Delete.
1525 (struct elf_linker_section_pointers): Delete.
1526 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1527 Make linker_section_pointers a void**.
1528 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1529 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1530 of old item in elf-bfd.h.
1531 (struct elf_linker_section): Likewise.
1532 (struct elf_linker_section_pointers): Likewise.
1533 (elf_local_ptr_offsets): Define.
1534 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1535 (ppc_elf_link_hash_newfunc): Init it.
1536 (struct ppc_elf_link_hash_table): Add sbss.
1537 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1538 individual fields.
1539 (elf_create_linker_section): Fold into..
1540 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1541 Make rela section here if shared.
1542 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1543 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1544 clearing in a loop.
1545 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1546 section here.
1547 (ppc_elf_check_relocs): Adjust.
1548 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1549 creating .sbss by hand.
1550 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1551
1552 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1553
1554 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1555 complain_overflow_bitfield.
1556 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1557 complain_overflow_bitfield.
1558
1559 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1560
1561 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1562 true even if -pie.
1563
1564 2003-07-04 Jakub Jelinek <jakub@redhat.com>
1565
1566 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1567 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1568 !info->executable.
1569 (get_fptr): For -pie create .opd as writable section and create
1570 .rela.opd as well.
1571 (elfNN_ia64_check_relocs): Change info->shared into
1572 !info->executable.
1573 (allocate_fptr): Likewise.
1574 (allocate_dynrel_entries): Account for a relative reloc for -pie
1575 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1576 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1577 section if -pie.
1578 (set_got_entry): Don't create a relative reloc if -pie
1579 want_ltoff_fptr for undefweak symbol.
1580 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1581 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1582 @fptr().
1583
1584 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1585 even if -pie.
1586 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1587 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1588 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1589 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1590 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1591 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1592 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1593 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1594 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1595
1596 2003-07-04 Paul Clarke <paulc@senet.com.au>
1597
1598 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1599 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1600 <R_H8_DIR32A16>: Fix type of relocation.
1601
1602 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1603
1604 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1605 sections were created already. Remove unnecessary tests of
1606 the previous change.
1607
1608 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1609
1610 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1611 bfd_make_section for existing sections.
1612
1613 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1614
1615 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1616 create_got_section if we already have done so.
1617 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1618 (sh_elf_check_relocs): Likewise.
1619 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1620 htab->root.dynobj instead.
1621 (sh_elf_check_relocs): Likewise.
1622 (sh_elf_finish_dynamic_sections): Likewise.
1623
1624 * section.c (bfd_make_section): Return NULL for existing section.
1625
1626 2003-07-04 Alan Modra <amodra@bigpond.net.au>
1627
1628 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1629 ppc_elf_create_got if we've already done so.
1630
1631 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1632 (_bfd_elf_find_pointer_linker_section): Likewise.
1633 (bfd_elf32_create_pointer_linker_section): Likewise.
1634 (bfd_elf32_finish_pointer_linker_section): Likewise.
1635 (bfd_elf64_create_pointer_linker_section): Likewise.
1636 (bfd_elf64_finish_pointer_linker_section): Likewise.
1637 (_bfd_elf_make_linker_section_rela): Likewise.
1638 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1639 (elf_finish_pointer_linker_section): Likewise.
1640 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1641 (_bfd_elf_create_linker_section): Move this function..
1642 (_bfd_elf_find_pointer_linker_section): ..and this..
1643 * elflink.h (elf_create_pointer_linker_section): ..and this..
1644 (elf_finish_pointer_linker_section): ..and this..
1645 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1646 calls.
1647 (elf_create_linker_section): Convert to C90, tidy.
1648 (elf_find_pointer_linker_section): Likewise.
1649 (elf_create_pointer_linker_section): Likewise.
1650 (elf_finish_pointer_linker_section): Likewise.
1651 * elf32-i370.c: Delete #if 0 code.
1652
1653 2003-07-02 Alan Modra <amodra@bigpond.net.au>
1654
1655 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1656 _restf* to be satisfied by shared libs, and always force them local.
1657 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1658 Correct test for "bl".
1659 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1660 primary opcode 31.
1661
1662 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1663
1664 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1665 (s390_tls_reloc): New function.
1666 (elf_howto_table): Add long displacement relocations R_390_20,
1667 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1668 (elf_s390_reloc_type_lookup): Likewise.
1669 (elf_s390_check_relocs): Likewise.
1670 (elf_s390_gc_sweep_hook): Likewise.
1671 (elf_s390_relocate_section): Likewise.
1672 * elf64-s390.c: Same changes as for elf32-s390.c.
1673 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
1674 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
1675 BFD_RELOC_390_TLS_GOTIE20.
1676 * bfd-in2.h: Regenerate.
1677 * libbfd.h: Likewise.
1678
1679 2003-06-30 Alan Modra <amodra@bigpond.net.au>
1680
1681 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1682 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1683
1684 2003-06-29 Alan Modra <amodra@bigpond.net.au>
1685
1686 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1687 Replace PTR with void *. Formatting.
1688 * archive64.c: Likewise.
1689 * archures.c: Likewise.
1690 * bfd-in.h: Likewise.
1691 * bfd.c: Likewise.
1692 * bfdio.c: Likewise.
1693 * bfdwin.c: Likewise.
1694 * cache.c: Likewise.
1695 * corefile.c: Likewise.
1696 * format.c: Likewise.
1697 * init.c: Likewise.
1698 * libbfd-in.h: Likewise.
1699 * libbfd.c: Likewise.
1700 * linker.c: Likewise.
1701 * opncls.c: Likewise.
1702 * reloc.c: Likewise.
1703 * section.c: Likewise.
1704 * simple.c: Likewise.
1705 * syms.c: Likewise.
1706 * targets.c: Likewise.
1707 * bfd-in2.h: Regenerate.
1708 * libbfd.h: Regenerate.
1709
1710 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1711 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1712 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1713 (bfd_getb64): Rewrite without parens.
1714 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1715 * cache.c (insert, snip): Remove INLINE.
1716 * linker.c (bfd_link_add_undef): Likewise.
1717
1718 2003-06-29 Andreas Jaeger <aj@suse.de>
1719
1720 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1721 unnecessary prototypes. Replace PTR with void *.
1722 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1723 trim plt entries. Move undefweak non-default visibility test ...
1724 (allocate_dynrelocs): ... from here.
1725 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1726 Change all callers.
1727 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1728 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1729 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1730 dynreloc and .got relocs.
1731 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1732 for .got relocs.
1733
1734 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1735
1736 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1737
1738 2003-06-27 Nick Clifton <nickc@redhat.com>
1739
1740 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1741 bfd_add_gnu_debuglink_section and only create the section, do not
1742 fill in its contents.
1743 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1744 contents of a .gnu-debuglink section.
1745 * bfd-in2.h: Regenerate.
1746
1747 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1748
1749 * elfxx-mips.c: Revert .got alignment to 2**4.
1750
1751 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1752
1753 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1754
1755 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1756
1757 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1758 relocation header setup.
1759
1760 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1761
1762 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1763 (ppc_elf_reloc_type_lookup): Modify comment.
1764 (ppc_elf_info_to_howto): Ditto.
1765 (ppc_elf_relocate_section): Ditto.
1766 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1767
1768 2003-06-25 Alan Modra <amodra@bigpond.net.au>
1769
1770 * aout-ns32k.c: Correct spelling of "relocatable".
1771 * aoutx.h: Likewise.
1772 * bfd-in.h: Likewise.
1773 * bfd.c: Likewise.
1774 * bout.c: Likewise.
1775 * coff-a29k.c: Likewise.
1776 * coff-alpha.c: Likewise.
1777 * coff-arm.c: Likewise.
1778 * coff-i386.c: Likewise.
1779 * coff-i860.c: Likewise.
1780 * coff-i960.c: Likewise.
1781 * coff-m68k.c: Likewise.
1782 * coff-m88k.c: Likewise.
1783 * coff-mcore.c: Likewise.
1784 * coff-mips.c: Likewise.
1785 * coff-or32.c: Likewise.
1786 * coff-ppc.c: Likewise.
1787 * coff-rs6000.c: Likewise.
1788 * coff-sh.c: Likewise.
1789 * coff-tic80.c: Likewise.
1790 * coff64-rs6000.c: Likewise.
1791 * cofflink.c: Likewise.
1792 * cpu-ns32k.c: Likewise.
1793 * ecoff.c: Likewise.
1794 * ecofflink.c: Likewise.
1795 * elf-bfd.h: Likewise.
1796 * elf-eh-frame.c: Likewise.
1797 * elf-hppa.h: Likewise.
1798 * elf-m10200.c: Likewise.
1799 * elf-m10300.c: Likewise.
1800 * elf.c: Likewise.
1801 * elf32-arm.h: Likewise.
1802 * elf32-avr.c: Likewise.
1803 * elf32-cris.c: Likewise.
1804 * elf32-d10v.c: Likewise.
1805 * elf32-dlx.c: Likewise.
1806 * elf32-fr30.c: Likewise.
1807 * elf32-frv.c: Likewise.
1808 * elf32-h8300.c: Likewise.
1809 * elf32-hppa.c: Likewise.
1810 * elf32-i370.c: Likewise.
1811 * elf32-i386.c: Likewise.
1812 * elf32-i860.c: Likewise.
1813 * elf32-i960.c: Likewise.
1814 * elf32-ip2k.c: Likewise.
1815 * elf32-iq2000.c: Likewise.
1816 * elf32-m32r.c: Likewise.
1817 * elf32-m68hc11.c: Likewise.
1818 * elf32-m68hc1x.c: Likewise.
1819 * elf32-m68k.c: Likewise.
1820 * elf32-mcore.c: Likewise.
1821 * elf32-mips.c: Likewise.
1822 * elf32-msp430.c: Likewise.
1823 * elf32-openrisc.c: Likewise.
1824 * elf32-ppc.c: Likewise.
1825 * elf32-s390.c: Likewise.
1826 * elf32-sh.c: Likewise.
1827 * elf32-sh64.c: Likewise.
1828 * elf32-sparc.c: Likewise.
1829 * elf32-v850.c: Likewise.
1830 * elf32-vax.c: Likewise.
1831 * elf32-xstormy16.c: Likewise.
1832 * elf32-xtensa.c: Likewise.
1833 * elf64-alpha.c: Likewise.
1834 * elf64-hppa.c: Likewise.
1835 * elf64-mips.c: Likewise.
1836 * elf64-mmix.c: Likewise.
1837 * elf64-ppc.c: Likewise.
1838 * elf64-s390.c: Likewise.
1839 * elf64-sh64.c: Likewise.
1840 * elf64-sparc.c: Likewise.
1841 * elf64-x86-64.c: Likewise.
1842 * elfcode.h: Likewise.
1843 * elflink.h: Likewise.
1844 * elfn32-mips.c: Likewise.
1845 * elfxx-ia64.c: Likewise.
1846 * elfxx-mips.c: Likewise.
1847 * i386linux.c: Likewise.
1848 * ieee.c: Likewise.
1849 * libcoff-in.h: Likewise.
1850 * linker.c: Likewise.
1851 * m68klinux.c: Likewise.
1852 * pdp11.c: Likewise.
1853 * pe-mips.c: Likewise.
1854 * peXXigen.c: Likewise.
1855 * reloc.c: Likewise.
1856 * reloc16.c: Likewise.
1857 * sparclinux.c: Likewise.
1858 * sunos.c: Likewise.
1859 * syms.c: Likewise.
1860 * versados.c: Likewise.
1861 * vms.c: Likewise.
1862 * xcofflink.c: Likewise.
1863 * bfd-in2.h: Regenerate.
1864 * libcoff.h: Regenerate.
1865 * libbfd.h: Regenerate.
1866
1867 2003-06-24 Alan Modra <amodra@bigpond.net.au>
1868
1869 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1870 local sym errors.
1871
1872 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1873 prototypes and casts. Replace PTR with void *. Formatting.
1874 * elf32-ppc.c: Likewise. Break long strings too.
1875 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1876 (ppc_elf_unhandled_reloc): Internationalize error message.
1877 * elf32-ppc.h: Remove PARAMS.
1878
1879 2003-06-23 Mark Mitchell <mark@codesourcery.com>
1880
1881 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1882 APUinfo slots.
1883 (ppc_elf_final_write_processing): Likewise.
1884
1885 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1886
1887 * elflink.h (elf_link_input_bfd): Check raw size when using
1888 kept_section to preserve debug information discarded by
1889 linkonce.
1890
1891 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1892
1893 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1894 (ppc64_elf_setup_section_lists): Set it.
1895 (ppc64_elf_relocate_section): Check sym section id against top_id.
1896 (ppc_build_one_stub): Comment on top_id.
1897
1898 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1899
1900 * config.bfd: Add tic4x-*-rtems*.
1901
1902 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1903
1904 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1905 prototypes and casts. Replace PTR with void *. Format copyright.
1906 Mention ABI links.
1907 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1908 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1909 (ppc_type_of_stub): Make r_type an enum.
1910 (ppc64_elf_size_stubs): Likewise.
1911 * elf64-ppc.h: Remove PARAMS macro.
1912
1913 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1914
1915 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1916 elf hash tab fields.
1917
1918 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1919 (ppc64_elf_info_to_howto): Likewise.
1920 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1921 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1922
1923 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1924
1925 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1926 reloc overflow on discarded eh_frame entries.
1927
1928 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1929
1930 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1931 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1932 Return error condition.
1933 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1934 that have has_gp_reloc set.
1935 (struct ppc_link_hash_table): Add stub_count.
1936 (ppc_build_one_stub): Increment it.
1937 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1938 individual fields.
1939 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1940
1941 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1942
1943 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1944 size calculation from addend. Round size up.
1945
1946 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1947
1948 * elf32-cris.c (cris_elf_relocate_section) <case
1949 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1950 symbol from a normal object or an undefined weak symbol.
1951
1952 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1953
1954 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1955 R_PPC64_TOC relocs.
1956
1957 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1958
1959 * section.c (struct sec): Put back kept_section.
1960 (STD_SECTION): Put back kept_section initialization.
1961 * bfd-in2.h: Regenerate.
1962
1963 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1964 sections for relocateable output. Use kept_section to preserve
1965 debug information discarded by linkonce.
1966
1967 2003-06-17 Roland McGrath <roland@redhat.com>
1968
1969 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1970 segment-relative relocation between different segments.
1971
1972 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1973
1974 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1975 optimizations earlier.
1976
1977 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1978 Restore previous input_list type.
1979 (ppc64_elf_link_hash_table_create): Undo last change.
1980 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1981 per output section, but don't bother with bfd_abs_section marker.
1982 (ppc64_elf_next_input_section): Adjust for multiple input section
1983 lists.
1984 (group_sections): Likewise.
1985
1986 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1987
1988 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1989 *r_offset == r_addend for RELATIVE relocs against .got.
1990
1991 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1992
1993 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1994
1995 2003-06-17 Nick Clifton <nickc@redhat.com>
1996
1997 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1998 in the vtable_entries_used array to allow for the accessing
1999 the largest element.
2000
2001 2003-06-17 Alan Modra <amodra@bigpond.net.au>
2002
2003 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2004 input_list.
2005 (ppc64_elf_link_hash_table_create): Init input_list here.
2006 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2007 per output section. Set toc_off for abs and other standard sections.
2008 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2009 (ppc64_elf_next_input_section): Adjust for single input section list.
2010 Don't set toc_curr from input bfds that haven't set elf_gp.
2011 (group_sections): Adjust for single input section list.
2012
2013 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2014
2015 2003-06-16 Alan Modra <amodra@bigpond.net.au>
2016
2017 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2018 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2019 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2020 got section for RELATIVE relocs. Fix wrong comment. Change condition
2021 under which dynamic relocs update the section contents.
2022
2023 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
2024
2025 * config.bfd: Add i386-netbsd-gnu target.
2026
2027 2003-06-12 Nick Clifton <nickc@redhat.com>
2028
2029 * opncls.c (calc_crc32): Rename to
2030 bfd_calc_gnu_debuglink_crc32 and export.
2031 (GNU_DEBUGLINK): Define and use to replace occurrences of
2032 hard-coded ".gnu_debuglink" in the code.
2033 (get_debug_link_info): Prevent aborts by replacing call to
2034 xmalloc with a call to malloc.
2035 (find_separate_debug_file): Prevent aborts by replacing calls
2036 to xmalloc and xstrdup with calls to malloc and strdup.
2037 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
2038 section to a bfd.
2039 * bfd-in2.h: Regenerate.
2040
2041 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
2042
2043 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2044 New target (was i[3-7]86-*-openbsd* before).
2045 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2046 (vax-*-openbsd*): New target.
2047
2048 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2049
2050 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2051 for n32, too.
2052 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2053 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2054 (mips_elf_create_got_section): Likewise.
2055 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2056
2057 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2058
2059 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2060 (elf_mips_howto_table_rel): Use it.
2061 (gprel32_with_gp): Move prototype.
2062 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2063 Use mips_elf_generic_reloc.
2064 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2065 Code cleanup.
2066 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2067 zero addend.
2068 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2069 as in the other *_gprel*_reloc functions.
2070 (gprel32_with_gp): Handle partial_inplace properly.
2071 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2072 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2073 Do addend handling directly instead of calling
2074 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2075 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2076 of zero addend. Handle partial_inplace properly.
2077 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2078 addend.
2079 (mips_elf64_gprel16_reloc): Likewise.
2080 (mips_elf64_literal_reloc): Likewise.
2081 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2082 logic as in the other *_gprel*_reloc functions. Handle
2083 partial_inplace properly.
2084 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2085 addend. Handle partial_inplace properly.
2086 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2087 of calling _bfd_mips_elf_gprel16_with_gp.
2088 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2089 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2090 of zero addend.
2091 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2092 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2093 of calling _bfd_mips_elf_gprel16_with_gp.
2094 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2095 partial_inplace properly. Fix wrong addend handling. Fix overflow
2096 check.
2097 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2098 exported.
2099 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2100 (_bfd_mips_elf_relocate_section): Likewise.
2101 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2102 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2103 (_bfd_mips_elf_sign_extend): New prototype.
2104
2105 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
2106
2107 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2108 New target (was sparc-*-openbsd* before).
2109 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
2110
2111 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2112 * configure: Regenerate.
2113
2114 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2115
2116 * po/Make-in (DESTDIR): New.
2117 (install-data-yes): Support $(DESTDIR).
2118 (uninstall): Likewise.
2119
2120 2003-06-11 Alan Modra <amodra@bigpond.net.au>
2121
2122 * Makefile.am (config.status): Depend on version.h.
2123 Run "make dep-am".
2124 * Makefile.in: Regenerate.
2125 * po/SRC-POTFILES.in: Regenerate.
2126
2127 2003-06-10 Alan Modra <amodra@bigpond.net.au>
2128 Gary Hade <garyhade@us.ibm.com>
2129
2130 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2131
2132 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
2133
2134 * archures.c (bfd_mach_h8300sxn): New architecture.
2135 * bfd-in2.h: Regenerate.
2136 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2137 (h8300sxn_info_struct): New.
2138 (h8300sx_info_struct): Link to it.
2139 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2140 (elf32_h8_final_write_processing): Likewise.
2141
2142 2003-06-08 Alan Modra <amodra@bigpond.net.au>
2143
2144 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2145 elfxx-target.h so that we can use elf_backend_got_header_size.
2146 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2147 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2148 associated macros.
2149 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2150 dst_mask.
2151 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2152 ppc_stub_plt_branch_r2off.
2153 (struct ppc_stub_hash_entry): Reorganize.
2154 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2155 toc_curr, toc_off and emit_stub_syms.
2156 (ppc64_elf_link_hash_table_create): Init them.
2157 (ppc_stub_name): Correct string size.
2158 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2159 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2160 used.
2161 (ppc_type_of_stub): Tweak root.type test.
2162 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2163 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2164 ppc_stub_plt_branch_r2off.
2165 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2166 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2167 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2168 Initialize elf_gp and toc_curr.
2169 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2170 (ppc64_elf_next_input_section): Set toc_off.
2171 (group_sections): Ensure groups have the same TOC.
2172 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2173 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2174 Build new glink stub.
2175 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2176 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2177 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2178 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2179 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2180 (STD_SECTION): Update.
2181 * ecoff.c (bfd_debug_section): Update comment.
2182 * bfd-in2.h: Regenerate.
2183
2184 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2185
2186 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2187 NULL function pointers.
2188
2189 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
2190
2191 * simple.c (bfd_simple_get_relocated_section_contents): Call
2192 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2193
2194 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2195
2196 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2197 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2198 swaptables.
2199 * coff-tic4x.c: Ditto
2200 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2201 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
2202 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2203 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2204 swap tables.
2205 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2206 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2207 * coff-apollo.c: Ditto
2208 * coff-arm.c: Ditto
2209 * coff-h8300.c: Ditto
2210 * coff-h8500.c: Ditto
2211 * coff-i960.c: Ditto
2212 * coff-m68k.c: Ditto
2213 * coff-m88k.c: Ditto
2214 * coff-mcore.c: Ditto
2215 * coff-sh.c: Ditto
2216 * coff-sparc.c: Ditto
2217 * coff-tic80.c: Ditto
2218 * coff-we32k.c: Ditto
2219 * coff-z8k.c: Ditto
2220 * coff-w65.c: Ditto
2221
2222 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2223
2224 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2225 initialization bug
2226
2227 2003-06-03 Jakub Jelinek <jakub@redhat.com>
2228
2229 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2230 (bfd_section_from_phdr): Likewise.
2231 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2232 (get_program_header_size): Count with PT_GNU_STACK.
2233 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2234 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2235
2236 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2237
2238 * elflink.h (elf_link_input_bfd): Call linker error_handler
2239 for discarded definitions.
2240
2241 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2242
2243 * syms.c (decode_section_type): Return 'n' if section flags are
2244 SEC_HAS_CONTENTS && SEC_READONLY.
2245
2246 2003-06-03 Nick Clifton <nickc@redhat.com>
2247
2248 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2249 R_V850_ABS32. Add entry for R_V850_REL32.
2250 (v850_elf_reloc_map): Likewise.
2251 (v850_elf_check_relocs): Likewise.
2252 (v850_elf_perform_relocation): Likewise.
2253 (v850_elf_final_link_relocate): Likewise. Include computation
2254 to make R_V850_REl32 pc-relative.
2255
2256 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2257
2258 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2259 and DT_DEBUG dynamic tag even for position independent executables.
2260 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2261
2262 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2263
2264 * config.bfd: Move obsolete entries out of the range of the
2265 targmatch sed script.
2266
2267 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
2268
2269 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2270
2271 2003-05-31 Jakub Jelinek <jakub@redhat.com>
2272
2273 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2274 plt entries, not just 8191.
2275
2276 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
2277
2278 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2279 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2280
2281 2003-05-30 Ulrich Drepper <drepper@redhat.com>
2282 Jakub Jelinek <jakub@redhat.com>
2283
2284 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2285 instead of info->shared where appropriate.
2286 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2287 * elflink.c (_bfd_elf_create_got_section): Likewise.
2288 (_bfd_elf_link_create_dynamic_sections): Likewise.
2289 (_bfd_elf_link_assign_sym_version): Likewise.
2290 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2291 and DT_DEBUG dynamic tag even for position independent executables.
2292 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2293 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2294 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2295 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2296 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2297 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2298 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2299 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2300 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2301
2302 2003-05-30 Kris Warkentin <kewarken@qnx.com>
2303
2304 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2305 signalled thread.
2306 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2307
2308 2003-05-29 Nick Clifton <nickc@redhat.com>
2309
2310 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2311 Tidy up formatting.
2312 * Makefile.am: Add dependency on safe-ctype.h.
2313 * Makefile.in: Regenerate.
2314
2315 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2316
2317 * elfxx-mips.c: Don't force symbols local unconditionally.
2318
2319 2003-05-28 Alan Modra <amodra@bigpond.net.au>
2320
2321 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2322 undefined_symbol call.
2323
2324 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
2325
2326 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2327 (mips_elf_link_hash_table): Likewise.
2328
2329 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2330
2331 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2332 R_MIPS_GNU_REL16_S2 support.
2333 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2334 (mips_elf64_rtype_to_howto): Use it.
2335 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2336 R_MIPS_GNU_REL16_S2 support.
2337 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2338 (mips_elf_n32_rtype_to_howto): Use it.
2339
2340 2003-05-21 Stuart F. Downing <sdowning@fame.com>
2341
2342 * som.h: Define PA_2_0 before including a.out.h
2343
2344 2003-05-07 Eric Christopher <echristo@redhat.com>
2345 Alexandre Oliva <aoliva@redhat.com>
2346
2347 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2348 pic tests, change to warning.
2349 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2350
2351 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2352
2353 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2354 well as shle-...-netbsdelf. Remove duplicate entry.
2355
2356 2003-05-21 Nick Clifton <nickc@redhat.com>
2357
2358 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2359 for X_STORMY16_REL_12 reloc.
2360
2361 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
2362 the type of the hash table in the bfd_link_info structure.
2363 (bfd_elf_get_runpath_list): Likewise.
2364
2365 2003-05-19 Roland McGrath <roland@redhat.com>
2366
2367 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2368 * bfd-in.h: Declare it.
2369 * bfd-in2.h: Regenerated.
2370 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2371 * elf-bfd.h (struct elf_backend_data): New function pointer member
2372 elf_backend_bfd_from_remote_memory.
2373 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2374 Declare them.
2375 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2376 (elfNN_bed): Add that to the initializer.
2377
2378 2003-05-15 Roland McGrath <roland@redhat.com>
2379
2380 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2381
2382 2003-05-20 Jakub Jelinek <jakub@redhat.com>
2383
2384 * elflink.h (elf_link_output_extsym): Only issue error about !=
2385 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2386
2387 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2388
2389 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2390 when removing the old definition for symbols with non-default
2391 visibility.
2392
2393 2003-05-18 Jason Eckhardt <jle@rice.edu>
2394
2395 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2396
2397 2003-05-17 Andreas Schwab <schwab@suse.de>
2398
2399 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2400 elf_section_data during processing of pc-relative and absolute
2401 relocations.
2402 (elf_m68k_relocate_section): Use the cached reloc section instead
2403 of computing it again. Fix handling of visibility. Don't modify
2404 addend when copying over a relocation into the output.
2405
2406 2003-05-17 Alan Modra <amodra@bigpond.net.au>
2407
2408 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2409 to trim plt entries. Move undefweak non-default visibility test..
2410 (allocate_dynrelocs): ..from here.
2411 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2412 dynamic_sections_created here. Update comment. Move undefweak
2413 non-default visibility test..
2414 (allocate_dynrelocs): ..from here. Fix comment.
2415 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2416 to trim plt entries. Move undefweak non-default visibility test..
2417 (allocate_dynrelocs): ..from here. Fix comment.
2418 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2419 STV_DEFAULT rather than comparing with zero.
2420 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2421 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2422
2423 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2424
2425 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2426 pointers.
2427 (_bfd_set_gp_value): Likewise.
2428
2429 2003-05-16 Michael Snyder <msnyder@redhat.com>
2430 From Bernd Schmidt <bernds@redhat.com>
2431 * archures.c (bfd_mach_h8300sx): New.
2432 * bfd-in2.h: Regenerate.
2433 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2434 (h8300sx_info_struct): New.
2435 (h8300s_info_struct): Link to it.
2436 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2437 (elf32_h8_final_write_processing): Likewise.
2438 (elf32_h8_relax_section): Likewise.
2439
2440 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2441
2442 * config.bfd: Accept i[3-7]86 variants.
2443 * configure.host: Likewise.
2444 * configure.in: Likewise.
2445 * configure: Regenerate.
2446
2447 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2448
2449 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2450 symbol.
2451
2452 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2453
2454 * elflink.h (elf_link_check_versioned_symbol): Also allow
2455 the base version.
2456
2457 2003-05-15 Alan Modra <amodra@bigpond.net.au>
2458 H.J. Lu <hongjiu.lu@intel.com>
2459
2460 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2461 (elf_i386_relocate_section): Likewise.
2462 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2463 (ppc_elf_relocate_section): Likewise.
2464 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2465 (ppc64_elf_relocate_section): Likewise.
2466
2467 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2468
2469 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2470
2471 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2472
2473 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2474 processor capability, allow merge of HC12 and HCS12 in some cases.
2475 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2476 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2477 (bfd_m68hc12_arch): Link it.
2478 (scan_mach): New function.
2479
2480 2003-05-13 Andrew Haley <aph@redhat.com>
2481
2482 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2483
2484 2003-05-13 Alan Modra <amodra@bigpond.net.au>
2485 H.J. Lu <hongjiu.lu@intel.com>
2486
2487 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2488 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2489 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2490 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2491 (ppc_elf_relocate_section): Likewise.
2492 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2493 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2494 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2495 relocs need no other types.
2496 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2497 dynreloc check.
2498 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2499 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2500 .got relocs.
2501
2502 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2503
2504 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2505 copy ELF_LINK_NON_GOT_REF from weakdef.
2506 (allocate_dynrelocs): For undef weak syms with non-default
2507 visibility, a) don't allocate plt entries, b) don't allocate
2508 .got relocs, c) discard dyn rel space
2509 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2510 don't generate dynamic relocs.
2511 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2512 for weakdefs when symbol already adjusted.
2513
2514 2003-05-12 Nick Clifton <nickc@redhat.com>
2515
2516 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2517 overflow detection for R_XSTORMY16_16 reloc.
2518
2519 2003-05-12 Paul Clarke <paulc@senet.com.au>
2520
2521 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2522
2523 2003-05-11 Jason Eckhardt <jle@rice.edu>
2524
2525 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2526 adjust upper bits.
2527 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2528 proper place.
2529 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2530 proper place.
2531
2532 2003-05-11 Andreas Schwab <schwab@suse.de>
2533
2534 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2535 complicated tests for unresolvable relocs with a simple direct
2536 scheme using "unresolved_reloc" var. Report some detail on
2537 bfd_reloc_outofrange and similar errors.
2538
2539 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2540
2541 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2542 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2543 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2544 * elf64-s390.c: Likewise.
2545
2546 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2547
2548 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2549 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2550 ELF_LINK_NON_GOT_REF from weakdef.
2551 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2552 already been adjusted before treating it specially.
2553 * el64-s390.c: Likwise.
2554
2555 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2556
2557 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2558 non-default visibility, a) don't make them dynamic, b) discard
2559 space for dynamic relocs.
2560 (elf_s390_relocate_section): Initialize the GOT entries and skip
2561 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2562 symbols with non-default visibility.
2563 * elf64-s390.c: Likewise.
2564
2565 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2566
2567 * cpu-arm.c (arm_check_note): Warning fix.
2568 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2569 to keep relocs if edited.
2570 (iq2000_elf_print_private_bfd_data): Return TRUE.
2571 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2572 ELF64_R_SYM.
2573 (elfNN_ia64_relax_ldxmov): Warning fix.
2574 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2575 * xtensa-modules.c (get_num_opcodes): Warning fix.
2576
2577 2003-05-09 Andrey Petrov <petrov@netbsd.org>
2578
2579 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2580
2581 2003-05-09 Alan Modra <amodra@bigpond.net.au>
2582
2583 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2584 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2585 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2586 (bfd_elf_record_link_assignment): Move from elflink.h.
2587 (_bfd_elf_merge_symbol): Likewise.
2588 (_bfd_elf_add_default_symbol): Likewise.
2589 (_bfd_elf_export_symbol): Likewise.
2590 (_bfd_elf_link_find_version_dependencies): Likewise.
2591 (_bfd_elf_link_assign_sym_version): Likewise.
2592 (_bfd_elf_link_read_relocs): Likewise.
2593 (_bfd_elf_link_size_reloc_section): Likewise.
2594 (_bfd_elf_fix_symbol_flags): Likewise.
2595 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2596 (_bfd_elf_link_sec_merge_syms): Likewise.
2597 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2598 and bed->s->sizeof_rela.
2599 (_bfd_elf_link_output_relocs): Likewise.
2600 * elf-bfd.h (struct elf_size_info): Rename file_align to
2601 log_file_align.
2602 (struct elf_info_failed): Move from elflink.h.
2603 (struct elf_assign_sym_version_info): Likewise.
2604 (struct elf_find_verdep_info): Likewise.
2605 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2606 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2607 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2608 _bfd_elf_link_assign_sym_version,
2609 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2610 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2611 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2612 _bfd_elf_link_sec_merge_syms): Declare.
2613 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2614 (_bfd_elf32_link_read_relocs): Likewise.
2615 (bfd_elf64_link_create_dynamic_sections): Likewise.
2616 (_bfd_elf64_link_read_relocs): Likewise.
2617 * elflink.h: Move lots o' stuff elsewhere.
2618 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2619 (bfd_elf64_record_link_assignment): Likewise.
2620 (bfd_elf_record_link_assignment): Declare.
2621 * bfd-in2.h: Regenerate.
2622 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2623 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2624 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2625 (assign_file_positions_for_segments): Likewise.
2626 (assign_file_positions_except_relocs): Likewise.
2627 (swap_out_syms, elfcore_write_note): Likewise.
2628 * elf-m10200.c: Adjust for changed function names.
2629 * elf-m10300.c: Likewise.
2630 * elf32-arm.h: Likewise.
2631 * elf32-h8300.c: Likewise.
2632 * elf32-hppa.c: Likewise.
2633 * elf32-ip2k.c: Likewise.
2634 * elf32-m32r.c: Likewise.
2635 * elf32-m68hc11.c: Likewise.
2636 * elf32-m68hc1x.c: Likewise.
2637 * elf32-m68k.c: Likewise.
2638 * elf32-mips.c: Likewise.
2639 * elf32-ppc.c: Likewise.
2640 * elf32-sh.c: Likewise.
2641 * elf32-v850.c: Likewise.
2642 * elf32-xtensa.c: Likewise.
2643 * elf64-alpha.c: Likewise.
2644 * elf64-hppa.c: Likewise.
2645 * elf64-mmix.c: Likewise.
2646 * elf64-ppc.c: Likewise.
2647 * elf64-sh64.c: Likewise.
2648 * elfxx-ia64.c: Likewise.
2649 * elfxx-mips.c: Likewise.
2650 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2651 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2652 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2653 * elf64-mips.c (mips_elf64_size_info): Likewise.
2654 * elf64-s390.c (s390_elf64_size_info): Likewise.
2655 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2656
2657 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2658
2659 * elflink.h (elf_add_default_symbol): After skipping the
2660 unversioned symbol, go to non-default one.
2661
2662 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2663
2664 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2665 want_plt field.
2666 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2667 for symbols with non-default visibility.
2668
2669 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2670
2671 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2672 case that a DSO references a hidden symbol which may be
2673 satisfied by a versioned symbol in another DSO.
2674 (elf_link_output_extsym): Check versioned definition for hidden
2675 symbol referenced by a DSO.
2676
2677 2003-05-07 Nick Clifton <nickc@redhat.com>
2678
2679 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2680 R_XSTORMY16_16 reloc to ignore overflows.
2681
2682 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
2683
2684 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2685 error message for mixing different-endian files. Check for ABI
2686 compatibility of input files with the selected emulation.
2687
2688 2003-05-05 Alan Modra <amodra@bigpond.net.au>
2689
2690 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2691 non-default visibility, a) don't make them dynamic, b) discard
2692 space for dynamic relocs.
2693 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2694
2695 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2696 non-default visibility, a) don't allocate plt entries, b) don't
2697 allocate .got relocs, c) discard dyn rel space,
2698 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2699 don't generate dynamic relocs.
2700 * elf64-ppc.c (allocate_dynrelocs): As above.
2701 (ppc64_elf_relocate_section): As above.
2702
2703 2003-05-05 Andreas Jaeger <aj@suse.de>
2704
2705 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2706 relocation entries for weak undefined symbols with non-default
2707 visibility.
2708 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2709 skip R_386_32/R_386_PC32 for weak undefined symbols with
2710 non-default visibility.
2711
2712 2003-05-04 H.J. Lu <hjl@gnu.org>
2713
2714 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2715 relocation entries for weak undefined symbols with non-default
2716 visibility.
2717 (elf_i386_relocate_section): Initialize the GOT entries and
2718 skip R_386_32/R_386_PC32 for weak undefined symbols with
2719 non-default visibility.
2720
2721 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2722 descriptors for weak undefined symbols with non-default
2723 visibility.
2724 (allocate_dynrel_entries): Don't allocate relocation entries
2725 for symbols resolved to 0.
2726 (set_got_entry): Don't install dynamic relocation for weak
2727 undefined symbols with non-default visibility.
2728 (set_pltoff_entry): Likewise.
2729
2730 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2731 with non-default visibility.
2732 (elf_link_output_extsym): Don't make weak undefined symbols
2733 with non-default visibility dynamic.
2734
2735 2003-05-04 H.J. Lu <hjl@gnu.org>
2736
2737 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2738
2739 2003-05-04 H.J. Lu <hjl@gnu.org>
2740
2741 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2742 symbol dynamic. Check indirection when removing the old
2743 definition for symbols with non-default visibility.
2744 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2745
2746 2003-05-02 Nick Clifton <nickc@redhat.com>
2747
2748 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2749 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2750 unsigned overflow.
2751
2752 2003-05-02 Andreas Jaeger <aj@suse.de>
2753
2754 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2755 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2756 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2757 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2758 ELF_LINK_NON_GOT_REF from weakdef.
2759
2760 2003-05-02 Charles Lepple <clepple@ghz.cc>
2761 Nick Clifton <nickc@redhat.com>
2762
2763 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2764 * aclocal.m4: Regenerate.
2765 * configure: Regenerate.
2766 * Makefile.in: Regenerate.
2767
2768 2003-05-01 Alan Modra <amodra@bigpond.net.au>
2769
2770 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2771 weakdef sym has already been adjusted before treating it specially.
2772 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2773 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2774 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2775 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
2776
2777 2003-04-28 H.J. Lu <hjl@gnu.org>
2778
2779 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2780 the relax finalize pass.
2781
2782 * section.c (struct sec): Add need_finalize_relax and remove
2783 flag11.
2784 (STD_SECTION): Update struct sec initializer.
2785 * bfd-in2.h: Regenerated.
2786
2787 2003-04-28 H.J. Lu <hjl@gnu.org>
2788
2789 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2790 to copy any information related to dynamic linking when we flip
2791 the indirection.
2792
2793 2003-04-27 H.J. Lu <hjl@gnu.org>
2794
2795 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2796 (ELF_LINK_DYNAMIC_WEAK): New.
2797
2798 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2799 a symbol should be skipped. Ignore definitions in dynamic
2800 objects for symbols with non-default visibility.
2801 (elf_add_default_symbol): Adjusted.
2802 (elf_link_add_object_symbols): Check if a symbol should be
2803 skipped. Don't merge the visibility field with the one from
2804 a dynamic object.
2805 (elf_link_check_versioned_symbol): Use undef_bfd.
2806 (elf_link_output_extsym): Warn if a forced local symbol is
2807 referenced from dynamic objects. Make non-weak undefined symbol
2808 with non-default visibility a fatal error.
2809
2810 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
2811
2812 * configure.in: Bump version on HEAD to 2.14.90.
2813 * configure: Regenerated.
2814
2815 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2816
2817 PR savannah/3331:
2818 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2819 when we couldn't relax something.
2820
2821 2003-04-25 Alan Modra <amodra@bigpond.net.au>
2822
2823 * elflink.h (elf_merge_symbol): When we find a regular definition
2824 for an indirect symbol, flip the indirection so that the old
2825 direct symbol now points to the new definition.
2826
2827 2003-04-24 Roland McGrath <roland@redhat.com>
2828
2829 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2830
2831 2003-04-24 Alan Modra <amodra@bigpond.net.au>
2832
2833 * elf32-ppc.c: Formatting and comment fixes.
2834 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2835 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2836
2837 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
2838
2839 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2840 * bfd-in2.h: Rebuilt.
2841 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
2842 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
2843 & H8300SNMAGIC.
2844 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2845 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2846 (h8300sn_info_struct, h8300hn_info_struct): New.
2847 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2848 (elf32_h8_final_write_processing): Likewise.
2849
2850 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2851
2852 * elf32-sh.c (tpoff): New.
2853 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2854 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2855 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
2856 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
2857 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
2858 (dtpoff_base): Fix wrong indentation.
2859 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2860 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2861 R_SH_TLS_TPOFF32 relocations.
2862
2863 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2864
2865 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2866 * cpu-sh.c: Likewise.
2867 * elf32-sh.c: Likewise.
2868 * reloc.c (bfd_reloc_code_real): Likewise.
2869 * elf32-sh64-com.c: Change comment to refer to SuperH.
2870 * elf32-sh64.c: Likewise.
2871 * elf64-sh64.c: Likewise.
2872 * bfd-in2.h (enum bfd_architecture): Regenerate.
2873
2874 2003-04-23 Alan Modra <amodra@bigpond.net.au>
2875
2876 From Julien LEMOINE <speedblue@debian.org>
2877 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2878 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2879
2880 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2881
2882 * archures.c: Replace references to Mitsubishi M32R with references
2883 to Renesas M32R.
2884 * relocs.c: Likewise.
2885 * bfd-in2.h: Regenerate.
2886
2887 2003-04-21 Richard Henderson <rth@redhat.com>
2888
2889 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2890 executable when a symbol is defined both regular and dynamic.
2891
2892 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2893
2894 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2895 (elf32-m68hc1x.lo): Update dependencies
2896 * configure.in: Add elf32-m68hc1x.lo.
2897 * configure: Rebuild.
2898 * Makefile.in: Rebuild.
2899
2900 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2901
2902 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2903 (m68hc11_elf_hash_table_create): New function.
2904 (elf32_m68hc11_link_hash_table_free): New function.
2905 (stub_hash_newfunc): New function.
2906 (m68hc11_add_stub): New function.
2907 (elf32_m68hc11_add_symbol_hook): New function.
2908 (elf32_m68hc11_setup_section_lists): New function.
2909 (elf32_m68hc11_next_input_section): New function.
2910 (elf32_m68hc11_size_stubs): New function.
2911 (elf32_m68hc11_build_stubs): New function.
2912 (m68hc11_get_relocation_value): New function.
2913 (elf32_m68hc11_relocate_section): Call the above to redirect
2914 some relocations to the trampoline code.
2915 (m68hc11_elf_export_one_stub): New function.
2916 (m68hc11_elf_set_symbol): New function.
2917 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2918 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2919 is not yet initialized.
2920
2921 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2922 (elf32_m68hc11_stub_hash_entry): New struct.
2923 (m68hc11_page_info): Add trampoline handler address.
2924 (m68hc11_elf_link_hash_table): Add stubs generation members.
2925 (elf32_m68hc11_add_symbol_hook): Declare.
2926 (elf32_m68hc11_setup_section_lists): Declare.
2927 (elf32_m68hc11_size_stubs): Declare.
2928 (elf32_m68hc11_build_stubs): Declare.
2929
2930 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2931 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2932 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2933 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2934 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2935 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2936 (bfd_elf32_bfd_link_hash_table_create): Define.
2937 (elf_backend_add_symbol_hook): Define.
2938 (m68hc11_elf_bfd_link_hash_table_create): New function.
2939 (m68hc11_elf_build_one_stub): New function.
2940 (m68hc11_elf_size_one_stub): New function.
2941 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2942 (bfd_elf32_bfd_link_hash_table_create): Define.
2943
2944 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2945 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2946 (m68hc12_phys_addr): Ditto.
2947 (m68hc12_phys_page): Ditto.
2948 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2949 (elf32_m68hc11_gc_mark_hook): Likewise.
2950 (elf32_m68hc11_gc_sweep_hook): Likewise.
2951 (elf32_m68hc11_check_relocs): Likewise.
2952 (elf32_m68hc11_relocate_section): Likewise.
2953 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2954 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2955 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2956 (m68hc12_elf_build_one_stub): New function.
2957 (m68hc12_elf_size_one_stub): New function.
2958 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2959 (elf_backend_add_symbol_hook): Define.
2960 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2961
2962 2003-04-18 Nick Clifton <nickc@redhat.com>
2963
2964 * format.c (bfd_check_format_matches): Only check associated
2965 vector if the matching_vector has been created.
2966
2967 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2968
2969 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2970 2003-04-09's change.
2971
2972 2003-04-15 Brian Ford <ford@vss.fsi.com>
2973
2974 * peicode.h (coff_swap_scnhdr_in): If a section holds
2975 uninitialized data and is from an object file or from an
2976 executable image that has not initialized the s_size field, or if
2977 the physical size is padded, use the virtual size (stored in
2978 s_paddr) instead.
2979
2980 2003-04-15 H.J. Lu <hjl@gnu.org>
2981
2982 * elflink.h (elf_link_add_object_symbols): Properly report
2983 filename for alignment reduction.
2984
2985 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2986
2987 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2988 * reloc.c: Likewise.
2989 * coff-h8300.c: Likewise.
2990 * coff-h8500.c: Likewise.
2991 * coff-sh.c: Likewise.
2992 * cpu-h8300.c: Likewise.
2993 * cpu-sh.c: Likewise.
2994 * elf32-h8300.c: Likewise.
2995 * elf32-sh.c: Likewise.
2996 * elf32-sh64-com.c: Likewise.
2997 * elf32-sh64.c: Likewise.
2998 * elf64-sh64.c: Likewise.
2999 * bfd-in2.h: Regenerate.
3000
3001 2003-04-14 H.J. Lu <hjl@gnu.org>
3002
3003 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3004 alignment for common symbols. Warn reducing alignment for
3005 common symbols. Report old filename when symbol size changes.
3006
3007 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
3008
3009 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3010 occurrences of the same test changed in the previous patch.
3011 Optimize.
3012
3013 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
3014
3015 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3016 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3017 GOT_DISP/addend only if the symbol got a global GOT entry.
3018
3019 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
3020
3021 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3022 GOT_PAGE/GOT_OFST referencing overridable symbol to
3023 GOT_DISP/addend.
3024 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3025 global symbol as GOT_DISP.
3026
3027 2003-04-10 Bob Wilson <bob.wilson@acm.org>
3028
3029 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3030 next relocation on an undefined symbol.
3031
3032 2003-04-09 Richard Henderson <rth@redhat.com>
3033
3034 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3035 Ignore relocations against r_symndx == 0.
3036
3037 2003-04-09 H.J. Lu <hjl@gnu.org>
3038
3039 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3040 FALSE for undefined symbols.
3041 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3042
3043 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
3044
3045 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3046 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3047 addr_size.
3048
3049 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
3050
3051 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3052 pointer size from ABI, not arch_bits_per_address.
3053
3054 2003-04-07 Kevin Buettner <kevinb@redhat.com>
3055
3056 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3057 constants for n32 ABI.
3058
3059 2003-04-06 Andrew Cagney <cagney@redhat.com>
3060
3061 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3062 free that leads to GDB vs BFD memory corruption.
3063
3064 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3065
3066 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3067 symbols that mark the end of the section.
3068 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3069 converting to a relative branch so that the offset is computed after
3070 the relaxation; also relocate a jsr into a bsr if possible but don't
3071 relax them if they are to a far symbol as we need to call the
3072 trampoline code.
3073 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3074
3075 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3076
3077 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3078 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3079 * bfd-in2.h: Regenerate
3080 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3081 * cpu-tic4x.c: Ditto
3082
3083 2003-04-03 Nick Clifton <nickc@redhat.com>
3084
3085 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3086 differently for object files and executables.
3087 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3088 for object files or for executables who have not already
3089 initialised the field.
3090 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3091 the PE format bfd is an executable.
3092
3093 2003-04-03 Alan Modra <amodra@bigpond.net.au>
3094
3095 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3096 here as it's too early to reliably determine locality.
3097 (ppc_elf_gc_sweep_hook): Likewise.
3098 (SYMBOL_REFERENCES_LOCAL): Expand comment.
3099
3100 2003-04-02 Bob Wilson <bob.wilson@acm.org>
3101
3102 * xtensa-modules.c: Remove comment indicating that this is a
3103 generated file.
3104
3105 2003-04-02 Alan Modra <amodra@bigpond.net.au>
3106
3107 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3108
3109 2003-04-01 Bob Wilson <bob.wilson@acm.org>
3110
3111 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3112 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3113 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3114 xtensa-modules.lo.
3115 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3116 xtensa-modules.c.
3117 (cpu-xtensa.lo): New target.
3118 (elf32-xtensa.lo): Likewise.
3119 (xtensa-isa.lo): Likewise.
3120 (xtensa-modules.lo): Likewise.
3121 * Makefile.in: Regenerate.
3122 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3123 (bfd_archures_list): Add bfd_xtensa_arch.
3124 * config.bfd: Handle xtensa-*-*.
3125 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3126 * configure: Regenerate.
3127 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3128 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3129 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3130 (bfd_elf32_xtensa_le_vec): Likewise.
3131 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3132 * cpu-xtensa.c: New file.
3133 * elf32-xtensa.c: Likewise.
3134 * xtensa-isa.c: Likewise.
3135 * xtensa-modules.c: Likewise.
3136 * libbfd.h: Regenerate.
3137 * bfd-in2.h: Likewise.
3138
3139 2003-04-01 Nick Clifton <nickc@redhat.com>
3140
3141 * archures.c (bfd_mach_arm_unknown): Define.
3142 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3143 bfd_arm_get_mach_from_notes): Prototype.
3144 * bfd-in2.h: Regenerate.
3145 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3146 bfd_arm_merge_machines.
3147 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3148 * coffcode.h (coff_set_arch_mach_hook): Call
3149 bfd_arm_get_mach_from_notes.
3150 * coffgen.c (coff_real_object_p): Revert previous delta.
3151 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3152 .note section.
3153 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3154 binaries compiled for different architectures..
3155 (bfd_arm_update_notes): New function: Update an ARM note section.
3156 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3157 number from an ARM note section.
3158 * elf32-arm.h (elf32_arm_object_p): Use
3159 bfd_arm_get_mach_from_notes.
3160 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3161 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
3162
3163 2003-04-01 Ben Elliston <bje@wasabisystems.com>
3164
3165 * dwarf2.c (read_attribute_value): Correct typo in comment.
3166
3167 2003-04-01 Nick Clifton <nickc@redhat.com>
3168
3169 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3170 instead of concat().
3171 (decode_line_info): Only free filename if it is not NULL.
3172 (add_line_info): Make a copy of the filename when storing it into
3173 the info structure.
3174
3175 2003-03-31 Andreas Schwab <schwab@suse.de>
3176 Daniel Jacobowitz <drow@mvista.com>
3177
3178 * simple.c (bfd_simple_get_relocated_section_contents): Add
3179 parameter symbol_table. Optionally use it instead of the symbol
3180 table from the bfd. Save and restore output offsets and output
3181 sections around bfd_get_relocated_section_contents. Fix a memory
3182 leak.
3183 (simple_save_output_info, simple_restore_output_info): New
3184 functions.
3185 * bfd-in2.h: Regenerate.
3186 * dwarf2.c (read_abbrevs): Use
3187 bfd_simple_get_relocated_section_contents instead of
3188 bfd_get_section_contents.
3189 (decode_line_info): Likewise.
3190 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3191 find_rela_addend.
3192 (find_rela_addend): Remove.
3193 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3194 debugging sections.
3195 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3196 not bfd_zalloc.
3197
3198 2003-03-31 David Heine <dlheine@suif.stanford.edu>
3199
3200 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3201 bfd_alloc.
3202 * dwarf2.c (concat_filename): Always allocate space for the
3203 returned filename.
3204 (decode_line_info): Free the allocated filename returned by
3205 concat_filename.
3206 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3207 * elf.c (copy_private_bfd_data): Likewise.
3208 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3209 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3210 * format.c (bfd_check_format_matches): Likewise.
3211 * linker.c (bfd_generic_final_link): Likewise.
3212 * opncls.c (find_separate_debug_info): Likewise.
3213 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
3214
3215 2003-03-28 H.J. Lu <hjl@gnu.org>
3216
3217 * elflink.h (elf_link_add_object_symbols): Correctly combine
3218 visibilities.
3219
3220 2003-03-27 Jakub Jelinek <jakub@redhat.com>
3221
3222 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3223 to -1 before recomputing got offsets.
3224
3225 2003-03-26 Andreas Schwab <schwab@suse.de>
3226
3227 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3228 (elf_m68k_relocate_section): Use it to correctly handle symbols
3229 forced to be local.
3230 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3231 entries for symbols that are forced to be local.
3232
3233 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
3234
3235 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3236 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3237 * elfn32-mips.c, elf64-mips.c: Use it.
3238
3239 2003-03-25 Stan Cox <scox@redhat.com>
3240 Nick Clifton <nickc@redhat.com>
3241
3242 Contribute support for Intel's iWMMXt chip - an ARM variant:
3243
3244 * archures.c: Add bfd_mach_arm_iWMMXt.
3245 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3246 * bfd-in2.h: Regenerate.
3247 * libbfd.h: Regenerate.
3248 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3249 object files to be linked with XScale ones.
3250 (coff_arm_final_link_postscript): Update note section.
3251 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3252 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3253 after identifying a coff binary.
3254 * cpu-arm.c (processors): Add iWMMXt.
3255 (arch_inf): Likewise.
3256 * elf32-arm.h (arm_object_p): Handle note section.
3257 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
3258 be linked with XScale ones.
3259 (elf32_arm_section_flags): New function: Set flags on note section.
3260 (elf32_arm_final_write_processing): Handle note section.
3261
3262 2003-03-21 DJ Delorie <dj@redhat.com>
3263
3264 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3265 _bfd_elf_rela_local_sym.
3266
3267 2003-03-20 H.J. Lu <hjl@gnu.org>
3268
3269 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3270 non-ELF outputs.
3271
3272 2003-03-20 Nick Clifton <nickc@redhat.com>
3273
3274 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3275 $idata5 in case bfd_coff_final_link is not called.
3276
3277 2003-03-19 Jakub Jelinek <jakub@redhat.com>
3278
3279 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3280 field.
3281 (canon_reloc_count): Define.
3282 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3283 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3284 reloc_count.
3285 (sparc64_elf_canonicalize_reloc): New routine.
3286 (bfd_elf64_canonicalize_reloc): Define.
3287
3288 2003-03-18 Jakub Jelinek <jakub@redhat.com>
3289
3290 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3291 againt mergeable sections. Take r_addend into account when caching
3292 trampolines.
3293
3294 2003-03-18 Richard Henderson <rth@redhat.com>
3295
3296 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3297 local symbols that have no dyninfo.
3298
3299 2003-03-14 Gene Smith <gene.smith@siemens.com>
3300
3301 * ieee.c (ieee_write_expression): Handle the case where symbol is
3302 NULL.
3303 General formatting improvements.
3304
3305 2003-03-13 Nick Clifton <nickc@redhat.com>
3306
3307 * configure.in (LINGUAS): Add zh_CN.
3308 * configure: Regenerate.
3309 * po/zh_CN.po: New file.
3310
3311 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3312
3313 * aout-cris.c (BYTES_IN_WORD): Don't define.
3314 aout-encap.c: Likewise.
3315 aout-ns32k.c: Likewise.
3316 aout-tic30.c: Likewise.
3317 hp300bsd.c: Likewise.
3318 i386aout.c: Likewise.
3319 i386dynix.c: Likewise.
3320 i386linux.c: Likewise.
3321 i386lynx.c: Likewise.
3322 i386mach3.c: Likewise.
3323 m68k4knetbsd.c: Likewise.
3324 m68klinux.c: Likewise.
3325 m68klynx.c: Likewise.
3326 m68knetbsd.c: Likewise.
3327 m88kmach3.c: Likewise.
3328 mipsbsd.c: Likewise.
3329 newsos3.c: Likewise.
3330 sparclinux.c: Likewise.
3331 sparclynx.c: Likewise.
3332 sparcnetbsd.c: Likewise.
3333 vaxbsd.c: Likewise. Fix comment formatting.
3334
3335 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
3336
3337 * Reverted 2003-03-02's patch.
3338
3339 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3340 overridable.
3341 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3342 mips_elf64_get_dynamic_reloc_upper_bound,
3343 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3344 (bfd_elf64_get_canonicalize_reloc,
3345 bfd_elf64_get_dynamic_reloc_upper_bound,
3346 bfd_elf64_canonicalize_dynamic_reloc): Define.
3347 (mips_elf64_slurp_reloc_table): Support dynamic.
3348 (mips_elf64_slurp_one_reloc_table): Adjust.
3349
3350 2003-03-12 Nick Clifton <nickc@redhat.com>
3351
3352 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3353 'index' to 'offset' in test for zero value.
3354
3355 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
3356
3357 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3358 dynamic relocations pointing to local or section symbols, use the
3359 NULL symbol instead. Document the choice to not emit an
3360 additional R_MIPS_64 relocation.
3361
3362 2003-03-11 Alan Modra <amodra@bigpond.net.au>
3363
3364 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3365 zero index dynamic tls relocs generated for the GOT. Tidy code.
3366 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3367 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3368
3369 2003-03-07 Alan Modra <amodra@bigpond.net.au>
3370
3371 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3372 a tls_get_addr call.
3373
3374 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3375 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3376 ELF_LINK_NON_GOT_REF from weakdef.
3377 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3378 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3379 ELF_LINK_NON_GOT_REF from weakdef.
3380 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3381 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3382 ELF_LINK_NON_GOT_REF from weakdef.
3383
3384 2003-03-06 Jakub Jelinek <jakub@redhat.com>
3385 Andrew Haley <aph@redhat.com>
3386
3387 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3388 output is relocateable.
3389
3390 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3391
3392 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3393 R_COMMENT.
3394
3395 2003-03-06 Alan Modra <amodra@bigpond.net.au>
3396
3397 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3398 error messages.
3399 (ELIMINATE_COPY_RELOCS): Define to zero.
3400 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3401 TLSLD relocs. Report reloc types on a number of errors. Optimize
3402 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3403 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3404 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3405 calculating TLSLD relocs. Report reloc types on a number of errors.
3406 Don't capitalize error messages.
3407
3408 2003-03-03 H.J. Lu <hjl@gnu.org>
3409
3410 * elfxx-ia64.c (USE_BRL): Removed.
3411 (oor_ip): Removed.
3412
3413 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
3414
3415 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3416 relocation (no special function), and make it non-partial_inplace.
3417 (sh_elf_relax_section): When creating a bsr, use a consistent value
3418 no matter if the symbol is extern or not; set addend to -4.
3419 Don't swap load / non-load instructions for SH4.
3420 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3421 rather than if the symbol is external to determine if adjusting the
3422 offset makes sense. Adjust the addend too if appropriate.
3423 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3424 relocation.
3425
3426 2003-03-03 Nick Clifton <nickc@redhat.com>
3427
3428 * po/da.po: Installed latest translation.
3429
3430 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3431
3432 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3433 R_MIPS_PC16 to rightshift 2.
3434 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3435 (bfd_elf32_bfd_reloc_type_lookup): Support
3436 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3437 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3438 R_MIPS_PC16 to rightshift 2.
3439 (mips_elf64_howto_table_rela): Likewise.
3440 (mips_reloc_map): Map to rightshifted BFD reloc.
3441 * elfn32-mips.c: The same as in elf64-mips.c.
3442 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3443 (mips_elf_calculate_relocation): Handle rightshifted addends for
3444 R_MIPS_PC16.
3445 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3446 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3447 * libbfd.h: Regenerate.
3448 * bfd-in2.h: Regenerate.
3449
3450 2003-02-28 Richard Henderson <rth@redhat.com>
3451
3452 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3453 for ltoff22x relaxation.
3454
3455 2003-03-01 Alan Modra <amodra@bigpond.net.au>
3456
3457 * bfd-in.h (_bfd): Don't define.
3458 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3459 * syms.c: Likewise.
3460 * bfd-in2.h: Regenerate.
3461
3462 2003-02-27 Richard Henderson <rth@redhat.com>
3463
3464 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3465 (elfNN_ia64_check_relocs): Set it.
3466 (allocate_global_data_got): Check it.
3467 (allocate_local_got): Likewise.
3468 (allocate_dynrel_entries): Likewise.
3469 (elfNN_ia64_relax_ldxmov): New.
3470 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3471 (elfNN_ia64_choose_gp): Split out from ...
3472 (elfNN_ia64_final_link): ... here.
3473
3474 2003-02-27 Andrew Cagney <cagney@redhat.com>
3475
3476 * bfd.c (struct bfd): Rename "struct _bfd".
3477 * bfd-in.h: Update copyright.
3478 (struct bfd): Rename "struct _bfd".
3479 (_bfd): Define for backward compatibility.
3480 * bfd-in2.h: Regenerate.
3481
3482 2003-02-25 Alan Modra <amodra@bigpond.net.au>
3483
3484 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3485 and rel_hdr2 when initially counting input relocs rather than after
3486 creating output reloc sections.
3487 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3488 sizes.
3489
3490 * Makefile.am: Run "make dep-am".
3491 * Makefile.in: Regenerate.
3492
3493 2003-02-24 Kris Warkentin <kewarken@qnx.com>
3494
3495 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3496 (elfcore_grog_nto_note): New function.
3497 (elfcore_grog_nto_gregs): New function.
3498 (elfcore_grog_nto_status): New function.
3499
3500 2003-02-24 Alan Modra <amodra@bigpond.net.au>
3501
3502 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3503 section flags before concluding that we've already been called.
3504 Don't use register keyword.
3505 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3506 (_bfd_elf_create_linker_section): Formatting.
3507
3508 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3509
3510 * coff-h8300.c: Fix typo: intial -> initial.
3511 * coff-ppc.c: Likewise.
3512
3513 2003-02-20 Alan Modra <amodra@bigpond.net.au>
3514
3515 * elf32-ppc.c: Formatting.
3516 (allocate_dynrelocs): LD and GD relocs against the same sym need
3517 separate GOT entries.
3518 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3519 entries per symbol.
3520
3521 2003-02-19 Alan Modra <amodra@bigpond.net.au>
3522
3523 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3524 removal. Localize vars. Remove unnecessary dynobj test.
3525 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3526 of INFO.
3527 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3528 and optimize.
3529 (elf_i386_relocate_section): Likewise.
3530 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3531 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3532 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3533 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3534 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3535 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3536 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3537 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3538 Formatting.
3539
3540 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3541 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3542 test.
3543 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3544 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3545 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3546 and optimize. Use ELIMINATE_COPY_RELOCS.
3547 (ppc64_elf_relocate_section): Likewise.
3548
3549 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3550 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3551 (ELIMINATE_COPY_RELOCS): Define.
3552 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3553 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3554 (MUST_BE_DYN_RELOC): Define.
3555 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3556 and optimize. Trim dyn_relocs.
3557 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3558 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3559 track of pc_rel dyn relocs.
3560 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3561 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3562 allocate_dynrelocs. Don't recalculate "sec".
3563
3564 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3565
3566 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3567 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3568 on invalid LD relocs.
3569 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3570 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3571 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3572
3573 * elf32-ppc.h: New file.
3574 * elf32-ppc.c: Include elf32-ppc.h.
3575 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3576 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3577 Add "tls_mask" field.
3578 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3579 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3580 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3581 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3582 Make use of htab shortcuts throughout file.
3583 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3584 (ppc_elf_link_hash_table_create): Init new fields.
3585 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3586 (ppc_elf_howto_raw): Add tls relocs.
3587 (ppc_elf_reloc_type_lookup): Handle them.
3588 (ppc_elf_unhandled_reloc): New function.
3589 (ppc_elf_create_got): Stash got section pointer in hash table,
3590 return status. Make .rela.got too.
3591 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3592 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3593 NON_GOT_REF set. Don't allocate space in .plt here..
3594 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3595 not allocating plt entries unnecessarily. Allocate got entries here.
3596 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3597 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3598 "info" during allocate_dynrelocs hash traversal. Use htab section
3599 shortcuts rather than searching for named sections. Get rid of
3600 "plt" and "strip" booleans.
3601 (update_local_sym_info, bad_shared_reloc): New functions.
3602 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3603 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3604 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3605 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3606 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3607 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3608 relocs that might use a plt entry. Set NON_GOT_REF too.
3609 Enumerate all do-nothing relocs.
3610 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3611 tls relocs and all plt relocs.
3612 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3613 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3614 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3615 shortcuts.
3616 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3617 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3618 entries and got relocs here. Warn on non-zero got reloc addend.
3619 Split out branch taken/not taken reloc code into a separate switch
3620 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3621 Split out HA reloc adjustments to separate switch statement. Don't
3622 warn on reloc overflow if we've already warned about undefined.
3623 Don't rebuild sym name when reporting errors. Report all possible
3624 errors from _bfd_final_link_relocate.
3625 (bfd_elf32_bfd_final_link): Don't define.
3626
3627 2003-02-18 Alan Modra <amodra@bigpond.net.au>
3628
3629 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3630 rebuild sym name when reporting errors.
3631
3632 2003-02-17 Nick Clifton <nickc@redhat.com>
3633
3634 * elflink.h (elf_link_output_extsym): Only check
3635 allow_shlib_undefined for shared libraries.
3636 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3637 of allow_shlib_undefined.
3638 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3639 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3640 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3641 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3642 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3643 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3644 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3645 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3646 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3647 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3648 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3649 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3650 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3651 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3652 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3653 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3654
3655 2003-02-17 Nick Clifton <nickc@redhat.com>
3656
3657 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3658 address field to use in the comparison.
3659 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
3660
3661 2003-02-14 Bob Wilson <bob.wilson@acm.org>
3662
3663 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3664 backends when checking if the generic ELF target should be used.
3665
3666 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3667 outside of functions, treat values as absolute addresses.
3668
3669 * bfd.c: Change embedded documentation to use consistent indentation
3670 and to split up long lines. Change informal style of description
3671 for functions lacking real documentation.
3672 * coffcode.h: Break up long lines in embedded documentation.
3673 * format.c: Likewise.
3674 * targets.c: Likewise.
3675 * libcoff.h: Regenerate.
3676 * bfd-in2.h: Regenerate.
3677
3678 2003-02-14 Alan Modra <amodra@bigpond.net.au>
3679
3680 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3681 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3682 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3683 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3684 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3685 (group_sections): Don't share a stub section if stubs are for a large
3686 section. Adjust comment.
3687 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3688 !stubs_always_before_branch.
3689 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3690 treat undefined and undefweak specially when processing dyn relocs.
3691
3692 2003-02-13 Jakub Jelinek <jakub@redhat.com>
3693
3694 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3695
3696 2003-02-13 Nick Clifton <nickc@redhat.com>
3697
3698 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3699 in computation of offset to insert into BL instruction.
3700
3701 2003-02-11 Uwe Stieber <uwe@wwws.de>
3702
3703 * config.bfd: Add support for kaOS as cross build target system.
3704
3705 2003-02-11 Alan Modra <amodra@bigpond.net.au>
3706
3707 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3708 .__tls_get_addr too.
3709 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3710
3711 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3712
3713 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3714 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3715 (sh_elf_link_hash_newfunc): Remove the initialization of
3716 tls_tpoff32 field.
3717 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3718 for which tls_tpoff32 flag is set.
3719 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3720 of the symbol includes the entry matched with the input_section
3721 and having tls_tpoff32 flag on. When linking statically, set
3722 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3723 is defined in this executable.
3724 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3725
3726 2003-02-10 Jakub Jelinek <jakub@redhat.com>
3727
3728 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3729 even if there is just non-empty .rela.plt.
3730
3731 2003-02-10 Nick Clifton <nickc@redhat.com>
3732
3733 * archures.c (bfd_mach_arm_ep9312): Define.
3734 * bfd-in2.h: Regenerate.
3735 * cpu-arm.c (processors[]): Add ep9312.
3736 (bfd_arm_arch): Add ep9312.
3737 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3738 messages and add test for Maverick floating point support.
3739 (elf32_arm_print_private_bfd_data): Handle
3740 EF_ARM_MAVERICK_FLOAT flag.
3741 (elf32_arm_object_p): New function.
3742 (elf_backend_object_p): Define.
3743
3744 2003-02-10 Alan Modra <amodra@bigpond.net.au>
3745
3746 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3747 variables, structure fields or function params to tls_mask or
3748 similar to better reflect usage.
3749 (struct got_entry): Comment.
3750 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
3751 (get_tls_mask): Rename from get_tls_type.
3752
3753 2003-02-09 Alan Modra <amodra@bigpond.net.au>
3754
3755 * elf64-ppc.c (TLS_GD_LD): Don't define..
3756 (TLS_GD): ..define this instead and update all uses.
3757 (TLS_TPRELGD): Define.
3758 (ppc64_elf_link_hash_table_create): Tweak initialization of
3759 init_refcount and init_offset.
3760 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3761 Mark second slot of GD or LD toc entries.
3762 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3763 from other tls types.
3764 (ppc64_elf_tls_setup): New function, split out from..
3765 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3766 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3767 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3768 return value to properly decide whether toc GD and LD entries can
3769 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3770 to determine GD or LD rather than looking at TLS_LD flag. Don't
3771 attempt to adjust got entry tls_type here..
3772 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3773 look for possible merges.
3774 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3775 optimization.
3776 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3777 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3778 Make use of return value from get_tls_type to properly detect GD and
3779 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3780 handle tls_get_addr removal when looking at REL24 relocs, do it when
3781 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3782 GD or LD.
3783 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3784
3785 2003-02-08 Alan Modra <amodra@bigpond.net.au>
3786
3787 * elf32-hppa.c (group_sections): Don't share a stub section if
3788 stubs are for a large section.
3789
3790 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3791 stubs if !stubs_always_before_branch.
3792
3793 2003-02-07 Nick Clifton <nickc@redhat.com>
3794
3795 * elf.c (swap_out_syms): Generate an error message if an
3796 equivalent output section cannot be found for a symbol.
3797
3798 2003-02-07 Jakub Jelinek <jakub@redhat.com>
3799
3800 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3801 local_got_entries is NULL.
3802
3803 2003-02-06 Andreas Schwab <schwab@suse.de>
3804
3805 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3806 (read_value): Add parameter is_signed, use signed extraction if
3807 the value is signed.
3808 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3809 encoding to read_value.
3810
3811 2003-02-06 Alan Modra <amodra@bigpond.net.au>
3812
3813 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3814 plt info when called to transfer weak sym info.
3815
3816 2003-02-05 Alan Modra <amodra@bigpond.net.au>
3817
3818 * reloc.c: Add PPC and PPC64 TLS relocs.
3819 * libbfd.h: Regenerate.
3820 * bfd-in2.h: Regenerate.
3821 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3822 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3823 against a 32 bit field.
3824 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3825 (_ppc64_elf_section_data): Add t_symndx and comments.
3826 (ppc64_elf_section_data): Use elf_section_data macro.
3827 (ppc64_elf_new_section_hook): American spelling.
3828 (struct got_entry, struct plt_entry): New.
3829 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3830 (struct ppc_stub_hash_entry): Add "addend" field.
3831 (struct ppc_link_hash_entry): Add "tls_type".
3832 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3833 TLS_EXPLICIT): Define.
3834 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3835 (link_hash_newfunc): Init new fields.
3836 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
3837 init_offset to NULL.
3838 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3839 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3840 there.
3841 (update_local_sym_info, update_plt_info): New functions.
3842 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3843 handling to use got.glist rather than got.refcount. Likewise for PLT.
3844 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3845 (func_desc_adjust): Adjust for new PLT list.
3846 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3847 (get_sym_h, get_tls_type): New functions.
3848 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3849 (ppc64_elf_tls_optimize): New function.
3850 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3851 TLS relocs.
3852 (ppc64_elf_size_dynamic_sections): Likewise.
3853 (ppc_type_of_stub): Adjust for new PLT list.
3854 (ppc_build_one_stub): Likewise.
3855 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3856 calls specially.
3857 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3858 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3859 init GOT entries that have a reloc. Generate GOT relocs here..
3860 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3861 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3862
3863 2003-02-04 Andreas Schwab <schwab@suse.de>
3864
3865 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3866 (elf_m68k_link_hash_traverse): Remove.
3867 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3868 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3869 reduce casting.
3870 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3871 casting.
3872 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3873 instead of elf_m68k_link_hash_traverse.
3874 (elf_m68k_discard_copies): Change first parameter to pointer to
3875 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3876 elf_m68k_link_hash_entry is needed.
3877
3878 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3879
3880 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3881 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3882 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3883 "plt" field.
3884 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3885 Add "init_offset" field.
3886 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3887 (elf_local_got_ents): Declare.
3888 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3889 and "plt".
3890 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3891 (_bfd_elf_link_hash_table_init): Set "init_offset".
3892 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3893 from init_offset.
3894 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3895
3896 * elf.c (bfd_elf_local_sym_name): Split out from..
3897 (group_signature): ..here.
3898 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3899
3900 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3901
3902 * elf-bfd.h (enum elf_link_info_type): Remove.
3903 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3904 to struct sec. Remove linkonce_p field.
3905 (elf_linkonce_p): Delete.
3906 (elf_discarded_section): Update for sec_info_type change.
3907 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3908 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3909 (ELF_INFO_TYPE_NONE): Define.
3910 (ELF_INFO_TYPE_STABS): Define.
3911 (ELF_INFO_TYPE_MERGE): Define.
3912 (ELF_INFO_TYPE_EH_FRAME): Define.
3913 (ELF_INFO_TYPE_JUST_SYMS): Define.
3914 (STD_SECTION): Update struct sec initializer.
3915 * ecoff.c (bfd_debug_section): Likewise.
3916 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3917 * elflink.h: Likewise.
3918 * elf-eh-frame.c: Likewise.
3919 * elf64-alpha.c: Likewise.
3920 * elfxx-ia64.c: Likewise.
3921 * elfxx-mips.c: Likewise.
3922 * bfd-in2.h: Regenerate.
3923
3924 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3925 referring to used_by_bfd.
3926 * elf64-sparc.c (sec_do_relax): Likewise.
3927 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3928 * elfxx-mips.c (mips_elf_section_data): Likewise.
3929 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3930 (ieee_get_section_contents): Likewise.
3931 (ieee_new_section_hook): Formatting.
3932 (ieee_canonicalize_reloc): Remove commented out code.
3933 * mmo.c (mmo_section_data): Define. Use throughout file.
3934 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3935
3936 2003-01-31 Graydon Hoare <graydon@redhat.com>
3937
3938 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3939 * Makefile.in: Regenerate.
3940 * opncls.c (calc_crc32, get_debug_link_info,
3941 seperate_debug_file_exists, find_seperate_debug_file): New
3942 internal functions.
3943 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3944 contained inside a .gnu_debuglink section.
3945 * bfd-in2.h: Regenerate.
3946
3947 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3948
3949 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3950 entry->abfd when it's NULL.
3951
3952 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3953
3954 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3955 _bfd_elf_section_offset returning -2 the same way as -1.
3956
3957 * elfxx-mips.c (mips_elf_multi_got): New function.
3958 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3959 addend into union along with address and link hash entry.
3960 (struct mips_got_info): Added bfd2got and next.
3961 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3962 (mips_elf_got_section, mips_elf_create_got_section): Use
3963 SEC_EXCLUDE bit to tell whether we really need the got
3964 section. Take boolean arguments to disregard an excluded
3965 section, or to create it as excluded. Adjust all callers.
3966 Use mips_elf_got_section all over.
3967 (mips_elf_local_got_index, mips_elf_got_page,
3968 mips_elf_got16_entry): Take input bfd as argument, and pass it
3969 on to mips_elf_create_local_got_entry.
3970 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3971 Take input bfd as argument, and manage entries in the
3972 appropriate GOT.
3973 (mips_elf_got_offset_from_index): Take input bfd as argument,
3974 and use it to adjust the GP offset of the bfd.
3975 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3976 unreferenced GOT entries of global symbols to the end.
3977 (mips_elf_record_global_got_symbol): Take input bfd as
3978 argument. Add entries to the master GOT hash table.
3979 (struct mips_elf_bfd2got_hash): New.
3980 (struct mips_elf_got_per_bfd_arg): New.
3981 (struct mips_elf_set_global_got_offset_arg): New.
3982 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3983 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3984 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3985 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3986 mips_elf_resolve_final_got_entry,
3987 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3988 mips_elf_got_for_ibfd): New functions.
3989 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3990 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3991 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3992 (mips_elf_got_entry_hash): Take new fields into account. Use
3993 mips_elf_hash_bfd_vma.
3994 (mips_elf_got_entry_eq): Take new fields into account.
3995 (mips_elf_create_got_section): Initialize new fields.
3996 (mips_elf_calculate_relocation): Pass input_bfd to functions
3997 that now take it. Adjust gp for the input_bfd.
3998 (mips_elf_allocate_dynamic_relocation,
3999 mips_elf_create_dynamic_relocation,
4000 _bfd_mips_elf_create_dynamic_sections): Use...
4001 (mips_elf_rel_dyn_section): New function. Borrow code from...
4002 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4003 now take it. Create the got section if needed, even if
4004 excluded, before recording a global got symbol. Move some
4005 code to...
4006 (mips_elf_record_local_got_symbol): New fn.
4007 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4008 Compute multi-got global entries offsets. Move GOT code to...
4009 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4010 if the GOT is too big.
4011 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4012 undefweak symbol to zero. Generate dynamic relocations for
4013 non-primary GOT entries for global symbols.
4014 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4015 case. Generate dynamic relocations for local got entries.
4016 Sort dynamic relocations on N64 too, using...
4017 (sort_dynamic_relocs_64): New fns.
4018 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4019 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4020
4021 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
4022
4023 * bfd.c (struct _bfd): Added id field.
4024 * opncls.c (_bfd_id_counter): New static variable.
4025 (_bfd_new_bfd): Use it.
4026 * bfd-in2.h: Rebuilt.
4027
4028 2003-01-25 Alan Modra <amodra@bigpond.net.au>
4029
4030 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4031
4032 2003-01-25 Jakub Jelinek <jakub@redhat.com>
4033
4034 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4035 (elf32_sparc_rev32_howto): New variable.
4036 (sparc_reloc_map): Add TLS relocs.
4037 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4038 Handle REV32.
4039 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4040 New functions.
4041 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4042 struct elf32_sparc_link_hash_table):
4043 New structures.
4044 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4045 elf32_sparc_hash_table): Define.
4046 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4047 create_got_section, elf32_sparc_create_dynamic_sections,
4048 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4049 functions.
4050 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4051 reference counting.
4052 (elf32_sparc_gc_sweep_hook): Likewise.
4053 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4054 (elf32_sparc_size_dynamic_sections): Likewise.
4055 (elf32_sparc_relocate_section): Likewise.
4056 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4057 New functions.
4058 (elf32_sparc_object_p): Allocate backend private object data.
4059 (bfd_elf32_bfd_link_hash_table_create,
4060 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4061 elf_backend_can_refcount): Define.
4062 (elf_backend_create_dynamic_sections): Define to
4063 elf32_sparc_create_dynamic_sections.
4064 * reloc.c: Add SPARC TLS relocs.
4065 * bfd-in2.h, libbfd.h: Rebuilt.
4066 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4067 (sparc_reloc_map): Likewise.
4068
4069 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4070
4071 * bfd-in2.h: Regenerate.
4072 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4073 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4074 (elf_howto_table): Add TLS relocs.
4075 (elf_s390_reloc_type_lookup): Likewise.
4076 (elf_s390_link_hash_entry): Add tls_type.
4077 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4078 New macros.
4079 (elf_s390_link_hash_table): Add tls_ldm_got.
4080 (link_hash_newfunc): Initialize tls_type.
4081 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4082 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4083 (elf_s390_check_relocs): Support TLS relocs.
4084 (elf_s390_gc_sweep_hook): Likewise.
4085 (allocate_dynrelocs): Likewise.
4086 (elf_s390_size_dynamic_sections): Likewise.
4087 (elf_s390_relocate_section): Likewise.
4088 (elf_s390_finish_dynamic_symbol): Likewise.
4089 (bfd_elf32_mkobject): Define for TLS.
4090 * elf64-s390.c: Same changes as for elf32-s390.c.
4091 * libbfd.h: Regenerate.
4092 * reloc.c: Add s390 TLS relocations.
4093
4094 2003-01-24 Charles Lepple <clepple@ghz.cc>
4095
4096 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4097
4098 2003-01-23 Nick Clifton <nickc@redhat.com>
4099
4100 * Add sh2e support:
4101 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
4102 * archures.c (bfd_mach_sh2e): Added.
4103 * bfd-in2.h: Rebuilt.
4104 * cpu-sh.c (arch_info_struct): Added SH2e.
4105 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
4106
4107 2003-01-23 Alan Modra <amodra@bigpond.net.au>
4108
4109 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4110 dynindx to an int. Rearrange for better packing.
4111 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4112 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4113 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4114 (struct _sh64_elf_section_data): New struct.
4115 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4116 * elf32-sh64-com.c: Include elf32-sh64.h.
4117 * elf32-sh64.c: Likewise.
4118 (sh64_elf_new_section_hook): New function.
4119 (bfd_elf32_new_section_hook): Define.
4120 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4121 (sh64_bfd_elf_copy_private_section_data): Likewise.
4122 (sh64_elf_final_write_processing): Likewise.
4123 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4124 (elf32_sparc_new_section_hook): New function.
4125 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4126 (sec_do_relax): Define.
4127 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4128 (elf32_sparc_relocate_section): Likewise.
4129 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4130 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4131 (mmix_elf_section_data): Define. Use throughout file.
4132 (mmix_elf_new_section_hook): New function.
4133 (bfd_elf64_new_section_hook): Define.
4134 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4135 (ppc64_elf_section_data): Define. Use throughout.
4136 (ppc64_elf_new_section_hook): New function.
4137 (bfd_elf64_new_section_hook): Define.
4138 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4139 (sparc64_elf_new_section_hook): New function.
4140 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4141 (sec_do_relax): Define.
4142 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4143 (sparc64_elf_relocate_section): Likewise.
4144 (bfd_elf64_new_section_hook): Define.
4145 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4146 * elfxx-mips.c (struct _mips_elf_section_data): New.
4147 (mips_elf_section_data): Define. Use throughout.
4148 (_bfd_mips_elf_new_section_hook): New function.
4149 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4150 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4151 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4152 * Makefile.am: Run "make dep-am".
4153 * Makefile.in: Regenerate.
4154
4155 2003-01-21 Richard Henderson <rth@redhat.com>
4156
4157 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4158 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4159 (elf64_alpha_adjust_dynamic_symbol): Set them.
4160 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4161 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4162 symbol index when relaxing LDM to TPREL.
4163 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4164 relocs, even if the target isn't locally defined.
4165 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4166 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4167 relocs vs symndx 0 to the tp base.
4168
4169 2003-01-21 Fabio Alemagna <falemagn@aros.org>
4170
4171 * config.bfd: Handle i[3456]86-*-aros*.
4172
4173 2003-01-21 Andreas Schwab <schwab@suse.de>
4174
4175 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4176 (struct ppc_elf_link_hash_entry): Define.
4177 (ppc_elf_hash_entry): New function.
4178 (struct ppc_elf_link_hash_table): Define.
4179 (ppc_elf_hash_table): New function.
4180 (ppc_elf_link_hash_newfunc): New function.
4181 (ppc_elf_link_hash_table_create): New function.
4182 (ppc_elf_copy_indirect_symbol): New function.
4183 (allocate_dynrelocs): New function.
4184 (readonly_dynrelocs): New function.
4185 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4186 relocs and determine DT_TEXTREL.
4187 (ppc_elf_check_relocs): Don't do that here, just count the
4188 dynamic relocs.
4189 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4190 removed section.
4191 (bfd_elf32_bfd_link_hash_table_create): Define.
4192 (elf_backend_copy_indirect_symbol): Define.
4193
4194 2003-01-21 Richard Henderson <rth@redhat.com>
4195
4196 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4197 TPREL also get a reloc if shared. Remove SREL support.
4198 (elf64_alpha_emit_dynrel): New.
4199 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
4200 and GOTTPREL relocs to local symbols against the tp base.
4201 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4202
4203 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4204 use count before clobbering r_type.
4205 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4206 ordering would mean dataflow inspection is necessary.
4207
4208 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4209
4210 * coffcode.h (coff_set_flags): Added get/set arch hooks.
4211
4212 2003-01-20 Fabio Alemagna <falemagn@aros.org>
4213
4214 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4215 elfxx-target.h and #undef it before #define'ing it.
4216 * elf32-i386.c: Likewise.
4217 * elf32-sh64.c: Likewise.
4218 * elf64-alpha.c: Likewise.
4219 * elf64-sh64.c: Likewise.
4220
4221 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4222
4223 * bfd-in2.h: Regenerate.
4224 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4225 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4226 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4227 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4228 R_390_PLTOFF32 and R_390_PLTOFF64.
4229 (elf_s390_reloc_type_lookup): Likewise.
4230 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4231 of GOTPLT references to a function.
4232 (link_hash_newfunc): Initialize gotplt_refcount.
4233 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4234 and creation of the got section out of the main switch. Add support
4235 for the gotoff, gotplt and pltoff relocations.
4236 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4237 and pltoff.
4238 (elf_s390_adjust_gotplt): New function.
4239 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4240 plt entries.
4241 (allocate_dynrelocs): Add comment.
4242 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4243 for gotoff, gotplt and pltoff relocations.
4244 * elf64-s390.c: Same changes as for elf32-s390.c.
4245 * libbfd.h: Regenerate.
4246 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4247 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4248 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4249 and BFD_RELOC_390_PLTOFF64.
4250
4251 2003-01-18 Jakub Jelinek <jakub@redhat.com>
4252
4253 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4254 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4255
4256 2003-01-16 Jakub Jelinek <jakub@redhat.com>
4257
4258 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4259 self_dtpmod_done and self_dtpmod_offset.
4260 (allocate_global_data_got): Only use one got entry for all
4261 dtpmod relocs against local symbols.
4262 (allocate_dynrel_entries): Only need .rela.got entry for
4263 dtpmod against global symbol.
4264 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4265 Reserve space in .rela.got for the local dtpmod entry.
4266 (set_got_entry): Initialize the common local dtpmod .got entry.
4267 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4268 and R_IA_64_DTPREL64MSB.
4269
4270 2003-01-16 Alan Modra <amodra@bigpond.net.au>
4271
4272 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4273 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4274 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4275 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4276 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4277 relative relocs, not with absolute ones.
4278 * Makefile.am: Run "make dep-am".
4279 * Makefile.in: Regenerate.
4280 * po/SRC-POTFILES.in: Regenerate.
4281
4282 2003-01-15 Andreas Schwab <schwab@suse.de>
4283
4284 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4285 relocation against a non-allocated readonly section.
4286
4287 2003-01-10 Alan Modra <amodra@bigpond.net.au>
4288
4289 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4290 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4291
4292 2002-01-08 Klee Dienes <kdienes@apple.com>
4293
4294 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4295 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4296 * Makefile.in: Regenerate.
4297
4298 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
4299
4300 * elfn32-mips.c (prev_reloc_section): New.
4301 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4302 (SET_RELOC_ADDEND): Parenthesize macro argument.
4303
4304 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4305
4306 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4307 adjust addil instructions if the symbol has no section.
4308
4309 2003-01-07 DJ Delorie <dj@redhat.com>
4310
4311 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4312 partial_inplace.
4313
4314 2003-01-07 Andreas Schwab <schwab@suse.de>
4315
4316 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4317 PC relative relocations.
4318 (elf_m68k_discard_copies): Set it here instead.
4319
4320 2002-01-02 Ben Elliston <bje@redhat.com>
4321 Jeff Johnston <jjohnstn@redhat.com>
4322
4323 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4324 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4325 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4326 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4327 (cpu-iq2000.lo): New target.
4328 * Makefile.in: Regenerate.
4329 * config.bfd: Handle iq2000-*-elf.
4330 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4331 (bfd_archures_list): Add bfd_iq2000_arch.
4332 * configure.in: Handle bfd_elf32_iq2000_vec.
4333 * configure: Regenerate.
4334 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
4335 and BFD_RELOC_IQ2000_UHI16.
4336 * targets.c (bfd_elf32_iq2000_vec): Declare.
4337 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4338 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4339 * cpu-iq2000.c: New file.
4340 * elf32-iq2000.c: Likewise.
4341 * libbfd.h: Regenerate.
4342 * bfd-in2.h: Likewise.
4343
4344 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
4345
4346 * elfxx-mips.c: Include libiberty.h.
4347 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4348 (mips_set_isa_flags): New function, split out from...
4349 (_bfd_mips_elf_final_write_processing): ...here. Only call
4350 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4351 (mips_mach_extensions): New array.
4352 (mips_32bit_flags_p): New function.
4353 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4354 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4355 other is 64-bit. When adopting IBFD's architecture, adopt the
4356 bfd_mach as well as the flags.
4357
4358 2003-01-02 Nick Kelsey <nickk@ubicom.com>
4359
4360 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4361 fix internal errors, fix bad code generation, fix incorrect stabs
4362 information, and improve ability to eliminate redundant page
4363 instructions. Added code to ip2k_final_link_relocate to self-verify
4364 the linker relaxation. Fix formatting problems.
4365
4366 2002-12-30 Chris Demetriou <cgd@broadcom.com>
4367
4368 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4369 * archures.c (bfd_mach_mipsisa32r2): New define.
4370 * bfd-in2.h: Regenerate.
4371 * cpu-mips.c (I_mipsisa32r2): New enum value.
4372 (arch_info_struct): Add entry for I_mipsisa32r2.
4373 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4374 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4375 (_bfd_mips_elf_final_write_processing): Add
4376 bfd_mach_mipsisa32r2 case.
4377 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4378 binaries marked as using MIPS32 Release 2.
4379
4380 2002-12-30 Dmitry Diky <diwil@mail.ru>
4381
4382 * Makefile.am: Add msp430 target.
4383 * configure.in: Likewise.
4384 * Makefile.in: Regenerate.
4385 * configure: Regenerate.
4386 * archures.c: Add msp430 architecture vector.
4387 * config.bfd: Likewise.
4388 * reloc.c: Add msp430 relocs.
4389 * targets.c: Add msp320 target.
4390 * cpu-msp430.c: New file: msp430 cpu detection.
4391 * elf32-msp430.c: New file: msp430 reloc processing.
4392 * bfd-in2.h: Regenerate.
4393 * libbfd.h: Regenerate.
4394
4395 2002-12-28 Jakub Jelinek <jakub@redhat.com>
4396
4397 * elf.c (elf_sort_sections): Don't reorder .tbss.
4398 (assign_file_positions_for_segments): Only adjust off/voff
4399 for increased alignment in PT_LOAD or PT_NOTE segment,
4400 but adjust p_filesz for .tbss too. in PT_LOAD consider
4401 .tbss to have zero memory size.
4402 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4403 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4404 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4405 into PT_TLS segment. Never put SHF_TLS sections in
4406 segments other than PT_TLS or PT_LOAD.
4407
4408 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4409 sh_entsize.
4410
4411 2002-12-23 DJ Delorie <dj@redhat.com>
4412
4413 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4414
4415 2002-12-23 Alan Modra <amodra@bigpond.net.au>
4416
4417 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4418
4419 2002-12-23 Nick Clifton <nickc@redhat.com>
4420
4421 * archures.c (bfd_arch_get_compatible): Add third parameter
4422 'accept_unknowns'. Only accept unknown format BFDs if
4423 accept_unknowns is true, or if the format is "binary".
4424 * bfd-in2.h: Regenerate.
4425
4426 2002-12-21 Nick Clifton <nickc@redhat.com>
4427
4428 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4429 that subtracted 8 from pc relative relocations.
4430
4431 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4432
4433 * coff-h8300.c: Fix comment typos.
4434 * coffcode.h: Likewise.
4435 * cpu-cris.c: Likewise.
4436 * elf32-vax.c: Likewise.
4437 * genlink.h: Likewise.
4438 * linker.c: Likewise.
4439 * som.c: Likewise.
4440 * tekhex.c: Likewise.
4441 * vms-misc.c: Likewise.
4442
4443 2002-12-20 DJ Delorie <dj@redhat.com>
4444
4445 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4446 * libbfd.h: Regenerate.
4447 * bfd-in2.h: Regenerate.
4448 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4449 (xstormy16_reloc_map): Add R_XSTORMY16_12.
4450
4451 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4452
4453 * doc/bfdint.texi: Fix typos.
4454
4455 2002-12-20 Paul Eggert <eggert@twinsun.com>
4456
4457 Port to POSIX 1003.1-2001.
4458 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4459 * configure.in (build-warnings): Likewise.
4460 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4461 * aclocal.m4: Regenerate.
4462 * config.in: Regenerate.
4463 * configure: Regenerate.
4464
4465 2002-12-19 Alan Modra <amodra@bigpond.net.au>
4466
4467 * coff-h8300.c: Include libiberty.h.
4468 (h8300_reloc16_extra_cases): Check the hash table creator before
4469 referencing h8300 specific fields. Stash the hash table pointer
4470 in a local var. Comment typo fixes.
4471 (h8300_bfd_link_add_symbols): Likewise.
4472
4473 * reloc.c (struct reloc_howto_struct): Revise src_mask and
4474 dst_mask comments.
4475 * bfd-in2.h: Regenerate.
4476
4477 2002-12-18 Alan Modra <amodra@bigpond.net.au>
4478
4479 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4480 code a little. Comment on dynamic relocs against section symbols.
4481
4482 2002-12-17 Roger Sayle <roger@eyesopen.com>
4483
4484 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4485 the HP compiler's "long long".
4486
4487 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
4488
4489 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4490 and R_XSTORMY16_HI16) howto entries.
4491 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
4492 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
4493 determine the start of the second reloc table.
4494
4495 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4496
4497 * ecofflink.c: Fix the reading of the debugging information
4498 of Tru64/Alpha binaries that are produced by recent Compaq
4499 compilers.
4500 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4501 table.
4502 (lookup_line): Because of the strange information sometimes
4503 generated by Compaq's recent compilers, change how the FDR
4504 table is searched so that PDRs (procedure descriptors) are
4505 correctly found. Note that this change is really more of a hack;
4506 however, I have included extensive documentation as to why
4507 this is the best solution short of an extensive rewrite or
4508 another hack.
4509 (fdrtab_lookup): Add comments to explain the algorithm.
4510
4511 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4512
4513 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4514 initializers to match struct declaration.
4515
4516 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4517
4518 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4519 * elf.c (get_program_header_size): Likewise.
4520 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4521 (m32r_elf_generic_reloc): Likewise.
4522 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4523 * elflink.h (elf_bfd_discard_info): Likewise.
4524
4525 2002-12-12 Alan Modra <amodra@bigpond.net.au>
4526
4527 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4528 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4529 DT_RELSZ adjustment, not output section. Avoid writing tags when
4530 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4531 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4532 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4533 DT_RELASZ adjustment, not output section. Avoid writing tags when
4534 unchanged. Adjust DT_RELA.
4535 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4536 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4537
4538 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4539
4540 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4541 addend by 4.
4542
4543 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
4544
4545 * elfxx-mips.c (struct mips_got_entry): New.
4546 (struct mips_got_info): Added got_entries field.
4547 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4548 (mips_elf_local_got_index, mips_elf_got_page,
4549 mips_elf_got16_entry): Re-implement in terms of new...
4550 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4551 Change return type.
4552 (mips_elf_highest): Warning clean-up.
4553 (mips_elf_create_got_section): Initialize got_entries.
4554 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4555 local got size.
4556 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4557 GOT_PAGE entries, since we now reuse GOT16 entries.
4558
4559 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4560
4561 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4562 read-only section that lies after .text and before .data to be
4563 written into the output file and included in a_text.
4564 (translate_to_native_sym_flags): If an otherwise unrepresentable
4565 section was merged with .text, convert its symbols to N_TEXT
4566 symbols.
4567 * libaout.h (aout_section_merge_with_text_p): New macro.
4568
4569 2002-12-08 Alan Modra <amodra@bigpond.net.au>
4570
4571 * bfd-in.h: Comment typo fix. Formatting.
4572 * bfd-in2.h: Regenerate.
4573 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4574 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4575 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4576
4577 2002-12-05 Richard Henderson <rth@redhat.com>
4578
4579 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4580 Only send PCREL21B though the plt. Fix installed reloc type.
4581 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4582 against PCREL22 or PCREL64I; clean up error messages for
4583 branch relocs.
4584
4585 2002-12-04 Kevin Buettner <kevinb@redhat.com>
4586
4587 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4588 New functions.
4589 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4590
4591 2002-12-04 David Mosberger <davidm@hpl.hp.com>
4592
4593 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4594
4595 2002-12-04 H.J. Lu <hjl@gnu.org>
4596
4597 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4598 BFD address when constructing local name.
4599
4600 2002-12-04 Andreas Schwab <schwab@suse.de>
4601
4602 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4603 member.
4604 (elf_m68k_link_hash_table_create): Initialize it.
4605 (elf_m68k_check_relocs): Handle symbols that are forced to be
4606 local due to visibility changes.
4607 (elf_m68k_adjust_dynamic_symbol): Likewise.
4608 (elf_m68k_size_dynamic_sections): Likewise.
4609 (elf_m68k_discard_copies): Likewise.
4610 (elf_m68k_relocate_section): Likewise.
4611
4612 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4613
4614 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4615
4616 2002-12-04 Alan Modra <amodra@bigpond.net.au>
4617
4618 * srec.c (srec_write_symbols): Restore '$' prefix to address
4619 accidentally removed in 2002-04-04 change.
4620 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4621
4622 2002-12-03 Nick Clifton <nickc@redhat.com>
4623
4624 * elf32-ppc.c (apuinfo_list_init): New function.
4625 (apuinfo_list_add): New function: Add a value to the list.
4626 (apuinfo_list_length): New function: Return the number of
4627 values on the list.
4628 (apuinfo_list_element): New function: Return a value on the
4629 list.
4630 (apuinfo_list_finish): New function: Free the resources used
4631 by the list.
4632 (ppc_elf_begin_write_processing): New function. Scan the
4633 input bfds for apuinfo sections.
4634 (ppc_elf_write_section): New function: Delay the creation of
4635 the contents of an apuinfo section in an output bfd.
4636 (ppc_elf_final_write_processing): New function. Create the
4637 contents of an apuinfo section in an output bfd.
4638 (elf_backend_begin_write_processing): Define.
4639 (elf_backend_final_write_processing): Define.
4640 (elf_backend_write_section): Define.
4641
4642 2002-12-03 Richard Henderson <rth@redhat.com>
4643
4644 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4645
4646 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4647
4648 Fix PR savannah/1417:
4649 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4650 branch if it goes to the start of the deleted region.
4651
4652 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4653
4654 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4655 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4656 bfd_mach_m6812s): Declare.
4657
4658 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4659 (_bfd_m68hc12_elf_set_private_flags): Call it.
4660 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4661 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4662 report microcontroller incompatibilities (HC12 vs HCS12).
4663 (elf_backend_object_p): Update.
4664
4665 2002-11-30 Alan Modra <amodra@bigpond.net.au>
4666
4667 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4668 (enum bfd_boolean, boolean): Delete.
4669 (bfd_boolean): Typedef to an int.
4670 (FALSE, TRUE): Define.
4671 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4672 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4673 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4674 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4675 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4676 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4677 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4678 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4679 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4680 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4681 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4682 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4683 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4684 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4685 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4686 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4687 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4688 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4689 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4690 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4691 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4692 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4693 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4694 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4695 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4696 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4697 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4698 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4699 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4700 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4701 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4702 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4703 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4704 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4705 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4706 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4707 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4708 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4709 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4710 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4711 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4712 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4713 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4714 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4715 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4716 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4717 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4718 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
4719 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
4720 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4721 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4722 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4723 of bfd_boolean vars with TRUE/FALSE. Formatting.
4724 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4725
4726 2002-11-28 Alan Modra <amodra@bigpond.net.au>
4727
4728 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4729 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4730 with Elf_Internal_Rela.
4731 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4732 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4733 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4734 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4735 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4736 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4737 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4738 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4739 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4740 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4741 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4742 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4743 throughout instead.
4744 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4745 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4746 Remove INLINE keyword.
4747 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4748 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4749 as a bfd_byte *.
4750 (elf_write_relocs): Consolidate REL and RELA code.
4751 (elf_slurp_reloc_table_from_section): Simplify REL code.
4752 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4753 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4754 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4755 RELA code.
4756 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4757 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4758 (elf_link_output_relocs): Likewise.
4759 (elf_reloc_link_order): Likewise.
4760 (elf_finish_pointer_linker_section): Likewise.
4761 (struct elf_link_sort_rela): Remove union.
4762 (elf_link_sort_cmp1): Update to suit.
4763 (elf_link_sort_cmp2): Here too.
4764 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4765 over-allocation for int_rels_per_ext_rel != 1 case.
4766 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4767 * elf32-i386.c: Likewise.
4768 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4769 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4770 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4771 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4772 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4773 elf64-sparc.c, elf64-x86-64.c: Likewise.
4774 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4775 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4776 bfd_elf32_swap_reloc_in.
4777
4778 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4779 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4780 (mips_elf64_swap_reloc_in): Zero r_addend.
4781 (mips_elf64_be_swap_reloc_in): Likewise.
4782 (mips_elf64_slurp_one_reloc_table): Simplify.
4783
4784 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4785 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4786 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4787
4788 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4789
4790 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
4791 unresolved debugging relocs in dynamic applications.
4792 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4793
4794 2002-11-26 Alan Modra <amodra@bigpond.net.au>
4795
4796 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4797 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4798 on a relocatable link. Comment typos.
4799 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4800 in the order they are declared. Clear elf_hash_value too.
4801 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4802 eh_info and tls_segment.
4803 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4804 sorted when discarding relocs by turning them into R_*_NONE.
4805
4806 * libbfd.c (warn_deprecated): Comment spelling.
4807 * po/SRC-POTFILES.in: Regenerate.
4808
4809 2002-11-21 Richard Henderson <rth@redhat.com>
4810
4811 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4812 arch's st_other bits when merging visibilities.
4813 (elf_link_output_extsym): Tidy clearing of visibility field.
4814
4815 2002-11-21 Alan Modra <amodra@bigpond.net.au>
4816
4817 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4818 (SWAP_OUT_RELOC_OFFSET): Define.
4819
4820 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
4821
4822 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4823 can_refcount is properly extended to the type of
4824 init_refcount.
4825
4826 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
4827
4828 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4829 (_bfd_mips_elf_relocate_section): Use it.
4830
4831 * elfxx-mips.c (MNAME): New macro.
4832 (_bfd_mips_elf_check_relocs): Use it.
4833 (_bfd_mips_elf_discard_info): Likewise.
4834 (_bfd_mips_elf_final_link): Likewise.
4835
4836 2002-11-19 Alan Modra <amodra@bigpond.net.au>
4837
4838 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4839 rel_hdr.sh_size too.
4840
4841 2002-11-18 Klee Dienes <kdienes@apple.com>
4842
4843 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4844 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4845 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4846 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4847 Add dependencies for bfdwin.c, bfdio.c.
4848 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4849 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4850 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4851 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4852 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4853 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4854 bfd_get_size (moved from libbfd.c and bfd.c).
4855 * bfdwin.c New file. Contains _bfd_window_internal,
4856 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4857 libbfd.c and bfd.c).
4858 * po/SRC-POTFILES.in: Regenerate.
4859 * po/bfd.pot: Regenerate.
4860 * libbfd.h: Regenerate.
4861 * bfd-in2.h: Regenerate.
4862 * aclocal.m4: Regenerate.
4863 * Makefile.in: Regenerate.
4864 * configure: Regenerate.
4865
4866 2002-11-18 Klee Dienes <kdienes@apple.com>
4867
4868 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4869
4870 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4871
4872 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4873 jsr after a short jump.
4874 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4875
4876 2002-11-15 Klee Dienes <kdienes@apple.com>
4877
4878 * pef.c (bfd_pef_convert_architecture): Move declaration of
4879 ARCH_POWERPC and ARCH_M68K to the start of the function.
4880
4881 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4882
4883 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4884
4885 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4886
4887 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4888 For bpo_gregs_section->contents, allocate _raw_size, not
4889 _cooked_size.
4890
4891 2002-11-13 Klee Dienes <kdienes@apple.com>
4892
4893 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4894
4895 2002-11-13 H.J. Lu <hjl@gnu.org>
4896
4897 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4898
4899 2002-11-13 Klee Dienes <kdienes@apple.com>
4900 Alan Modra <amodra@bigpond.net.au>
4901
4902 * bfd.c (struct bfd_preserve): New.
4903 (bfd_preserve_save): New function.
4904 (bfd_preserve_restore): Ditto.
4905 (bfd_preserve_finish): Ditto.
4906 * bfd-in2.h: Regenerate.
4907 * mach-o.c: Formatting.
4908 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4909 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4910 (bfd_mach_o_core_p): Ditto.
4911 (bfd_mach_o_scan): Pass in mdata.
4912 * mach-o.h (bfd_mach_o_scan): Update prototype.
4913 * pef.c: Formatting.
4914 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4915 (bfd_pef_xlib_object_p): Ditto.
4916 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4917 * pef.h (bfd_pef_scan): Update prototype.
4918 * xsym.c: Formatting, K&R fixes.
4919 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4920 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4921 * xsym.h (bfd_sym_scan): Declare.
4922 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
4923 * elfcore.h (elf_core_file_p): Likewise.
4924 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4925
4926 2002-11-12 Nick Clifton <nickc@redhat.com>
4927
4928 * po/da.po: Updated Danish translation.
4929
4930 2002-11-12 Alan Modra <amodra@bigpond.net.au>
4931
4932 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4933 relocatable link too.
4934 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4935 eh_frame and stab sections. Zap deleted relocs.
4936 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4937 (elf_bfd_discard_info): Run for relocatable link too.
4938 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4939 Handle ld -r case.
4940 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4941 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4942
4943 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4944 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4945 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4946 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4947 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4948 (struct elf_link_hash_table): Add eh_info.
4949 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4950 (_bfd_elf_discard_section_eh_frame): Update prototype.
4951 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4952 (_bfd_elf_write_section_eh_frame): Likewise.
4953 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4954 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4955 param. Get "hdr_info" from link hash table.
4956 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4957 header section from link hash table. Save header section to elf_tdata.
4958 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4959 header section from link hash table. Don't alloc hdr_info. Clear
4960 hdr_sec instead of setting "strip".
4961 (_bfd_elf_eh_frame_section_offset): Formatting.
4962 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4963 Get header section from link hash table.
4964 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4965 Get header section from link hash table.
4966 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4967 (get_program_header_size): Likewise.
4968 (_bfd_elf_section_offset): Formatting.
4969 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4970 section pointer in link hash table.
4971 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4972 and _bfd_elf_write_section_eh_frame calls. Update comment about
4973 eh_frame entries.
4974 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4975 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4976
4977 * po/SRC-POTFILES.in: Regenerate.
4978
4979 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4980 relocs for discarded FDEs. Remove dead code.
4981 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4982 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4983 Tidy conditions under which stabs are edited. Formatting.
4984 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4985 from discarded relocs.
4986 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4987 section adjustments after testing magic values.
4988
4989 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4990
4991 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4992 references to large plt symbols.
4993
4994 2002-11-12 Klee Dienes <kdienes@apple.com>
4995
4996 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4997 looking for an unused section name.
4998
4999 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5000
5001 * coff-h8300.c: Fix formatting.
5002 * elf32-h8300.c: Likewise.
5003 * reloc16.c: Likewise.
5004
5005 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5006
5007 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5008 section when dynamic section unused; _bfd_strip_section_from_output
5009 instead.
5010
5011 2002-11-08 Alan Modra <amodra@bigpond.net.au>
5012
5013 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5014 and sym_vec.
5015
5016 * dwarf2.c: Revert last change.
5017
5018 2002-11-07 Michal Ludvig <mludvig@suse.cz>
5019
5020 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5021 _bfd_dwarf2_find_nearest_line): Use
5022 bfd_simple_get_relocated_section_contents() instead of
5023 bfd_get_section_contents().
5024 * reloc.c (bfd_perform_relocation): Add sanity check.
5025 * simple.c (simple_get_relocated_section_contents): If the section
5026 does not have any relocs associated with it, just return the
5027 unadjusted contents.
5028
5029 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
5030
5031 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5032 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5033 contents, enabling for a non-DSO, for symbols defined in the
5034 program with --export-dynamic.
5035
5036 2002-11-07 Alan Modra <amodra@bigpond.net.au>
5037
5038 * elf64-ppc.c: Comment typo fixes.
5039 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5040
5041 2002-11-07 Nick Clifton <nickc@redhat.com>
5042
5043 * po/da.po: Updated Danish translation.
5044
5045 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
5046
5047 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5048 exactly three internal relocs per external reloc. Set reloc_count
5049 to the external reloc count.
5050
5051 2002-11-06 Klee Dienes <kdienes@apple.com>
5052
5053 * coff-stgo32.c (stub_bytes): Mark as const.
5054 Fix comment formatting.
5055
5056 2002-11-06 Klee Dienes <kdienes@apple.com>
5057
5058 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
5059 xsym.lo.
5060 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5061 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5062 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5063 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5064 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5065 sym.
5066 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
5067 * Makefile.in: Regenerate.
5068 * doc/Makefile.in: Regenerate.
5069 * bfd-in2.h: Regenerate.
5070 * xsym.c: New file. Contains support for the Apple/Metrowerks
5071 xSYM debugging format.
5072 * xsym.h: New file.
5073 * pef.c: New file. Contains support for the Apple Code Fragment
5074 Manager Preferred Executable Format
5075 * pef.h: New file.
5076 * pef-traceback.h: New file. Contains support for parsing PowerPC
5077 traceback tables as used by PEF executables (and perhaps other
5078 systems as well).
5079 * mach-o.c: New file. Contains support for the Mach-O object file
5080 format.
5081 * mach-o.h: New file.
5082 * mach-o-target.c: New file. Declares the mach-o targets
5083 themselves. Included three times by mach-o.c; each time with a
5084 different set of macros set.
5085
5086 2002-11-06 Graeme Peterson <gp@qnx.com>
5087
5088 * Makefile.am: Remove entries for elf32-qnx.[ch].
5089 * Makefile.in: Regenerate.
5090 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5091 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5092 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5093 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5094 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5095 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5096 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5097 * configure: Regenerate.
5098 * elf32-qnx.c: Remove.
5099 * elf32-qnx.h: Remove.
5100 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5101 is_contained_by_filepos, and copy_private_bfd_data_p.
5102 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5103 is_contained_by_filepos, and copy_private_bfd_data_p.
5104 * elf32-i386.c: Remove QNX extended bfd support.
5105 * elf32-ppc.c: Remove QNX extended bfd support.
5106 * elf32-sh.c: Remove QNX extended bfd support.
5107 * elfarm-nabi.c: Remove QNX extended bfd support.
5108 * targets.c: Remove qnx vectors.
5109 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5110 (elf_backend_is_contained_by_filepos): Remove.
5111 (elf_backend_copy_private_bfd_data_p): Remove.
5112 * po/SRC-POTFILES.in: Regenerate.
5113
5114 2002-11-06 David O'Brien <obrien@FreeBSD.org>
5115 Alan Modra <amodra@bigpond.net.au>
5116
5117 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5118 dynamic relocs against section symbols for the output section vma.
5119
5120 2002-11-05 Alan Modra <amodra@bigpond.net.au>
5121
5122 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5123 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5124
5125 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5126 Alan Modra <amodra@bigpond.net.au>
5127
5128 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5129 vectors in target_selvecs.
5130 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5131 in target_selvecs.
5132 (sh-*-netbsdelf*): Likewise.
5133 * configure.in (assocvecs): New variable. Handle assocvecs like
5134 selvecs.
5135 * configure: Regenerate.
5136 * format.c (bfd_check_format_matches): Store bfd_target pointers
5137 in matching_vector instead of target names. Select first target
5138 from bfd_associated_vector that matches a list of ambiguous targets.
5139 * targets.c (_bfd_associated_vector): New array.
5140 (bfd_associated_vector): New variable.
5141 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5142 * libbfd-in.h (bfd_associated_vector): Declare.
5143 * libbfd.h: Regenerate.
5144
5145 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5146
5147 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5148 non-NULL before dereferencing.
5149
5150 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5151
5152 * vms.c (vms_object_p): Restore the start address when returning
5153 NULL.
5154
5155 2002-11-04 Alan Modra <amodra@bigpond.net.au>
5156 Hans-Peter Nilsson <hp@axis.com>
5157
5158 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5159 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5160 Set up a larger symshndxbuf, and write it out. Free it on
5161 exit rather than freeing symbuf twice. Correct section index
5162 on output section symbol loop.
5163 (elf_link_output_sym): Accumulate symbol extension section
5164 indices, reallocating symshndxbuf rather than writing it out.
5165 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5166 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5167 Use bfd_zalloc to clear i_shdrp[0] too.
5168
5169 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5170
5171 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5172 _raw_size of cranges section if _cooked_size not yet set.
5173
5174 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
5175
5176 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5177 for bfd_elf32_swap_symbol_out.
5178
5179 2002-10-31 David O'Brien <obrien@FreeBSD.org>
5180
5181 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5182 signed and unsigned in comparison.
5183
5184 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
5185
5186 * coffcode.h: Remove extraneous '\'.
5187
5188 2002-10-28 H.J. Lu <hjl@gnu.org>
5189
5190 * Makefile.am (targets.lo): Depend on Makefile instead of
5191 config.status.
5192 (archures.lo): Likewise.
5193 * Makefile.in: Regenerated.
5194
5195 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5196
5197 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5198 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5199 targ_selvecs.
5200
5201 2002-10-25 Jim Wilson <wilson@redhat.com>
5202
5203 * elf64-sh64.c (sh_elf64_relocate_section): Call
5204 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5205 of SHF_MERGE section.
5206
5207 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
5208
5209 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5210
5211 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5212
5213 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5214 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5215 unsigned int.
5216 (NAME(aout,final_link)): Cast enum used in assignment.
5217 (aout_link_write_symbols): Cast enums in comparisons, int values to
5218 boolean, enums in assignments to int.
5219 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
5220 (aout_link_input_section_ext): Likewise. Cast enums used in
5221 comparisons with unsigned ints.
5222 (aout_link_reloc_link_order): Cast enum to int in assignment.
5223 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5224 calls to char *.
5225 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5226 assignment.
5227 * bfd-in2.h (bfd_set_section_vma): Likewise.
5228 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5229 * binary.c (bfd_alloc): Cast enum to long.
5230 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5231 * dwarf2.c (read_abbrevs): Add casts to enum types.
5232 (read_attribute_value): Likewise.
5233 (arange_add): Cast result of bfd_zalloc call.
5234 (comp_unit_contains_address): Return true and false.
5235 (comp_unit_find_nearest_line): Cast return to boolean.
5236 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5237 * gen-aout.c: define macro '_' if not defined.
5238 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5239 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5240 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5241 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5242 (bfd_generic_is_local_label_name): Cast return to boolean.
5243 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5244 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5245 struct bfd_hash_entry *.
5246 (_bfd_generic_link_hash_newfunc): likewise.
5247 (_bfd_generic_final_link): Cast enum to unsigned int.
5248 * merge.c (sec_merge_emit): Cast return to boolean.
5249 (merge_strings): Add casts to const unsigned char *.
5250 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5251 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
5252 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5253 to struct bfd_hash_entry *.
5254 (bfd_set_section_content): Add cast to PTR in comparison.
5255 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5256 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5257 simple_dummy_unattached_reloc,
5258 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5259 function definitions.
5260 * srec.c (S3Forced): Initialize to false.
5261 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5262 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5263 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5264 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5265 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5266 comparisons.
5267
5268 2002-10-23 Jakub Jelinek <jakub@redhat.com>
5269
5270 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5271 relocs into shared lib non-allocated reloc sections.
5272
5273 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5274
5275 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5276 sorted even when given an out-of-order line sequence.
5277 (lookup_address_in_line_info_table): When an exact VMA match is
5278 not found, return line information with the closest VMA.
5279
5280 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5281
5282 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5283 HPUX 11.00 patch PHSS_26559.
5284
5285 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5286
5287 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5288 the options section into a separate section unless IRIX 6
5289 compatibility is enabled.
5290
5291 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
5292
5293 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5294 into arrays.
5295 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5296 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5297 into account.
5298 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5299 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5300
5301 2002-10-21 Graeme Peterson <gp@qnx.com>
5302
5303 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5304
5305 2002-10-21 Alan Modra <amodra@bigpond.net.au>
5306
5307 * targets.c (bfd_target_list): Don't return the default target twice.
5308
5309 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5310
5311 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5312 perror with bfd_perror.
5313
5314 2002-10-19 H.J. Lu <hjl@gnu.org>
5315
5316 * elflink.h (elf_link_add_object_symbols): Correctly handle
5317 DT_RPATH and DT_RUNPATH.
5318
5319 2002-10-19 Mark Kettenis <kettenis@gnu.org>
5320
5321 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5322
5323 2002-10-17 Denis Chertykov <denisc@overta.ru>
5324
5325 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5326 for ip2k port.
5327
5328 2002-10-17 Alan Modra <amodra@bigpond.net.au>
5329
5330 * elfxx-target.h (USE_REL): Don't define as 1.
5331 * elf32-arm.h (USE_REL): Provide a default define of 0.
5332 Use #if rather than #ifdef when testing USE_REL.
5333 * elf32-m32r.c: Likewise.
5334
5335 * elf32-arc.c (USE_REL): Define as 1.
5336 * elf32-d10v.c (USE_REL): Likewise.
5337 * elf32-m32r.c (USE_REL): Likewise.
5338 * elf32-m68hc11.c (USE_REL): Likewise.
5339 * elf32-m68hc12.c (USE_REL): Likewise.
5340 * elf32-or32.c (USE_REL): Likewise.
5341 * elfarm-nabi.c (USE_REL): Likewise.
5342
5343 2002-10-16 Jakub Jelinek <jakub@redhat.com>
5344
5345 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5346 (s390x-*-linux*): Add targ_selvecs.
5347
5348 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5349
5350 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5351 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
5352 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5353 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5354 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5355 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5356 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5357 (SOURCE_HFILES): Add elf32-qnx.h.
5358 (BUILD_HFILES): Add bfdver.h.
5359 Run "make dep-am".
5360 * Makefile.in: Regenerate.
5361 * configure.in Update bfd vector dependencies.
5362 * configure: Regenerate.
5363 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5364 * elf32-i386qnx.c: Likewise.
5365 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5366 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5367 * elf32-sh-lin.c: Likewise.
5368 * elf32-shqnx.c: Likewise.
5369 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5370 * elf32-sh64-nbsd.c: Likewise.
5371 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5372 * elf64-sh64-nbsd.c: Likewise.
5373 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5374 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5375 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5376 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5377 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5378 (elf_backend_is_contained_by_filepos): Likewise.
5379 (elf_backend_copy_private_bfd_data_p): Likewise.
5380 Globalize and move functions to..
5381 * elf32-qnx.c: ..here. New file.
5382 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5383 emit target vectors when INCLUDE_SHMEDIA.
5384 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5385 end of file.
5386 * elf64-sh64.c: Remove ELF_ARCH test.
5387 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5388 * po/BLD-POTFILES.in: Regenerate.
5389 * po/SRC-POTFILES.in: Regenerate.
5390
5391 2002-10-16 Alan Modra <amodra@bigpond.net.au>
5392
5393 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5394 loaded with --just-symbols.
5395
5396 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5397 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5398 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5399 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5400
5401 2002-10-15 Richard Henderson <rth@redhat.com>
5402
5403 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5404 (BFD64_BACKENDS_CFILES): Likewise.
5405 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5406 * elf64-alpha-fbsd.c: Remove file, move code ...
5407 * elf64-alpha.c: ... here.
5408 * Makefile.in, configure: Rebuild.
5409
5410 2002-10-14 Richard Henderson <rth@redhat.com>
5411
5412 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5413 VALUE, not ADDEND.
5414
5415 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5416
5417 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5418 datalabel_got_offset with union of datalabel_got
5419 offset and refcount.
5420 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5421 (allocate_dynrelocs): Delete unnecessary code for
5422 STT_DATALABEL type. Create entry in got for
5423 datalabel version of symbol if datalabel_got.refcount > 0.
5424 (sh_elf_relocate_section): Use datalabel_got union.
5425 (sh_elf_gc_sweep_hook): Pull common code to initialize
5426 h and eh out of switch statement. Declare seen_stt_datalabel.
5427 Initialize it. Decrement datalabel_got.refcount for
5428 got relocs when seen_stt_datalabel is true.
5429 Decrement local_got_refcounts entry for datalabel got relocs
5430 of local symbols.
5431 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5432 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5433 Initialize it. When seen_stt_datalabel is true, increment
5434 datalabel_got refcount rather than got.refcount.
5435 (sh_elf_finish_dynamic_symbol): Create relocs to
5436 initialize got entry for datalabel version of symbol.
5437
5438 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5439
5440 * Makefile.am: Run "make dep-am".
5441 (BFD_H_FILES): Remove version.h.
5442 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5443 * version.h: ..to here.
5444 * configure.in (bfd_version_date): Remove.
5445 (AC_OUTPUT): Make bfdver.h from version.h.
5446 * bfd.c: #include "bfdver.h".
5447 * vms-hdr.c: Likewise.
5448 * Makefile.in: Regenerate.
5449 * bfd-in2.h: Regenerate.
5450 * configure: Regenerate.
5451 * po/SRC-POTFILES.in: Regenerate.
5452
5453 2002-10-14 Alan Modra <amodra@bigpond.net.au>
5454
5455 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5456 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5457 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5458 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5459 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5460 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5461 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5462 bfd_mach_ip2022, bfd_mach_ip2022ext,
5463 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5464 * bfd-in2.h: Regenerate.
5465
5466 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5467
5468 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5469 endian vector to targ_selvecs.
5470
5471 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
5472
5473 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5474 save_addend argument. Don't apply the 32-bit mask to a
5475 GPREL32 value if it's to be used in another relocation. Don't
5476 use forced-check computation of local_p to decide whether to
5477 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5478 of the addend of a non-in-place GPREL16 relocation.
5479 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5480 mips_elf_calculate_relocation().
5481
5482 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5483
5484 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5485 with symbols in other sections if we relaxed something; the sections
5486 output offsets must be re-computed before.
5487
5488 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5489
5490 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5491 handling to use Elf_Internal_Sym.
5492 (m68hc11_elf_relax_delete_bytes): Likewise.
5493
5494 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5495
5496 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5497 sh_elf_object_p, dtpoff_base): New functions.
5498 (sh_elf_howto_table): Add TLS relocs.
5499 (sh_reloc_map): Likewise.
5500 (sh_elf_info_to_howto): Support TLS relocs.
5501 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5502 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5503 New macros.
5504 (sh_elf_obj_tdata): New.
5505 (elf_sh_link_hash_table): Add tls_ldm_got.
5506 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5507 (allocate_dynrelocs): Support TLS relocs.
5508 (sh_elf_size_dynamic_sections): Likewise.
5509 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5510 .rela.got section when found already. Return false after printing
5511 error about unresolvable relocation.
5512 (sh_elf_gc_sweep_hook): Support TLS relocs.
5513 (sh_elf_check_relocs): Likewise.
5514 (sh_elf_finish_dynamic_symbol): Likewise.
5515 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5516 * reloc.c: Add SH TLS relocs.
5517 * bfd-in2.h, libbfd.h: Regenerate.
5518
5519 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5520
5521 * Makefile.in: Regenerated.
5522
5523 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
5524
5525 * Makefile.am: Run dep-am.
5526 (BFD_H_DEP): Add simple.c and linker.c.
5527 (BFD32_LIBS): Add simple.lo.
5528 (BFD32_LIBS_CFILES): Add simple.c.
5529 * Makefile.in: Regenerated.
5530 * bfd-in2.h: Regenerated.
5531 * simple.c: New file.
5532
5533 2002-10-11 Alan Modra <amodra@bigpond.net.au>
5534
5535 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5536 (record_thumb_to_arm_glue): Likewise.
5537 * ecoff.c (ecoff_link_add_externals): Likewise.
5538 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5539 (record_thumb_to_arm_glue): Likewise.
5540 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5541 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5542 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5543 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5544 * elf64-ppc.c (func_desc_adjust): Likewise.
5545 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5546 (sh64_elf64_create_dynamic_sections): Likewise.
5547 * elflink.c (_bfd_elf_create_got_section): Likewise.
5548 (_bfd_elf_create_dynamic_sections): Likewise.
5549 (_bfd_elf_create_linker_section): Likewise.
5550 * elflink.h (elf_add_default_symbol): Likewise.
5551 (elf_link_create_dynamic_sections): Likewise.
5552 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5553 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5554 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5555 (_bfd_mips_elf_add_symbol_hook): Likewise.
5556 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5557 * linker.c (generic_link_add_symbol_list): Likewise.
5558 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5559
5560 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5561
5562 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
5563 completely removed. Correct local sym adjustment.
5564
5565 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5566
5567 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5568 Correct mistake in calculation of address of .got.
5569 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5570 elf_sh64_pic_plt_entry_le): Likewise.
5571
5572 2002-10-09 Richard Shann <richard.shann@superh.com>
5573 Stephen Clarke <stephen.clarke@superh.com>
5574
5575 * Makefile.am: Add entries for elf32-sh64-lin.c and
5576 elf64-sh64-lin.c. Regenerate.
5577 * Makefile.in: Regenerate.
5578 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
5579 to use sh64 vectors rather than sh vectors.
5580 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5581 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5582 * configure: Regenerate.
5583 * elf32-sh64-lin.c: New file.
5584 * elf64-sh64-lin.c: New file.
5585 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5586 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5587
5588 2002-10-08 H.J. Lu <hjl@gnu.org>
5589
5590 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5591 IE->LE transition for R_386_TLS_IE.
5592
5593 2002-10-08 Alan Modra <amodra@bigpond.net.au>
5594
5595 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5596
5597 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
5598
5599 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5600 sections.
5601
5602 2002-10-07 Alan Modra <amodra@bigpond.net.au>
5603
5604 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5605 code.
5606
5607 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5608
5609 2002-10-06 Alan Modra <amodra@bigpond.net.au>
5610
5611 * opncls.c: Formatting.
5612 (_bfd_new_bfd): Use a smaller section hash table.
5613
5614 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
5615
5616 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5617 of the other two relocations packed with a REL32 to NONE.
5618
5619 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5620
5621 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5622 (sh_elf_link_hash_newfunc): Initialize it.
5623 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5624 to got.refcount for symbols that are forced local or when
5625 we have direct got refs.
5626 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5627 to correctly adjust got.refcount and plt.refcount.
5628 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5629 (sh_elf_check_relocs): Increment gotplt_refcount.
5630
5631 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5632
5633 * elf32-i386.c (elf_i386_relocate_section): Fix
5634 movl foo@indntpoff, %eax IE->LE transition.
5635
5636 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5637
5638 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5639 sequence and its transitions.
5640
5641 2002-10-01 Jakub Jelinek <jakub@redhat.com>
5642
5643 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5644 to st_value + addend in non-code sections.
5645 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5646 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5647
5648 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
5649 Ken Raeburn <raeburn@cygnus.com>
5650 Aldy Hernandez <aldyh@redhat.com>
5651 Eric Christopher <echristo@redhat.com>
5652 Richard Sandiford <rsandifo@redhat.com>
5653
5654 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5655 (bfd_mach_mips5500): New.
5656 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5657 (arch_info_struct): Add corresponding entries here.
5658 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5659 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5660 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5661 bfd_mach_mips5400 and bfd_mach_mips5500.
5662 (_bfd_mips_elf_mach_extends_p): New function.
5663 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5664 the EF_MIPS_MACH flags.
5665 * bfd-in2.h: Regenerate.
5666
5667 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5668
5669 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5670 .got sections.
5671
5672 2002-09-28 Alan Modra <amodra@bigpond.net.au>
5673
5674 * elf.c (map_sections_to_segments): Correct test for start of
5675 writable section in the same page as end of read-only section.
5676
5677 2002-09-27 Matt Thomas <matt@3am-software.com>
5678
5679 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5680 local_got_refcounts usage. Remove allocation of got slot.
5681 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5682 Remove de-allocation of got slot.
5683 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5684 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5685 sections to be GC'ed.
5686 (elf_vax_instantiate_got_entries): New function.
5687 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5688 tests that are now handled by elf_vax_instantiate_got_entries.
5689 Assert GOT entry falls within .got section size. Remove redundant
5690 comparisions. Fix comments.
5691
5692 2002-09-27 Jakub Jelinek <jakub@redhat.com>
5693
5694 * reloc.c: Add x86-64 TLS relocs.
5695 * bfd-in2.h, libbfd.h: Rebuilt.
5696 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5697 relocs. Add TLS relocs.
5698 (x86_64_reloc_map): Add TLS relocs.
5699 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5700 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5701 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5702 (elf64_x86_64_hash_entry): Define.
5703 (struct elf64_x86_64_obj_tdata): New.
5704 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5705 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5706 (link_hash_newfunc): Initialize tls_type.
5707 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5708 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5709 (elf64_x86_64_mkobject): New.
5710 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5711 (elf64_x86_64_tls_transition): New.
5712 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5713 Handle TLS relocs.
5714 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5715 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5716 (elf64_x86_64_size_dynamic_sections): Likewise.
5717 (dtpoff_base, tpoff): New.
5718 (elf64_x86_64_relocate_section): Handle TLS relocs.
5719 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5720 entries.
5721 (bfd_elf64_mkobject): Define.
5722
5723 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5724 DF_STATIC_TLS if shared.
5725
5726 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5727
5728 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5729 empty relocation sections.
5730
5731 2002-09-26 Alan Modra <amodra@bigpond.net.au>
5732
5733 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5734 (ppc64_elf_build_stubs): Build them here instead.
5735
5736 2002-09-24 Jakub Jelinek <jakub@redhat.com>
5737
5738 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5739 addend into r_addend, not *r_offset.
5740 (elf32_sparc_finish_dynamic_symbol): Likewise.
5741 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5742 R_SPARC_RELATIVE's r_offset.
5743
5744 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5745
5746 * dwarf2.c (decode_line_info): Update to correctly decode
5747 the (non-standard DWARF2) out-of-order address sequences
5748 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5749
5750 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
5751
5752 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5753
5754 2002-09-23 Alan Modra <amodra@bigpond.net.au>
5755
5756 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5757 for discarded FDEs. Remove redundant assignment.
5758 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5759
5760 2002-09-22 H.J. Lu <hjl@gnu.org>
5761
5762 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5763 the relocation count between different .reloc sections.
5764
5765 2002-09-21 Alan Modra <amodra@bigpond.net.au>
5766
5767 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5768 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5769 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5770 R_PPC_EMB_RELSDA.
5771
5772 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5773 unsigned. Move "symcount" assignment out of loop.
5774 * Makefile.am: Run "make dep-am".
5775 * Makefile.in: Regenerate.
5776 * configure: Regenerate.
5777 * po/SRC-POTFILES.in: Regnerate.
5778
5779 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5780
5781 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5782 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5783 (e.g. IRIX64).
5784
5785 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5786
5787 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5788 even if generating R_PPC_RELATIVE reloc.
5789 (ppc_elf_relocate_section): Make sure relocation is performed
5790 if skip == -2. Clear memory at r_offset when creating dynamic
5791 relocation.
5792
5793 2002-09-19 Jakub Jelinek <jakub@redhat.com>
5794
5795 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5796 BFD_RELOC_386_TLS_GOTIE): Add.
5797 * bfd-in2.h, libbfd.h: Rebuilt.
5798 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5799 and R_386_TLS_GOTIE.
5800 (elf_i386_reloc_type_lookup): Handle it.
5801 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5802 char instead of enum, change GOT_* into defines.
5803 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5804 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5805 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5806 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5807 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5808 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5809 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5810 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5811 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5812 tls_type is GOT_TLS_IE_BOTH.
5813 (elf_i386_size_dynamic_sections): Likewise.
5814 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5815 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5816 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5817 all 4 GOT_TLS_* TLS types.
5818
5819 2002-09-19 Nick Clifton <nickc@redhat.com>
5820
5821 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5822 follow indirect links.
5823
5824 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5825
5826 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5827 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5828 on 64 bit machines.
5829 (ecoff_swap_sym_in) <iss>: Likewise.
5830 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5831 ECOFF information: 'ioptMax' refers to the actual *size*
5832 of the optimization symtab, not the number of entries.
5833
5834 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
5835
5836 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5837 ELF_LINK_HASH_NEEDS_PLT logic.
5838
5839 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
5840
5841 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5842 correct relocation count.
5843
5844 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
5845
5846 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5847 * bfd.c (struct _bfd): Add dynsymcount.
5848 * bfd-in2.h: Regenerated.
5849 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5850 abfd->dynsymcount.
5851 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5852 for overflow.
5853
5854 2002-09-17 Stan Cox <scox@redhat.com>
5855
5856 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5857 (mips_elf64_final_gp): Don't make up gp value.
5858 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5859 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5860 .MIPS.options/.options section.
5861
5862 2002-09-17 David O'Brien <obrien@FreeBSD.org>
5863
5864 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5865 It is benign for FreeBSD < 4.1. Minor reformatting.
5866 * elf64-alpha-fbsd.c: Likewise.
5867
5868 2002-09-17 Jakub Jelinek <jakub@redhat.com>
5869
5870 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5871 addend.
5872
5873 2002-09-17 Alan Modra <amodra@bigpond.net.au>
5874
5875 * elf64-alpha.c (alpha_elf_size_info): Make static.
5876
5877 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5878
5879 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5880 * cpu-tic4x.c: Ditto.
5881
5882 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5883
5884 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5885 duplicate define.
5886
5887 2002-09-16 Bruno Haible <bruno@clisp.org>
5888
5889 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5890 by a target variant implementation.
5891 * elf64-alpha.c: Likewise.
5892 * elf32-i386-fbsd.c: New file.
5893 * elf64-alpha-fbsd.c: New file.
5894 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5895 bfd_elf64_alpha_freebsd_vec.
5896 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5897 bfd_elf64_alpha_freebsd_vec.
5898 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5899 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5900 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5901 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5902 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5903 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5904 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5905
5906 2002-09-12 Jakub Jelinek <jakub@redhat.com>
5907
5908 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5909 NULL.
5910 (elf_i386_relocate_section): Return false after printing error about
5911 unresolvable relocation.
5912
5913 2002-09-12 Nick Clifton <nickc@redhat.com>
5914
5915 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5916 R_ARM_THM_PC11.
5917
5918 2002-09-11 Jeffrey Law <law@redhat.com>
5919
5920 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5921
5922 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5923
5924 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5925 line_ptr before deciding we've found a symbol.
5926
5927 2002-09-11 Nick Clifton <nickc@redhat.com>
5928
5929 * po/da.po: New Danish translation file.
5930 * configure.in (LINGUAS): Add 'da'.
5931 * configure: Regenerate.
5932
5933 2002-09-10 Michael Snyder <msnyder@redhat.com>
5934
5935 * irix-core.c (do_sections, do_sections64): New functions.
5936 (irix_core_core_file_p): Call new functions do_sections,
5937 do_sections64, depending on corefile (32-bit or 64-bit).
5938
5939 2002-09-09 Richard Henderson <rth@redhat.com>
5940
5941 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5942 and PCREL21F like PCREL21B.
5943
5944 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5945
5946 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5947 vector.
5948
5949 2002-09-02 Nick Clifton <nickc@redhat.com>
5950
5951 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5952 names instead of cryptically overloaded bfd_reloc error
5953 codes.
5954 (v850_elf_relocate_section): Likewise.
5955 (v850_elf_relax_section): Replace caching of external symbols
5956 with caching of internal symbols obtained from calling
5957 bfd_elf_get_elf_syms().
5958 Fixup problems with freeing cached allocated memory blocks.
5959
5960 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5961
5962 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5963 (bfd_pj_arch): Use bfd_default_scan.
5964 * cpu-v850.c (scan): Remove.
5965 (N): Use bfd_default_scan.
5966 * cpu-z8k.c (scan_mach): Remove.
5967 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5968 first. Use bfd_default_scan.
5969
5970 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5971 bfd_mach constants.
5972 (ecoff_get_magic): Likewise.
5973 * elf32-v850.c (v850_elf_object_p): Likewise.
5974 (v850_elf_final_write_processing): Likewise.
5975 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5976 (MY(write_object_contents)): Likewise.
5977 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5978 * coffcode.h (coff_write_object_contents): Likewise.
5979 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5980 Remove unnecessary "machine" assignments.
5981 (coff_write_relocs): Test for the absolute section sym by testing
5982 section and flags.
5983
5984 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5985 and bfd_mach_i386_i386_intel_syntax.
5986 * pdp11.c (NAME(aout,machine_type)): Likewise.
5987
5988 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5989
5990 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5991 * bfd-in2.h (align_power): Likewise.
5992
5993 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5994
5995 * Makefile.am: Run "make dep-am".
5996 * Makefile.in: Regenerate.
5997
5998 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5999 * cpu-powerpc.c (powerpc_compatible): Likewise.
6000 * cpu-rs6000.c (rs6000_compatible): Likewise.
6001
6002 2002-08-28 Catherine Moore <clm@redhat.com>
6003
6004 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
6005 (v850-elf-reloc): Don't resolve pc relative relocs.
6006 (v850_elf_ignore_reloc): New routine.
6007 (v850_elf_final_link_relocate): Handle new relocs.
6008 (v850_elf_relax_delete_bytes ): New routine.
6009 (v850_elf_relax_section): New routine.
6010 (bfd_elf32_bfd_relax_section): Define.
6011 (HOWTO): New entries for new relocs.
6012 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6013 (BFD_RELOC_V850_LONGJUMP): New reloc.
6014 (BFD_RELOC_V850_ALIGN): New reloc.
6015 * archures.c: Remove redundant v850ea architecture.
6016 * cpu-v850.c: Remove redundant v850ea support.
6017 * libbfd.h: Regenerate.
6018 * bfd-in2.h: Regenerated.
6019
6020 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6021
6022 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6023 * configure.in: Add tic4x_coff vector files.
6024 * configure: Regenerate.
6025 * Makefile.am: Add tic4x target.
6026 * Makefile.in: Regenerate.
6027
6028 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6029
6030 * archures.c: Add the BFD arch type tic4x.
6031 * bfd-in.h: Add BFD_IN_MEMORY flag.
6032 * coff-tic4x.c: New file.
6033 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6034 * cpu-tic4x.c: New file.
6035 * targets.c: Added tic4x- in list of xvecs.
6036 * ticoff.h: New file.
6037 * bfd-in2.h: Regenerate.
6038
6039 2002-08-27 Adam Nemet <anemet@lnxw.com>
6040
6041 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6042 bit of DT_INIT and DT_FINI for Thumb functions.
6043
6044 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6045
6046 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6047
6048 2002-08-26 Alan Modra <amodra@bigpond.net.au>
6049
6050 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6051
6052 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6053
6054 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6055 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6056 Likewise.
6057 (struct elf_sh_pcrel_relocs_copied): Removed.
6058 (struct elf_sh_dyn_relocs): New.
6059 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6060 field with dyn_relocs.
6061 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6062 sections and sym_sec.
6063 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6064 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6065 (sh_elf_create_dynamic_sections): Use create_got_section instead
6066 of _bfd_elf_create_got_section.
6067 (sh_elf_check_relocs): Likewise.
6068 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6069 sections.
6070 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6071 sh_elf_relocate_section, sh_elf_check_relocs,
6072 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6073 Likewise.
6074 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6075 dynamic relocations and avoiding the copy relocation when we
6076 didn't find any dynamic relocations in the section which has
6077 contents or is read-only.
6078 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6079 (sh_elf_size_dynamic_sections): Don't reset the size of
6080 .rela.got section even if dynamic_sections_created flag is off.
6081 Don't use sh_elf_discard_copies. Scan all input bfd and use
6082 allocate_dynrelocs. Call readonly_dynrelocs to determine
6083 whether we need DT_TEXTREL.
6084 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6085 whether the symbol was never referred to.
6086 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6087 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6088 (sh_elf_check_relocs): Call create_got_section if the short-cut
6089 to .got is null. Increment reference counters only instead of
6090 allocating space on dynamic sections here. Don't conditionalize
6091 uninitialized got.offset value when marking the symbol as a
6092 global offset table entry. Keep relocations for symbols satisfied
6093 by a dynamic library to avoid copy relocations for the symbol.
6094 Set dynobj field of an elf hash table if needed.
6095 (sh_elf_finish_dynamic_sections): Handle null section pointer
6096 correctly.
6097 (elf_backend_copy_indirect_symbol): Defined.
6098 (elf_backend_can_refcount): Defined.
6099
6100 2002-08-23 Nick Clifton <nickc@redhat.com>
6101
6102 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6103 previous change. Add comment explaining why.
6104
6105 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6106
6107 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6108 contents of .got.plt[2] to tr0, not address of .got.plt.
6109 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6110 patching absolute plt entry. For shmedia plt entry, set bottom bit
6111 of branch to plt0 as this is a branch to an shmedia instruction.
6112 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6113 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6114 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6115 branch to plt0.
6116 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6117 patching absolute plt entry. For shmedia plt entry, branch to
6118 plt0 is now ptrel, so use relative offset. Set bottom bit of
6119 branch target as it is a branch to an shmedia instruction.
6120
6121 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6122 Richard Shann <richard.shann@superh.com>
6123
6124 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6125 value if .init is an SHmedia function. Similarly for DT_FINI.
6126 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
6127
6128 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6129
6130 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
6131 dynamic section.
6132 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
6133
6134 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6135
6136 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
6137 byte read when reading the return address register column.
6138
6139 2002-08-22 Nick Clifton <nickc@redhat.com>
6140
6141 * config.bfd: Add powepc64-*-*bsd* target.
6142
6143 2002-08-22 Graeme Peterson <gp@qnx.com>
6144
6145 * Makefile.am: Add entries for elf32-shqnx.c
6146 * Makefile.in: Regenerate.
6147 * config.bfd: Add support sh-*-nto* target.
6148 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6149 * configure: Regenerate.
6150 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6151 * elf32-sh.c: Do not include elf32-target.h if
6152 ELF32_SH_C_INCLUDED is defined.
6153 * elf32-shqnx.c: New file: Support for QNX.
6154 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6155
6156 2002-08-22 Nick Clifton <nickc@redhat.com>
6157
6158 * po/tr.po: Updated Turkish translation.
6159
6160 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6161 symbols are not read.
6162
6163 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6164
6165 * elf32-m68hc11.c: Formatting fixes.
6166 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6167 * elf32-m68hc12.c: Formatting fixes.
6168 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6169
6170 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6171
6172 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6173 SEC_DATA.
6174 (pmac_xcoff_vec): Likewise.
6175 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6176 (aix5coff64_vec): Likewise.
6177
6178 2002-08-22 Alan Modra <amodra@bigpond.net.au>
6179
6180 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6181 param to elf_backend_copy_indirect_symbol.
6182 (_bfd_elf_link_hash_copy_indirect): Likewise.
6183 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6184 calls to copy_indirect_symbol.
6185 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6186 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6187 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6188 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6189 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6190 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6191 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6192 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6193 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6194 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6195 test refcounts for "used" values.
6196
6197 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6198
6199 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6200 argument declaration.
6201
6202 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
6203
6204 * archures.c (bfd_mach_ppc_e500): Added.
6205 * bfd-in2.h: Rebuilt.
6206 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6207
6208 2002-08-19 Alan Modra <amodra@bigpond.net.au>
6209
6210 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6211
6212 2002-08-17 Andrew Cagney <ac131313@redhat.com>
6213
6214 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
6215 `bfd_byte'.
6216
6217 2002-08-17 Stan Cox <scox@redhat.com>
6218
6219 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6220 IRIX 6 segment layout for NEWABI.
6221
6222 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6223
6224 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
6225 symbols when looking for section referred to by a relocation.
6226 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
6227
6228 2002-08-15 Alan Modra <amodra@bigpond.net.au>
6229
6230 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6231
6232 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
6233
6234 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6235 missing check for whether the symbol is referenced by DSO before
6236 unexporting it as an unneeded dynamic symbol.
6237
6238 2002-08-14 H.J. Lu <hjl@gnu.org>
6239
6240 * libbfd.h: Regenerate.
6241
6242 2002-08-14 H.J. Lu <hjl@gnu.org>
6243
6244 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6245
6246 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6247
6248 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6249 instructions.
6250 (m68hc11_direct_relax): New to define table of relaxable instructions.
6251 (find_relaxable_insn): New, find a relaxable insn.
6252 (compare_reloc): New to compare two relocs.
6253 (m68hc11_elf_relax_section): New, relax text sections.
6254 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6255 (elf32_m68hc11_check_relocs): New function for GC support.
6256 (elf32_m68hc11_relocate_section): New function for GC support.
6257 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6258 (elf_backend_check_relocs): Likewise.
6259 (elf_backend_relocate_section): Likewise.
6260
6261 2002-08-13 H.J. Lu <hjl@gnu.org>
6262
6263 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6264 definitions in shared objects when checking symbol with
6265 undefined version.
6266
6267 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6268
6269 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6270 (elf32_m68hc11_gc_sweep_hook): Likewise.
6271 (elf_backend_gc_mark_hook): Define for GC section support.
6272 (elf_backend_gc_sweep_hook): Likewise.
6273 (elf_backend_can_gc_sections): Likewise.
6274
6275 * elf32-m68hc12.c: Likewise.
6276
6277 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6278
6279 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6280 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6281 (_bfd_m68hc11_elf_set_private_flags): New function.
6282 Use them to set/check/print ELF flags specific to 68HC11.
6283
6284 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6285 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6286 (_bfd_m68hc12_elf_set_private_flags): New function.
6287 Use them to set/check/print ELF flags specific to 68HC12.
6288
6289 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6290
6291 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6292 fix masks for PC-rel relocs.
6293 (m68hc11_elf_ignore_reloc): New function.
6294
6295 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6296 68HC12 banked addressing relocs.
6297 (m68hc12_phys_addr): New to compute physical address of banked memory.
6298 (m68hc12_phys_page): Likewise for page.
6299 (m68hc12_addr_is_banked): New to see if address is in banked area.
6300 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6301
6302 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6303
6304 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6305 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6306 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6307 * bfd-in2.h: Regenerate.
6308
6309 2002-08-12 H.J. Lu <hjl@gnu.org>
6310
6311 * elflink.h (elf_add_default_symbol): Preserve section across
6312 elf_merge_symbol.
6313
6314 2002-08-09 Graeme Peterson <gp@qnx.com>
6315
6316 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
6317 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6318 * Makefile.in: Regenerate.
6319 * config.bfd: Add support for powerpc{le}-*-nto targets.
6320 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6321 * configure: Regenerate.
6322 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6323 common file "elf32-qnx.h", and now include that file.
6324 * elf32-qnx.h: New file: QNX specific common elf backend.
6325 * elf32-ppc.c: Do not include elf32-target.h if
6326 ELF32_PPC_C_INCLUDED is defined.
6327 * elf32-ppcqnx.c: New file: Support for QNX.
6328 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6329 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6330
6331 2002-08-09 Nick Clifton <nickc@redhat.com>
6332
6333 * po/sv.po: Updated Swedish translation.
6334
6335 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6336
6337 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6338 g->global_gotsym is NULL.
6339
6340 2002-08-08 H.J. Lu <hjl@gnu.org>
6341
6342 * elflink.h (elf_add_default_symbol): Don't warn if a definition
6343 overrides an indirect versioned symbol.
6344
6345 2002-08-08 Jakub Jelinek <jakub@redhat.com>
6346
6347 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6348 for R_386_TLS_TPOFF32 relocs against symndx 0.
6349
6350 2002-08-07 H.J. Lu <hjl@gnu.org>
6351
6352 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6353 with undefined version if needed.
6354 (elf_link_assign_sym_version): Match a default symbol with a
6355 version without definition. No need to hide the default
6356 definition separately.
6357
6358 2002-08-08 Alan Modra <amodra@bigpond.net.au>
6359
6360 * elflink.h (elf_link_output_extsym): Don't output symbols from
6361 SEC_EXCLUDE sections.
6362
6363 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6364
6365 2002-08-07 Alan Modra <amodra@bigpond.net.au>
6366
6367 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6368 entries.
6369
6370 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6371
6372 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6373 mismatch.
6374
6375 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6376
6377 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6378
6379 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6380
6381 * elf32-mips.c (mips_reloc_map): Fix typo.
6382
6383 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6384
6385 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6386
6387 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6388
6389 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6390
6391 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6392
6393 * libxcoff.h: Use PARAMS on function declarations.
6394 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6395 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6396
6397 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6398 addend.
6399 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6400
6401 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6402
6403 * coff-rs6000.c: Formatting fixes.
6404 (xcoff_calculate_relocation): Use PARAMS in declaration.
6405 (xcoff_complain_overflow): Likewise.
6406 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6407 (bfd_xcoff_backend_data): Remove useless comments.
6408 (rs6000coff_vec): Likewise.
6409 (bfd_pmac_xcoff_backend_data): Likewise.
6410 (pmac_xcoff_vec): Likewise.
6411
6412 * coff64-rs6000.c: Formatting fixes.
6413 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6414 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6415 (bfd_xcoff_backend_data): Remove useless comments.
6416 (rs6000coff64_vec): Likewise.
6417 (bfd_xcoff_aix5_backend_data): Likewise.
6418 (aix5coff64_vec): Likewise.
6419
6420 2002-08-06 Alan Modra <amodra@bigpond.net.au>
6421
6422 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6423 mask entries. Use complain_overflow_dont for R_REF.
6424 (xcoff_reloc_type_ba): Revert last change.
6425 (xcoff_reloc_type_br): Likewise.
6426 (xcoff_reloc_type_crel): Likewise.
6427 (xcoff_ppc_relocate_section): Likewise.
6428 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6429 (xcoff64_ppc_relocate_section): Likewise.
6430 (xcoff64_howto_table): Revert some of last change to mask entries.
6431 Use complain_overflow_dont for R_REF.
6432
6433 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6434 relocs with bitsize == 16 have size = 1.
6435 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6436 (xcoff_reloc_type_br): Likewise.
6437 (xcoff_reloc_type_crel): Likewise.
6438 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6439 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6440 dst_mask adjustment.
6441 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6442 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6443 bitsize == 16 have size = 1.
6444
6445 2002-08-01 Denis Chertykov <denisc@overta.ru>
6446
6447 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6448 (struct misc): New field isymbuf. All free_* fields removed.
6449 (symbol_value): Pass in internal syms. No need to swap syms in.
6450 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6451 possibly cached info.
6452 (tidyup_after_error): Removed.
6453 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6454 misc. Use new field.
6455 (adjust_all_relocations): Use internal syms. No need to swap syms
6456 in and out.
6457 (add_page_insn): Don't use removed fields of struct misc.
6458
6459 2002-08-01 Nick Clifton <nickc@redhat.com>
6460
6461 * elf32-arm.h: Revert previous delta.
6462
6463 2002-08-01 Nick Clifton <nickc@redhat.com>
6464
6465 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6466 * configure: Regenerate.
6467
6468 2002-07-31 H.J. Lu <hjl@gnu.org>
6469
6470 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6471 selected.
6472
6473 2002-07-31 H.J. Lu <hjl@gnu.org>
6474
6475 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6476 is selected.
6477
6478 2002-07-31 Jakub Jelinek <jakub@redhat.com>
6479
6480 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6481 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6482
6483 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6484
6485 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6486 There is no 8 byte relocation type for this architecture.
6487 (do_ns32k_reloc): Use bfd_vma instead of native types.
6488 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6489 returns void.
6490 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6491 rely on generic code to do that.
6492 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6493 to all table entries.
6494 (_bfd_ns32k_relocate_contents): put_data returns void.
6495 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6496 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6497 return void.
6498
6499 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6500
6501 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6502 archive object is target dependant.
6503
6504 2002-07-31 Adam Nemet <anemet@lnxw.com>
6505
6506 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6507 (THUMB_PLT_ENTRY_SIZE): New macro.
6508 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6509 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6510 ARM_PLT_ENTRY_SIZE.
6511 (elf32_arm_plt_entry): Likewise.
6512 (elf_backend_plt_header_size): Likewise.
6513 (elf32_thumb_plt0_entry): New global.
6514 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6515 into .plt.thumb.
6516 (elf32_thumb_plt_entry): New global.
6517 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6518 Thumb entries. Set the bottom bit of the corresponding GOT entry
6519 for a Thumb PLT entry.
6520 (struct elf32_arm_plt_entry_info): New structure.
6521 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6522 type.
6523 (elf32_arm_link_hash_newfunc): Initialize new member.
6524 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6525 relocations against the PLT.
6526 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6527 first_rel_type if this is the first time we encounter the symbol.
6528 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6529 Determine if relocation needs a PLT entry. Set first_rel_type if
6530 this is the first time we encounter the symbol
6531 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6532 functions as well.
6533 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6534 (elf32_arm_create_dynamic_sections): New function. Create the
6535 .plt.thumb section.
6536 (elf_backend_create_dynamic_sections): Call it.
6537
6538 2002-07-31 Nick Clifton <nickc@redhat.com>
6539
6540 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6541 'alternative' in order to avoid shadowing global symbol of the
6542 same name.
6543 * bfd-in2.h: Regenerate.
6544 * libbfd.h: Regenerate.
6545 * libcoff.h: Regenerate.
6546
6547 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6548
6549 * Makefile.am: Add n32 ABI support.
6550 * Makefile.in: Regenerate.
6551 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6552 bit vectors for mips*-*-linux targets as optional.
6553 * configure.in: Add n32 ABI vectors.
6554 * configure: Regenerate.
6555 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6556 * elfn32-mips.c: New file, n32 ABI support.
6557 * targets.c: Add n32 ABI vectors.
6558
6559 2002-07-30 Graeme Peterson <gp@qnx.com>
6560
6561 * elfarmqnx-nabi.c: New file: Support for QNX.
6562 * config.bfd: Add support for arm-*-nto target.
6563 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6564 * configure: Regenerate.
6565 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6566 * Makefile.in: Regenerate.
6567 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6568 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6569 * elfarm-nabi.c: Do not include elf32-arm.h if
6570 ELFARM_NABI_C_INCLUDED is defined.
6571 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
6572
6573 2002-07-30 Nick Clifton <nickc@redhat.com>
6574
6575 * po/sv.po: Updated Swedish translation.
6576
6577 2002-07-30 Jakub Jelinek <jakub@redhat.com>
6578
6579 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6580
6581 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6582
6583 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6584 * archive.c (bfd_generic_archive_p): Likewise.
6585 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6586 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6587 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6588 (xcoff64_archive_p): Likewise.
6589 (xcoff64_openr_next_archived_file): Likewise.
6590 (xcoff64_archive_p): Clean up tdata properly on error.
6591 * coffgen.c (coff_real_object_p): Likewise.
6592 (coff_object_p): Release filehdr and opthdr.
6593 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6594 * ieee.c (ieee_archive_p): Likewise.
6595 * ihex.c (ihex_object_p): Likewise.
6596 (ihex_mkobject): Always allocate tdata.
6597 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6598 * srec.c (srec_mkobject): Always allocate tdata.
6599 (srec_object_p): Clean up tdata properly on error.
6600 (symbolsrec_object_p): Likewise.
6601 * versados.c (versados_object_p): Likewise.
6602 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6603 and bfd_realloc instead of realloc.
6604 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6605 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6606 place of bfd_malloc, simplifying error freeing. Free hash table too.
6607 (vms_object_p): Clean up tdata on error.
6608 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6609 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6610
6611 2002-07-30 Alan Modra <amodra@bigpond.net.au>
6612
6613 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6614
6615 2002-07-26 Chris Demetriou <cgd@broadcom.com>
6616
6617 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6618 flags into resulting BFD.
6619
6620 2002-07-26 Alan Modra <amodra@bigpond.net.au>
6621
6622 From John Reiser <jreiser@BitWagon.com>
6623 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6624 tls_ldm_got.refcount.
6625
6626 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6627
6628 * elf64-mips.c: Update TODO comment.
6629 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6630 mips_elf64_gprel16_reloca): Remove prototypes.
6631 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6632 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6633 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6634 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6635 R_MIPS_HIGHEST.
6636 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6637 R_MIPS_GOT16. Remove wrong comments.
6638 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6639 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6640 from elf32-mips.c.
6641 (mips_elf64_hi16_reloc): Fix formatting.
6642 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6643 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6644 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6645 (mips_elf64_gprel16_reloc): Make static. Add check for
6646 partial_inplace.
6647 (mips_elf64_gprel16_reloca): Remove.
6648 (mips_elf64_literal_reloc): New function.
6649 (mips_elf64_gprel32_reloc): Fix formatting.
6650 (mips_elf64_shift6_reloc): Fix comment. Make static.
6651 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6652 elf32-mips.c.
6653 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6654 elf32-mips.c
6655 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6656 specific relocations.
6657 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6658 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6659 (ELF_MAXPAGESIZE): Add comment.
6660
6661 2002-07-25 Nick Clifton <nickc@redhat.com>
6662
6663 * po/sv.po: Updated Swedish translation.
6664 * po/es.po: Updated Spanish translation.
6665 * po/fr.po: Updated French translation.
6666
6667 2002-07-25 Alan Modra <amodra@bigpond.net.au>
6668
6669 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6670 as elf_link_record_local_dynamic_symbol.
6671 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6672 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6673 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6674 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6675 attempt is made to record a symbol in a discarded section, and
6676 return `2' in that case.
6677
6678 2002-07-24 Nick Clifton <nickc@redhat.com>
6679
6680 * po/sv.po: Updated Swedish translation.
6681 * po/es.po: Updated Spanish translation.
6682
6683 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6684
6685 * po/SRC-POTFILES.in: Regenerate.
6686
6687 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6688 immediately. Remove code handling relocatable linking.
6689 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6690 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6691 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
6692 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6693 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6694 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6695 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6696 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6697 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6698 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6699 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6700 * elf32-avr.c (elf_backend_rela_normal): Define.
6701 * elf32-cris.c: Likewise.
6702 * elf32-fr30.c: Likewise.
6703 * elf32-frv.c: Likewise.
6704 * elf32-h8300.c: Likewise.
6705 * elf32-hppa.c: Likewise.
6706 * elf32-ip2k.c: Likewise.
6707 * elf32-sparc.c: Likewise.
6708 * elf32-v850.c: Likewise.
6709 * elf32-vax.c: Likewise.
6710 * elf64-hppa.c: Likewise.
6711 * elf64-sparc.c: Likewise.
6712 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
6713 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
6714 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6715 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6716 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6717 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6718 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6719 * elf-m10200.c (USE_RELA): Don't define.
6720 * elf-m10300.c: Likewise.
6721 * elfarm-oabi.c: Likewise.
6722 * elf32-i370.c: Likewise.
6723 * elf32-ip2k.c: Likewise.
6724 * elf32-m68k.c: Likewise.
6725 * elf32-mcore.c: Likewise.
6726 * elf32-ppc.c: Likewise.
6727 * elf32-s390.c: Likewise.
6728 * elf32-vax.c: Likewise.
6729 * elf64-ppc.c: Likewise.
6730 * elf64-s390.c: Likewise.
6731 * elf64-x86-64.c: Likewise.
6732 * elfxx-ia64.c: Likewise.
6733 * elf32-avr.c (USE_REL): Don't undef.
6734 * elf32-ip2k.c: Likewise.
6735
6736 2002-07-23 Nick Clifton <nickc@redhat.com>
6737
6738 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6739 'want_p_paddr_set_to_zero'.
6740 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6741 to false;
6742 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6743 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6744
6745 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6746
6747 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6748 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6749 show the Copyright string.
6750 Minor formatting tidy ups.
6751
6752 2002-07-23 Nick Clifton <nickc@redhat.com>
6753
6754 * po/fr.po: Updated French translation.
6755 * po/sv.po: Updated Swedish translation.
6756
6757 2002-07-23 Alan Modra <amodra@bigpond.net.au>
6758
6759 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6760 when outputting relocs.
6761
6762 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6763
6764 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6765 DT_PLTGOT into the dynamic section if there is a PLT.
6766
6767 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6768
6769 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6770 elf32-mips.c.
6771 (_bfd_mips_elf_write_section): Likewise.
6772 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6773 (_bfd_mips_elf_write_section): Likewise.
6774 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6775 (elf32_mips_write_section): Likewise.
6776 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6777 (_bfd_mips_elf_write_section): Likewise.
6778
6779 2002-07-19 Alan Modra <amodra@bigpond.net.au>
6780
6781 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6782 PT_IA_64_UNWIND segments for a given section.
6783
6784 2002-07-17 H.J. Lu <hjl@gnu.org>
6785
6786 * Makefile.am: Fix a typo.
6787 * Makefile.in: Regenerate.
6788
6789 2002-07-15 Denis Chertykov <denisc@overta.ru>
6790 Frank Ch. Eigler <fche@redhat.com>
6791 Ben Elliston <bje@redhat.com>
6792 Alan Lehotsky <alehotsky@cygnus.com>
6793 John Healy <jhealy@redhat.com>
6794 Graham Stott <grahams@redhat.com>
6795 Jeff Johnston <jjohnstn@redhat.com>
6796
6797 * Makefile.am: Add support for ip2k.
6798 * Makefile.in: Regenerate.
6799 * doc/Makefile.in: Regenerate.
6800 * archures.c: Add support for ip2k.
6801 * config.bfd: Add support for ip2k.
6802 * configure.in: Add support for ip2k.
6803 * configure: Regenerate.
6804 * reloc.c: Add support for ip2k.
6805 * targets.c: Add support for ip2k.
6806 * bfd-in2.h: Regenerate.
6807 * libbfd.h: Regenerate.
6808 * cpu-ip2k.c: New file.
6809 * elf32-ip2k.c: New file.
6810
6811 2002-07-17 Ian Rickards <irickard@arm.com>
6812
6813 * dwarf2.c (concat_filename): If we can't establish the directory
6814 just return the filename.
6815
6816 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
6817
6818 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6819
6820 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6821
6822 * elflink.h: Formatting fixes, tidy prototypes.
6823 (elf_link_assign_sym_version): Move common code out of loop.
6824
6825 2002-07-16 Alan Modra <amodra@bigpond.net.au>
6826
6827 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6828 reloc section size is zero. Correct reloc output location.
6829
6830 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6831
6832 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6833 the final type for the e_fsel selector when generating PA2.0W code.
6834 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6835 relocations.
6836
6837 2002-07-14 H.J. Lu <hjl@gnu.org>
6838
6839 * elflink.h (elf_link_assign_sym_version): Hide the default
6840 definition if there is a hidden versioned definition.
6841
6842 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
6843
6844 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6845 dynamic reference test in assertion when initializing GOT with
6846 static contents. Just assert that there are either no dynamic
6847 sections, the symbol is defined in the regular objects or that the
6848 symbol is undef weak. Tweak comment.
6849 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6850 only if the symbol isn't defined in the program and isn't undef
6851 weak.
6852 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6853 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6854 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6855 (elf_cris_discard_excess_program_dynamics): Don't consider
6856 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6857
6858 2002-07-11 Alan Modra <amodra@bigpond.net.au>
6859
6860 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6861 unresolved debugging relocs in dynamic applications.
6862 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6863 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6864 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6865 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6866 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6867 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6868
6869 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6870
6871 * elf64-ppc.c (ONES): Define.
6872 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6873 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6874 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6875
6876 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6877 (ppc64_elf_set_private_flags): Delete.
6878 (ppc64_elf_section_from_shdr): Delete.
6879 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6880 (ppc64_elf_fake_sections): Delete.
6881 (bfd_elf64_bfd_set_private_flags): Don't define.
6882 (bfd_elf64_get_symbol_info): Likewise.
6883 (elf_backend_section_from_shdr): Likewise.
6884 (elf_backend_fake_sections): Likewise.
6885
6886 2002-07-10 Marco Walther <Marco.Walther@sun.com>
6887
6888 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6889 when not already set.
6890 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6891 (elf_backend_fake_sections): Define.
6892
6893 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6894
6895 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6896 Formatting.
6897 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6898
6899 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
6900
6901 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6902 NULL sym_hashes to just before use.
6903 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6904 symbol with non-default visibility.
6905 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6906 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6907 Ditto.
6908 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6909 symbol with non-default visibility.
6910 (cris_elf_check_relocs): At tests for local symbol before
6911 increasing h->plt.refcount, also check for non-default
6912 visibility. Ditto when checking for local symbol to eliminate
6913 pc-relative runtime relocs.
6914
6915 2002-07-08 Alan Modra <amodra@bigpond.net.au>
6916
6917 * elf.c: Formatting.
6918 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6919 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6920 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6921 segments.
6922
6923 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6924 Alan Modra <amodra@bigpond.net.au>
6925
6926 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6927 account the impact of relocation count overflow when computing
6928 section offsets.
6929 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6930 or not to apply the PE COFF reloc overflow handling. Fix a
6931 fencepost error in deciding whether or not to use that technique.
6932
6933 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6934
6935 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6936 change type of locsyms.
6937 (bfd_elf_get_elf_syms): Declare.
6938 * elf.c (bfd_elf_get_elf_syms): New function.
6939 (group_signature): Use bfd_elf_get_elf_syms.
6940 (bfd_section_from_r_symndx): Likewise.
6941 * elfcode.h (elf_slurp_symbol_table): Likewise.
6942 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6943 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6944 locality of various data structures. Properly free internal relocs.
6945 (elf_bfd_final_link): Properly free internal relocs.
6946 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6947 (elf_link_input_bfd): Likewise.
6948 (elf_gc_mark): Likewise. Properly free internal relocs.
6949 (elf_gc_sweep): Properly free internal relocs.
6950 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6951 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6952 internal relocs.
6953 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6954 Properly free possibly cached info.
6955 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6956 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6957 symbol swapping code.
6958 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6959 Properly free possibly cached info.
6960 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6961 (mn10300_elf_relax_delete_bytes): Likewise.
6962 (mn10300_elf_symbol_address_p): Likewise.
6963 (mn10300_elf_get_relocated_section_contents): Likewise.
6964 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6965 (elf32_h8_relax_delete_bytes): Likewise.
6966 (elf32_h8_symbol_address_p): Likewise.
6967 (elf32_h8_get_relocated_section_contents): Likewise.
6968 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6969 (m32r_elf_relax_delete_bytes): Likewise.
6970 (m32r_elf_get_relocated_section_contents): Likewise.
6971 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6972 elf_section_data to determine whether cached.
6973 (sh_elf_relax_section): As above for elf-m10200.c.
6974 (sh_elf_relax_delete_bytes): Likewise.
6975 (sh_elf_get_relocated_section_contents): Likewise.
6976 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6977 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6978 reading of local syms.
6979 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6980 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6981 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6982 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6983 relocs.
6984 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6985 free internal relocs and section contents. Don't read symbols.
6986 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6987 (elf32_hppa_size_stubs): Don't free local syms.
6988 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6989 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6990 possibly cached info.
6991 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6992 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6993 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6994 all_local_syms.
6995 (get_local_syms): Delete function.
6996 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6997 on exit.
6998 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6999
7000 2002-07-05 Jim Wilson <wilson@redhat.com>
7001
7002 * syms.c (decode_section_type): New.
7003 (bfd_decode_symclass): Call decode_section_type.
7004
7005 2002-07-04 Jakub Jelinek <jakub@redhat.com>
7006
7007 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7008 section content start.
7009 Reported by Michael Schumacher <mike@hightec-rt.com>.
7010
7011 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7012
7013 * section.c (_bfd_strip_section_from_output): Remove unnecessary
7014 link order code. Don't actually remove the output section here;
7015 Just set a flag for the linker to do so.
7016 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7017 sections when setting up output section dynsyms.
7018
7019 2002-07-04 Alan Modra <amodra@bigpond.net.au>
7020
7021 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7022 fudge.
7023 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7024 libs here instead.
7025
7026 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7027
7028 * elf64-s390.c (create_got_section): Set .got section alignment to
7029 8 bytes.
7030 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7031
7032 2002-07-02 Alan Modra <amodra@bigpond.net.au>
7033
7034 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7035
7036 2002-07-01 Matt Thomas <matt@3am-software.com>
7037
7038 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7039 to EF_VAX_*.
7040
7041 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7042
7043 * elfxx-mips.c (ABI_64_P): Fix comment.
7044 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7045 new section names for N64 ABI.
7046 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7047 (mips_elf_calculate_relocation): Code formatting.
7048 (mips_elf_create_dynamic_relocation): Likewise.
7049 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7050 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7051 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7052 in any NewABI.
7053 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7054 for NewABI.
7055 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7056 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7057 here, too.
7058
7059 2002-07-01 Andreas Schwab <schwab@suse.de>
7060
7061 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7062 R_X86_64_64 to R_X86_64_RELATIVE.
7063
7064 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7065
7066 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7067 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7068 Run "make dep-am".
7069 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7070 host_aout_vec.
7071 * configure.in (vaxbsd_vec): Add.
7072 * targets.c (vaxbsd_vec): Add.
7073 * Makefile.in: Rebuild.
7074 * configure: Rebuild.
7075 * po/SRC-POTFILES.in: Rebuild.
7076
7077 2002-07-01 Alan Modra <amodra@bigpond.net.au>
7078
7079 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7080 examining to gc_mark_hook, rather than the bfd.
7081 (elf_gc_sections): Adjust.
7082 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7083 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7084 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7085 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7086 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7087 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7088 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7089 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7090 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7091 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7092 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7093 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7094 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7095 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7096 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7097 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7098 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7099 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7100 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7101 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7102 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7103 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7104 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7105 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7106 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7107 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7108 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7109 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7110 redundant local sym tests.
7111 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7112 (link_hash_newfunc): Init is_entry.
7113 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7114 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7115 (create_linkage_sections): Use bfd_make_section_anyway rather than
7116 bfd_make_section.
7117 (ppc64_elf_mark_entry_syms): New function.
7118 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7119 up opd entry to function section map.
7120 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7121 relocs that reference the opd section.
7122 (edit_opd): New function.
7123 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7124 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7125 (get_local_syms): Do so here. Exit if we already have local syms.
7126 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7127 read local syms on non-ELF input.
7128 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7129 than duplicating it's function here. Adjust free of internal
7130 relocs to suit.
7131 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7132 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7133 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7134 _bfd_elf32_link_read_relocs rather than duplicating it's function
7135 here. Adjust free of internal relocs to suit.
7136
7137 2002-07-01 Andreas Jaeger <aj@suse.de>
7138
7139 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7140 are not allowed in shared libs code, enforce -fPIC.
7141
7142 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7143
7144 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7145 trailing zero-sequences when there's previous left-over data.
7146
7147 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7148
7149 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7150 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7151 and opd_rel_sec in order for starting rela section. Check _raw_size.
7152 (elf_backend_reloc_type_class): Define.
7153
7154 2002-06-27 Kevin Buettner <kevinb@redhat.com>
7155
7156 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7157 DWARF2 formats.
7158
7159 2002-06-27 Alan Modra <amodra@bigpond.net.au>
7160
7161 * cpu-powerpc.c: Comment on ordering of arch_info.
7162 * elf32-ppc.c (ppc_elf_object_p): New function.
7163 (elf_backend_object_p): Define.
7164 * elf64-ppc.c (ppc64_elf_object_p): New function.
7165 (elf_backend_object_p): Define.
7166
7167 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7168
7169 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7170 * configure: Regenerate.
7171
7172 2002-06-25 Jason Eckhardt <jle@rice.edu>
7173
7174 * dwarf2.c (decode_line_info): Check unit->addr_size
7175 to read in the proper number of prologue bytes.
7176
7177 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7178
7179 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7180 aix5coff64_vec if 64-bit bfd support has been enabled.
7181 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7182 been enabled.
7183
7184 * targets.c (_bfd_target_vector[]): Only include
7185 aix5coff64_vec if 64-bit bfd support has been enabled.
7186
7187 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7188
7189 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7190 * elf32-hppa.c (hppa_add_stub): Likewise.
7191 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7192 * elflink.h (elf_add_default_symbol): Fix comment typo.
7193 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7194 (elf_link_add_object_symbols): Likewise.
7195 (elf_link_assign_sym_version): Likewise.
7196 * hash.c (bfd_hash_lookup): Likewise.
7197 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7198 * section.c (bfd_get_unique_section_name): Likewise.
7199 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7200 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7201 (assign_section_numbers): Likewise.
7202 (_bfd_elfcore_make_pseudosection): Likewise.
7203 (elfcore_grok_lwpstatus): Likewise.
7204 (elfcore_grok_win32pstatus): Likewise.
7205 (elfcore_write_note): Constify input params. Use PTR instead of
7206 void *. Include terminating NUL in namesz. Correct padding.
7207 Support NULL "name" param. Use memcpy instead of strcpy.
7208 (elfcore_write_prpsinfo): Constify input params.
7209 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7210 (elfcore_write_lwpstatus): Likewise.
7211 (elfcore_write_pstatus): Likewise.
7212 (elfcore_write_prfpreg): Likewise.
7213 (elfcore_write_prxfpreg): Likewise.
7214 * elf-bfd.h (elfcore_write_note): Update declaration.
7215 (elfcore_write_prpsinfo): Likewise.
7216 (elfcore_write_prstatus): Likewise.
7217 (elfcore_write_pstatus): Likewise.
7218 (elfcore_write_prfpreg): Likewise.
7219 (elfcore_write_prxfpreg): Likewise.
7220 (elfcore_write_lwpstatus): Likewise.
7221
7222 2002-06-25 Jason Eckhardt <jle@rice.edu>
7223
7224 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7225 symbols of type stProc and stStaticProc.
7226
7227 2002-06-25 Nick Clifton <nickc@redhat.com>
7228
7229 * ecoff.c: VArious formatting fixes.
7230
7231 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7232
7233 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7234
7235 2002-06-25 Alan Modra <amodra@bigpond.net.au>
7236
7237 * aout-adobe.c: Don't compare against "true" or "false.
7238 * aout-target.h: Likewise.
7239 * aoutx.h: Likewise.
7240 * archive.c: Likewise.
7241 * bout.c: Likewise.
7242 * cache.c: Likewise.
7243 * coff-a29k.c: Likewise.
7244 * coff-alpha.c: Likewise.
7245 * coff-i386.c: Likewise.
7246 * coff-mips.c: Likewise.
7247 * coff-or32.c: Likewise.
7248 * coff64-rs6000.c: Likewise.
7249 * coffcode.h: Likewise.
7250 * coffgen.c: Likewise.
7251 * cpu-ns32k.c: Likewise.
7252 * ecoff.c: Likewise.
7253 * ecofflink.c: Likewise.
7254 * elf.c: Likewise.
7255 * elf32-arm.h: Likewise.
7256 * elf32-cris.c: Likewise.
7257 * elf32-d30v.c: Likewise.
7258 * elf32-i386.c: Likewise.
7259 * elf32-mcore.c: Likewise.
7260 * elf32-ppc.c: Likewise.
7261 * elf32-sh.c: Likewise.
7262 * elf32-sh64.c: Likewise.
7263 * elf32-v850.c: Likewise.
7264 * elf64-alpha.c: Likewise.
7265 * elf64-sh64.c: Likewise.
7266 * elfcode.h: Likewise.
7267 * elfcore.h: Likewise.
7268 * elflink.h: Likewise.
7269 * elfxx-mips.c: Likewise.
7270 * i386os9k.c: Likewise.
7271 * ieee.c: Likewise.
7272 * libbfd.c: Likewise.
7273 * linker.c: Likewise.
7274 * mmo.c: Likewise.
7275 * nlm32-alpha.c: Likewise.
7276 * nlm32-i386.c: Likewise.
7277 * nlm32-ppc.c: Likewise.
7278 * nlm32-sparc.c: Likewise.
7279 * nlmcode.h: Likewise.
7280 * oasys.c: Likewise.
7281 * pdp11.c: Likewise.
7282 * peicode.h: Likewise.
7283 * reloc.c: Likewise.
7284 * som.c: Likewise.
7285 * srec.c: Likewise.
7286 * tekhex.c: Likewise.
7287 * vms.c: Likewise.
7288 * xcofflink.c: Likewise.
7289 * elf64-sparc.c: Edit comment to not use "== false".
7290
7291 * aoutf1.h: Don't use "? true : false".
7292 * ecoff.c: Likewise.
7293 * format.c: Likewise.
7294 * ieee.c: Likewise.
7295 * linker.c: Likewise.
7296 * mmo.c: Likewise.
7297 * oasys.c: Likewise.
7298
7299 2002-06-23 H.J. Lu <hjl@gnu.org>
7300
7301 * elflink.h (elf_link_add_archive_symbols): For the default
7302 version, check references with only one `@' first.
7303
7304 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7305
7306 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7307 function.
7308 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
7309 symbol table.
7310 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7311 (elf64_hppa_size_dynamic_sections): Revise to use
7312 elf64_hppa_mark_milli_and_exported_functions.
7313 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7314 symbols out of dynamic symbol table.
7315
7316 2002-06-23 Alan Modra <amodra@bigpond.net.au>
7317
7318 * Makefile.in: Regenerate.
7319 * libbfd.h: Regenerate.
7320 * bfd-in2.h: Regenerate.
7321 * configure: Regenerate.
7322 * po/SRC-POTFILES.in: Regenerate.
7323
7324 * elflink.h: Comment typo fixes.
7325
7326 2002-06-23 H.J. Lu <hjl@gnu.org>
7327
7328 * elf-bfd.h (elf_link_loaded_list): New structure.
7329 (elf_link_hash_table): Add "loaded".
7330 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7331 * elflink.h (elf_link_check_versioned_symbol): New function.
7332 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7333
7334 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7335
7336 * elflink.h (size_dynamic_sections): If the target does not
7337 support an ELF style hash table, return true, indicating that
7338 nothing needed to be done, rather than false, indicating that the
7339 section's size could not be computed.
7340
7341 2002-06-18 Dave Brolley <brolley@redhat.com>
7342
7343 From Catherine Moore, Michael Meissner, Dave Brolley:
7344 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7345 * targets.c: Support bfd_elf32_frv_vec.
7346 * reloc.c: Add FRV relocs.
7347 * configure.in: Add support for bfd-elf32-frv-vec.
7348 * config.bfd (targ_cpu): Add support for frv-*-elf.
7349 * archures.c: Add frv arch and machines.
7350 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7351 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7352 (BFD32_BACKENDS): Add elf32-frv.lo.
7353 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7354 (cpu-frv.lo): New target.
7355 (elf32-frv.lo): New target.
7356 * cpu-frv.c: New file.
7357 * elf32-frv.c: New file.
7358
7359 2002-06-18 Jakub Jelinek <jakub@redhat.com>
7360
7361 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7362 e_shnum == 0.
7363 Only read the first section header if e_shoff is non-zero.
7364 Don't consider e_shstrndx if there are no sections.
7365
7366 2002-06-17 Tom Rix <trix@redhat.com>
7367
7368 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
7369 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
7370 complain_overflow_bitfield.
7371
7372 2002-06-17 Alan Modra <amodra@bigpond.net.au>
7373
7374 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7375 (bfd_fdopenr): Likewise.
7376 (bfd_openstreamr): Likewise.
7377 (bfd_openw): Likewise.
7378
7379 * targets.c: Sort target vecs.
7380 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7381 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7382 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7383 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7384 * configure.in: Sort target vecs. Add m88kmach3_vec.
7385 * configure: Regenerate.
7386
7387 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7388
7389 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7390 bpo_reloc_no to break sort order ties, not address of items.
7391
7392 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7393
7394 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7395 Skip excluded sections in determing __gp value.
7396 (elf_hppa_final_link_relocate): Use the symbol's address in
7397 R_PARISC_FPTR64 relocations that don't need an opd entry.
7398 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7399 (elf64_hppa_finalize_dynreloc): Likewise.
7400 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7401 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7402
7403 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7404
7405 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7406 alignment for .bss, .data and .text sections so that sse and sse2
7407 code will work.
7408 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7409
7410 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
7411
7412 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7413 sh[1234]*-elf*.
7414
7415 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7416
7417 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7418 dynamic sections.
7419
7420 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7421 for a symbol that has no output section.
7422 (allocate_dynrel_entries): Correct comment.
7423 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7424 unless we want one.
7425 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7426 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7427 with no section. Remove unnecessary parentheses.
7428
7429 2002-06-11 Tom Rix <trix@redhat.com>
7430
7431 * coffcode.h (coff_compute_section_file_positions): Add data
7432 section to AIX loader alignment check.
7433
7434 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
7435 alignment to 4 bytes.
7436 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7437 power accessor macro.
7438 (do_shared_object_padding): Remove invalid assertion.
7439
7440 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
7441
7442 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7443 for removed output sections.
7444
7445 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
7446
7447 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7448 htab_alloc.
7449 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7450
7451 2002-06-08 H.J. Lu <hjl@gnu.org>
7452
7453 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7454 work around a long long bug in gcc 2.96 on mips.
7455
7456 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7457
7458 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7459 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7460 Regenerate dependency lists.
7461 * Makefile.in: Regenerate.
7462 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7463 vax1knetbsd_vec to targ_selvecs.
7464 * configure.in: Add vax1knetbsd_vec.
7465 * configure: Regenerate.
7466 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7467 * vax1knetbsd.c: New file.
7468 * vaxnetbsd.c: Update copyright years.
7469 (TARGET_PAGE_SIZE): Set to 0x1000.
7470 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7471
7472 2002-06-08 Matt Thomas <matt@3am-software.com>
7473
7474 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7475
7476 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7477
7478 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7479
7480 2002-06-08 Alan Modra <amodra@bigpond.net.au>
7481
7482 * Makefile.am: Run "make dep-am".
7483 * Makefile.in: Regenerate.
7484
7485 * armnetbsd.c: Replace CONST with const.
7486 * corefile.c: Likewise.
7487 * elf32-dlx.c: Likewise.
7488 * elf64-mips.c: Likewise.
7489 * mmo.c: Likewise.
7490 * ns32knetbsd.c: Likewise.
7491
7492 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7493 table is elf64-sparc.
7494
7495 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7496
7497 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7498 Fix RELA addends to get not shifted in the result. Don't do special
7499 handling of R_MIPS_64 for NewABI.
7500
7501 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7502
7503 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7504 (NAME(aout,slurp_reloc_table)): Likewise.
7505 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7506 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7507 (xcoff_write_archive_contents_big): Likewise.
7508 (xcoff_generate_rtinit): Likewise.
7509 (xcoff_generate_rtinit): Likewise, and check error return.
7510 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7511 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7512 (coff_get_normalized_symtab): Likewise.
7513 (coff_make_empty_symbol): Likewise.
7514 (bfd_coff_set_symbol_class): Likewise.
7515 * cofflink.c (coff_link_add_symbols): Likewise.
7516 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7517 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7518 (bfd_ecoff_write_accumulated_debug): Likewise.
7519 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7520 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7521 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7522 * ieee.c (do_with_relocs): Use bfd_zalloc.
7523 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7524 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7525 (NAME(aout,slurp_reloc_table)): Likewise.
7526 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7527 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7528 * som.c (som_build_and_write_symbol_table): Likewise.
7529 (som_slurp_string_table): Likewise.
7530 (som_slurp_symbol_table): Likewise.
7531 (som_bfd_ar_write_symbol_stuff): Likewise.
7532 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7533 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7534 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7535 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7536 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7537
7538 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7539
7540 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7541 "group" union.
7542 (elf_group_name): Update.
7543 (elf_group_id): Define.
7544 (bfd_elf_set_group_contents): Declare.
7545 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7546 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7547 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7548 that sym for the signature.
7549 (_bfd_elf_compute_section_file_positions): Don't call
7550 set_group_contents for "ld -r" case.
7551 (swap_out_syms): Use bfd_zalloc.
7552 * elflink.h (elf_link_add_archive_symbols): Likewise.
7553 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7554 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7555
7556 2002-06-07 Alan Modra <amodra@bigpond.net.au>
7557
7558 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7559 relocs in opd for non-shared too.
7560
7561 2002-06-06 Jeffrey Law <law@redhat.com>
7562
7563 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7564 relocations.
7565
7566 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7567
7568 * merge.c: Include libiberty.h.
7569 * elf-strtab.c: Include libiberty.h.
7570
7571 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7572
7573 * peXXigen.c (pe_print_idata): Remove unused variable.
7574
7575 2002-06-06 David Heine <dlheine@tensilica.com>
7576
7577 * elf.c (assign_file_positions_for_segments): Remove unallocated
7578 sections from the section to segment mapping for PT_LOAD segments.
7579 Update comment about empty loadable segments.
7580
7581 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
7582
7583 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7584 is within the .stabstr section.
7585
7586 2002-06-06 Alan Modra <amodra@bigpond.net.au>
7587
7588 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7589 are "const PTR", not "const PTR *".
7590 (bfd_elf32_swap_symbol_in): Likewise.
7591 (bfd_elf64_swap_symbol_in): Likewise.
7592 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7593 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7594 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7595 (elf_link_add_object_symbols): Likewise.
7596 (elf_link_record_local_dynamic_symbol): Likewise.
7597 (elf_link_input_bfd): Likewise.
7598 (elf_gc_mark): Likewise.
7599 (elf_reloc_symbol_deleted_p): Likewise.
7600 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7601 (mn10200_elf_relax_delete_bytes): Likewise.
7602 (mn10200_elf_symbol_address_p): Likewise.
7603 (mn10200_elf_get_relocated_section_contents): Likewise.
7604 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7605 (mn10300_elf_relax_section): Likewise.
7606 (mn10300_elf_relax_delete_bytes): Likewise.
7607 (mn10300_elf_symbol_address_p): Likewise.
7608 (mn10300_elf_get_relocated_section_contents): Likewise.
7609 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7610 (elf32_h8_relax_delete_bytes): Likewise.
7611 (elf32_h8_symbol_address_p): Likewise.
7612 (elf32_h8_get_relocated_section_contents): Likewise.
7613 * elf32-hppa.c (get_local_syms): Likewise.
7614 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7615 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7616 * elf32-sh.c (sh_elf_relax_section): Likewise.
7617 (sh_elf_relax_delete_bytes): Likewise.
7618 (sh_elf_get_relocated_section_contents): Likewise.
7619 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7620 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7621 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7622 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7623 * elf64-ppc.c (get_local_syms): Likewise.
7624 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7625 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7626
7627 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7628
7629 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7630
7631 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7632
7633 * elf.c (group_signature): Swap in the whole symbol, and handle
7634 extracting section symbol names.
7635 (setup_group): Add comment.
7636 (set_group_contents): When called from objcopy or ld, arrange for
7637 section contents to be written. Write group member output section
7638 indices to allow objcopy to reorganize sections.
7639 (_bfd_elf_copy_private_section_data): Copy group info.
7640
7641 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7642 (bfd_elf32_swap_symbol_in): Update prototype.
7643 (bfd_elf64_swap_symbol_in): Likewise.
7644 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7645 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7646 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7647 (elf_link_add_object_symbols): Likewise.
7648 (elf_link_record_local_dynamic_symbol): Likewise.
7649 (elf_link_input_bfd): Likewise.
7650 (elf_gc_mark): Likewise.
7651 (elf_reloc_symbol_deleted_p): Likewise.
7652 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7653 (mn10200_elf_relax_delete_bytes): Likewise.
7654 (mn10200_elf_symbol_address_p): Likewise.
7655 (mn10200_elf_get_relocated_section_contents): Likewise.
7656 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7657 (mn10300_elf_relax_section): Likewise.
7658 (mn10300_elf_relax_delete_bytes): Likewise.
7659 (mn10300_elf_symbol_address_p): Likewise.
7660 (mn10300_elf_get_relocated_section_contents): Likewise.
7661 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7662 (elf32_h8_relax_delete_bytes): Likewise.
7663 (elf32_h8_symbol_address_p): Likewise.
7664 (elf32_h8_get_relocated_section_contents): Likewise.
7665 * elf32-hppa.c (get_local_syms): Likewise.
7666 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7667 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7668 * elf32-sh.c (sh_elf_relax_section): Likewise.
7669 (sh_elf_relax_delete_bytes): Likewise.
7670 (sh_elf_get_relocated_section_contents): Likewise.
7671 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7672 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7673 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7674 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7675 * elf64-ppc.c (get_local_syms): Likewise.
7676 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7677 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7678 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7679 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7680 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7681 * elf64-mips.c (mips_elf64_size_info): Likewise.
7682 * elf64-s390.c (s390_elf64_size_info): Likewise.
7683 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7684
7685 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7686
7687 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7688 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7689 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7690 _bfd_mips_elf_ignore_discarded_relocs.
7691 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7692
7693 2002-06-05 H.J. Lu <hjl@gnu.org>
7694
7695 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7696 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7697 the SEC_MERGE section.
7698
7699 2002-06-05 Alan Modra <amodra@bigpond.net.au>
7700
7701 * coff-alpha.c: Update copyright date.
7702 * coff-mips.c: Likewise.
7703 * xcoff-target.h: Likewise.
7704
7705 * bfd-in.h: Remove "taken from the source" comment.
7706 * libbfd-in.h: Likewise.
7707 * libcoff-in.h: Likewise.
7708 * bfd-in2.h: Regenerate.
7709 * libbfd.h: Regenerate.
7710 * libcoff.h: Regenerate.
7711
7712 * elf.c (bfd_elf_discard_group): Return true.
7713 * elf-bfd.h (bfd_elf_discard_group): Declare.
7714 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7715 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7716 * bfd.c (bfd_discard_group): Define.
7717 * targets.c (struct bfd_target): Add _bfd_discard_group.
7718 (BFD_JUMP_TABLE_LINK): Here too.
7719 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7720 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7721 * aout-target.h (MY_bfd_discard_group): Define.
7722 * aout-tic30.c (MY_bfd_discard_group): Define.
7723 * binary.c (binary_bfd_discard_group): Define.
7724 * bout.c (b_out_bfd_discard_group): Define.
7725 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7726 * coffcode.h (coff_bfd_discard_group): Define.
7727 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7728 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7729 * i386msdos.c (msdos_bfd_discard_group): Define.
7730 * i386os9k.c (os9k_bfd_discard_group): Define.
7731 * ieee.c (ieee_bfd_discard_group): Define.
7732 * ihex.c (ihex_bfd_discard_group): Define.
7733 * mmo.c (mmo_bfd_discard_group): Define.
7734 * nlm-target.h (nlm_bfd_discard_group): Define.
7735 * oasys.c (oasys_bfd_discard_group): Define.
7736 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7737 * som.c (som_bfd_discard_group): Define.
7738 * srec.c (srec_bfd_discard_group): Define.
7739 * tekhex.c (tekhex_bfd_discard_group): Define.
7740 * versados.c (versados_bfd_discard_group): Define.
7741 * vms.c (vms_bfd_discard_group): Define.
7742 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7743 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7744 (aix5coff64_vec): Likewise.
7745 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7746
7747 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7748
7749 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7750 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7751 (elf32-sh64-com.lo): New dependency list.
7752 * Makefile.in: Regenerate.
7753 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7754 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7755 elf32-sh64-com.lo.
7756 * configure: Regenerate.
7757 * elf32-sh64.c (sh64_address_in_cranges)
7758 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7759 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7760 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7761 * elf32-sh64-com.c: ...here. New file.
7762
7763 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7764
7765 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7766 ATTRIBUTE_UNUSED on used params.
7767 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7768 before calling bfd_section_from_elf_index on local syms.
7769 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7770
7771 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7772
7773 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7774 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7775 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7776 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7777 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7778 * Makefile.in: Regenerate.
7779 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7780 (sh64-*-netbsd*): New targets.
7781 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7782 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7783 * configure: Regenerate.
7784 * elf32-sh64-nbsd.c: New file.
7785 * elf64-sh64-nbsd.c: New file.
7786 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7787 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7788 bfd_elf64_sh64lnbsd_vec.
7789
7790 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7791
7792 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7793 (bfd_section_from_shdr): Likewise. Set section name of group
7794 sections from signature.
7795 (group_signature): Split out from setup_group. Ensure symbol table
7796 is available.
7797 (bfd_elf_discard_group): New function.
7798 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7799 .gnu.linkonce* sections if they are members of a group.
7800 (set_group_contents): Set GRP_COMDAT flag.
7801 * section.c (bfd_discard_group): New function.
7802 * bfd-in.h (bfd_elf_discard_group): Declare.
7803 * bfd-in2.h: Regenerate.
7804 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7805 (elf_linkonce_p): Define.
7806
7807 2002-06-04 Alan Modra <amodra@bigpond.net.au>
7808
7809 * elf.c (bfd_section_from_shdr): Make "name" const.
7810 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7811 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7812 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7813 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7814 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7815 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7816 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7817 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7818 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7819 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7820 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7821
7822 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7823
7824 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7825 ABI.
7826
7827 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7828
7829 * elf32-arc.c: Fix formatting.
7830 * elf32-arm.h: Likewise.
7831 * elf32-cris.c: Likewise.
7832 * elf32-dlx.c: Likewise.
7833 * elf32-hppa.c: Likewise.
7834 * elf32-i386.c: Likewise.
7835 * elf32-i386qnx.c: Likewise.
7836 * elf32-or32.c: Likewise.
7837 * elf32-s390.c: Likewise.
7838 * elf32-sh64.c: Likewise.
7839 * elf32-vax.c: Likewise.
7840 * elf32-xstormy16.c: Likewise.
7841 * elf64-alpha.c: Likewise.
7842 * elf64-mmix.c: Likewise.
7843 * elf64-ppc.c: Likewise.
7844 * elf64-s390.c: Likewise.
7845 * elf64-sh64.c: Likewise.
7846 * elf64-x86-64.c: Likewise.
7847
7848 2002-06-02 Richard Henderson <rth@redhat.com>
7849
7850 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7851 null when there are no got entries for a symbol.
7852 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7853 uninitialized variable warning.
7854
7855 2002-06-01 Richard Henderson <rth@redhat.com>
7856
7857 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7858 undefined symbols here.
7859 (elf64_alpha_relax_section): Do it here. Also test for not
7860 defined in the current module.
7861 (elf64_alpha_relocate_section_r): Split out of ...
7862 (elf64_alpha_relocate_section): ... here. Don't dereference
7863 NULL when looking up local got entries.
7864
7865 2002-06-01 Richard Henderson <rth@redhat.com>
7866
7867 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7868 symbols from JSR relaxation.
7869 (elf64_alpha_size_plt_section_1): New.
7870 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7871 (elf64_alpha_size_rela_got_1): ... here.
7872 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7873 (elf64_alpha_size_rela_got_section): ... here.
7874 (elf64_alpha_size_plt_section): New.
7875 (elf64_alpha_relax_section): Call them.
7876 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7877 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7878
7879 2002-06-01 Richard Henderson <rth@redhat.com>
7880
7881 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7882 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7883 in shared libraries. Fix DTPRELHI and TPRELHI value.
7884 (INSN_ADDQ, INSN_RDUNIQ): New.
7885 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7886 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7887 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7888 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7889 Handle GOTDTPREL and GOTTPREL relocations.
7890 (elf64_alpha_relax_gprelhilo): New.
7891 (elf64_alpha_relax_tls_get_addr): New.
7892 (elf64_alpha_relax_find_tls_segment): New.
7893 (elf64_alpha_relax_section): Handle TLS relocations.
7894 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7895 (elf64_alpha_check_relocs): Set it.
7896
7897 2002-06-01 Richard Henderson <rth@redhat.com>
7898
7899 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7900
7901 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7902 check; don't suppress dynamic relocs for non-allocated sections.
7903
7904 * elf64-alpha.c: Remove dead code.
7905
7906 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7907
7908 * bfd-in2.h: Regenerate.
7909 * libbfd.h: Regenerate.
7910 * po/SRC-POTFILES.in: Regenerate.
7911
7912 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7913 space for bss .plt.
7914
7915 2002-05-31 Graeme Peterson <gp@qnx.com>
7916
7917 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7918 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7919 Run "make dep-am".
7920 * Makefile.in: Regenerate.
7921 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7922 * configure.in: Add bfd_elf32_i386qnx_vec support.
7923 * configure: Regenerate.
7924 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7925 is_contained_by_filepos, and copy_private_bfd_data_p.
7926 * elf.c (assign_file_positions_for_segments): Call backend
7927 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7928 (IS_CONTAINED_BY_FILEPOS): Define.
7929 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7930 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7931 Fix non-K&R call to _bfd_error_handler.
7932 (_bfd_elf_copy_private_section_data): Use backend
7933 copy_private_bfd_data_p.
7934 * elf32-i386.c: Don't include elfxx-target.h when
7935 ELF32_I386_C_INCLUDED is defined.
7936 * elf32-i386qnx.c: New QNX elf backend file.
7937 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7938 elf_backend_is_contained_by_filepos, and
7939 elf_backend_do_copy_private_bfd_data.
7940 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7941
7942 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7943
7944 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7945 Move other similar defines to start of file.
7946
7947 2002-05-30 Tom Rix <trix@redhat.com>
7948
7949 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7950 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7951
7952 2002-05-30 Richard Henderson <rth@redhat.com>
7953
7954 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7955 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7956 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7957 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7958 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7959 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7960 n_local_got_entries to total_got_size and local_got_size.
7961 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7962 (alpha_got_entry_size): New.
7963 (elf64_alpha_relax_with_lituse): Use it.
7964 (elf64_alpha_relax_without_lituse): Likewise.
7965 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7966 (get_got_entry): New.
7967 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7968 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7969 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7970 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7971 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7972 (elf64_alpha_calc_got_offsets): Likewise.
7973 (alpha_dynamic_entries_for_reloc): New.
7974 (elf64_alpha_calc_dynrel_sizes): Use it.
7975 (elf64_alpha_size_dynamic_sections): Likewise.
7976 (elf64_alpha_relocate_section): Handle TLS relocations.
7977 * reloc.c: Add Alpha TLS relocations.
7978 * bfd-in2.h, libbfd.h: Rebuild.
7979
7980 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7981
7982 * peXXigen.c (pe_print_idata): Remove double printed
7983 import table lines; add Bound-To comment.
7984
7985 2002-05-29 Matt Thomas <matt@3am-software.com>
7986
7987 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7988 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7989 (elf32-vax.lo): New rule.
7990 * Makefile.in: Regenerate.
7991 * configure.in (bfd_elf32_vax_vec)
7992 (vaxnetbsd_vec): New vectors.
7993 * configure: Regenerate.
7994 * config.bfd (vax-*-netbsdelf*)
7995 (vax-*-netbsdaout*)
7996 (vax-*-netbsd*): New targets.
7997 * elf32-vax.c: New file.
7998 * reloc.c: Add VAX relocations.
7999 * bfd-in2.h: Regenerate.
8000 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8001
8002 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8003
8004 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8005 and bfd_elf32_bigarm_vec to targ_selvecs.
8006
8007 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8008
8009 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8010 with auto-imported symbols.
8011
8012 2002-05-29 Adam Nemet <anemet@lnxw.com>
8013
8014 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8015 sections only record bfd.
8016 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8017 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
8018 * bfd-in2.h: Regenerate.
8019
8020 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8021
8022 * syms.c (_bfd_stab_section_find_nearest_line): Move
8023 declaration and initialisation of saw_line and saw_func out of
8024 for loop.
8025
8026 2002-05-29 Alan Modra <amodra@bigpond.net.au>
8027
8028 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8029 (bfd_elf64_get_symbol_info): Define.
8030 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8031
8032 2002-05-29 Andrey Volkov <avolkov@transas.com>
8033
8034 * cpu-h8300.c: Make default h8300 machine first in machine list.
8035
8036 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8037
8038 * config.bfd: Added DLX configuraton.
8039 * Makefile.am: Added DLX configuraton.
8040 * configure.in: Added DLX configuraton.
8041 * archures.c: Add DLX architecure.
8042 * reloc.c: Add DLX relocs.
8043 * targets.c: Added DLX target vector.
8044 * configure: Regenerate.
8045 * Makefile.in: Regenreate.
8046 * bfd-in2.h: Regenreate.
8047 * elf32-dlx.c: New file: Support DLX target.
8048 * cpu-dlx.c: New file: Support DLX target.
8049
8050 2002-05-25 Alan Modra <amodra@bigpond.net.au>
8051
8052 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8053
8054 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8055 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8056 strings to point inside function code sym string.
8057 (func_desc_adjust): Likewise.
8058 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8059
8060 2002-05-24 Michal Ludvig <mludvig@suse.cz>
8061
8062 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8063 (elf64_x86_64_grok_psinfo): Added.
8064
8065 2002-05-24 TAMURA Kent <kent@netbsd.org>
8066
8067 * config.bfd: Add a target for i386-netbsdpe.
8068
8069 2002-05-24 Alan Modra <amodra@bigpond.net.au>
8070
8071 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8072 and is_func_descriptor.
8073 (func_desc_adjust): Hide function code sym in shared libs unless
8074 there is a matching exported function descriptor sym.
8075
8076 2002-05-23 Jakub Jelinek <jakub@redhat.com>
8077
8078 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8079 for symbols from SHF_TLS section.
8080 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8081 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8082 (map_sections_to_segments): Build PT_TLS segment if necessary.
8083 (assign_file_positions_for_segments): Likewise.
8084 (get_program_header_size): Account for PT_TLS segment.
8085 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8086 SEC_THREAD_LOCAL sections to STT_TLS.
8087 * reloc.c: Add 386 and IA-64 TLS relocs.
8088 * section.c (SEC_THREAD_LOCAL): Define.
8089 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8090 Remove.
8091 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8092 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8093 unconditionally.
8094 (struct elf_final_link_info): Add first_tls_sec.
8095 (elf_bfd_final_link): Set first_tls_sec.
8096 Compute elf_hash_table (info)->tls_segment.
8097 (elf_link_output_extsym): Handle STT_TLS symbols.
8098 (elf_link_input_bfd): Likewise.
8099 * syms.c (BSF_THREAD_LOCAL): Define.
8100 * bfd-in2.h: Rebuilt.
8101 * libbfd.h: Rebuilt.
8102 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8103 elf_i386_mkobject, elf_i386_object_p): New functions.
8104 (elf_howto_table): Add TLS relocs.
8105 (elf_i386_reloc_type_lookup): Support TLS relocs.
8106 (elf_i386_info_to_howto_rel): Likewise.
8107 (struct elf_i386_link_hash_entry): Add tls_type.
8108 (struct elf_i386_obj_tdata): New.
8109 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8110 New macros.
8111 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8112 (link_hash_newfunc): Clear tls_type.
8113 (elf_i386_check_relocs): Support TLS relocs.
8114 (elf_i386_gc_sweep_hook): Likewise.
8115 (allocate_dynrelocs): Likewise.
8116 (elf_i386_size_dynamic_sections): Likewise.
8117 (elf_i386_relocate_section): Likewise.
8118 (elf_i386_finish_dynamic_symbol): Likewise.
8119 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8120 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8121 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8122 want_tprel, want_dtpmod, want_dtprel.
8123 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8124 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8125 R_IA64_LTOFF_TPREL22.
8126 (elf_code_to_howto_index): Add TLS relocs.
8127 (elfNN_ia64_check_relocs): Support TLS relocs.
8128 (allocate_global_data_got): Account for TLS .got data.
8129 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8130 (elfNN_ia64_install_value): Supprt TLS relocs.
8131 (set_got_entry): Support TLS relocs.
8132 (elfNN_ia64_relocate_section): Likewise.
8133
8134 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8135
8136 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8137 BLX reloc round the relocation up rather than down.
8138 * coff-arm.c (coff_arm_relocate_section): Likewise.
8139
8140 2002-05-21 H.J. Lu (hjl@gnu.org)
8141
8142 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8143 definition.
8144
8145 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8146
8147 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8148 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8149
8150 2002-05-22 Alan Modra <amodra@bigpond.net.au>
8151
8152 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8153 unresolved relocs.
8154 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8155
8156 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8157
8158 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
8159 non-ELF targets.
8160
8161 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8162
8163 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8164 an error value.
8165 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8166 return with false on error.
8167 (elf_link_input_bfd): Check reloc_emitter return value.
8168
8169 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8170
8171 * config.bfd (armeb-*-netbsdelf*): New target.
8172
8173 2002-05-20 Alan Modra <amodra@bigpond.net.au>
8174
8175 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8176 at the plt call stub.
8177
8178 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8179
8180 * cpu-mips.c (mips_compatible): Don't try to check machine
8181 compatibility.
8182
8183 2002-05-18 Tom Rix <trix@redhat.com>
8184
8185 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
8186
8187 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8188
8189 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8190 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8191 we've already warned about an undefined symbol. Report more
8192 detail on reloc errors.
8193
8194 2002-05-17 Alan Modra <amodra@bigpond.net.au>
8195
8196 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8197 * configure.in: Invoke AM_INSTALL_LIBBFD.
8198 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8199 (install_libbfd): .. New target.
8200 (uninstall_libbfd): Likewise.
8201 (install-bfdlibLTLIBRARIES): Likewise.
8202 (uninstall-bfdlibLTLIBRARIES): Likewise.
8203 (bfdlibdir): New.
8204 (bfdincludedir): New.
8205 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8206 * aclocal.m4: Regenerate.
8207 * configure: Regenerate.
8208 * Makefile.in: Regenerate.
8209
8210 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
8211
8212 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8213 hash loop.
8214
8215 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8216
8217 * config.bfd: Add targets for sh64-linux (little endian and
8218 big endian).
8219
8220 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8221
8222 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8223 is located in the same section as the import table. Instead
8224 check, and if necessary load the section containing the thunk.
8225
8226 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8227
8228 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
8229 bfd_bread.
8230 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8231 with bfd_bread.
8232
8233 2002-05-15 Alan Modra <amodra@bigpond.net.au>
8234
8235 * aix5ppc-core.c: Warning fixes.
8236 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8237 * aout-target.h (MY_bfd_link_just_syms): Define.
8238 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8239 * bfd.c (bfd_link_just_syms): Define.
8240 * binary.c (binary_bfd_link_just_syms): Define.
8241 * bout.c (b_out_bfd_link_just_syms): Define.
8242 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8243 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8244 * coffcode.h (coff_bfd_link_just_syms): Define.
8245 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8246 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8247 (_bfd_elf_link_just_syms): Declare.
8248 * elf.c (_bfd_elf_link_just_syms): New function.
8249 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8250 sections haven't already been discarded by the linker.
8251 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8252 sections and SEC_MERGE sections.
8253 (elf_bfd_discard_info): Similarly here.
8254 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8255 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8256 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8257 * ieee.c (ieee_bfd_link_just_syms): Define.
8258 * ihex.c (ihex_bfd_link_just_syms): Define.
8259 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8260 (_bfd_generic_link_just_syms): Declare.
8261 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8262 * linker.c (_bfd_generic_link_just_syms): New function.
8263 * mmo.c (mmo_bfd_link_just_syms): Define.
8264 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8265 * oasys.c (oasys_bfd_link_just_syms): Define.
8266 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8267 * som.c (som_bfd_link_just_syms): Define.
8268 * srec.c (srec_bfd_link_just_syms): Define.
8269 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8270 (BFD_JUMP_TABLE_LINK): And here.
8271 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8272 * versados.c (versados_bfd_link_just_syms): Define.
8273 * vms.c (vms_bfd_link_just_syms): Define.
8274 * libbfd.h: Regenerate.
8275 * bfd-in2.h: Regenerate.
8276
8277 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8278
8279 * elf32-mips.c: Remove superfluous definitions copied from
8280 elfxx-mips.c.
8281 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8282 SGIish vectors to check the special case.
8283 (mips_elf_hi16_reloc): Fix comment.
8284 (mips_elf_got16_reloc): Likewise.
8285 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8286 (elf_reloc_map): Code cleanup.
8287 (mips_reloc_map): Add comment.
8288 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8289 (mips_elf32_rtype_to_howto): Likewise.
8290 (mips_elf32_discard_info): Likewise.
8291 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8292 lead to IRIX compatibility now.
8293
8294 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8295
8296 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8297
8298 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8299
8300 * config.bfd (shle-*-netbsdelf*): Add target which includes
8301 sh64 support.
8302
8303 2002-05-13 David Edelsohn <edelsohn@gnu.org>
8304
8305 * configure.in: Revert 2002-04-07. Instead, auto-configure
8306 HAVE_ST_C_IMPL.
8307 * configure: Regenerate.
8308 * config.in: Regenerate.
8309 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8310 or AIX_5_CORE.
8311
8312 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8313
8314 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8315 corefiles as well.2
8316 * configure: Regenerate.
8317
8318 2002-05-13 Alan Modra <amodra@bigpond.net.au>
8319
8320 * Makefile.am (install-data-local): Install headers to
8321 $(exec_prefix)/include.
8322 * Makefile.in: Regenerate.
8323
8324 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8325 Daniel Jacobowitz <drow@mvista.com>
8326
8327 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8328 map BFD_RELOC_RVA.
8329
8330 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8331
8332 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8333 hppa*-*-openbsd*): New targets.
8334 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8335 * configure: Regenerate.
8336
8337 2002-05-10 Tom Rix <trix@redhat.com>
8338
8339 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
8340 xcoff64_ppc_relocate_section.
8341 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8342 * libxcoff.h: Common xcoff_reloc_type function declaration.
8343
8344 2002-05-10 Alan Modra <amodra@bigpond.net.au>
8345
8346 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
8347 added in 2002-05-09 commit.
8348
8349 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8350 don't look for stubs on all undefined syms.
8351
8352 2002-05-09 Alan Modra <amodra@bigpond.net.au>
8353
8354 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8355 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8356 pcrel_offset.
8357
8358 * elf32-i386.c (elf_howto_table): Comments.
8359 (elf_i386_relocate_section): Handle more relocs for relocatable
8360 linking and against SEC_MERGE sections.
8361
8362 2002-05-08 Alan Modra <amodra@bigpond.net.au>
8363
8364 * elf32-ppc.c (ppc_elf_create_got): New function.
8365 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
8366 _bfd_elf_create_dynamic_sections. Correct .plt flags.
8367 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8368 _bfd_elf_create_got_section.
8369
8370 2002-05-07 Alan Modra <amodra@bigpond.net.au>
8371
8372 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8373 * elfxx-target.h (elf_backend_rela_normal): Define.
8374 (elfNN_bed): Init rela_normal.
8375 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8376 for section symbols here if rela_normal. Simplify abs section test.
8377 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8378 return immediately. Remove code handling relocatable linking.
8379 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8380 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8381 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8382 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8383 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8384 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8385 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8386 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8387 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8388 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8389 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8390 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8391 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8392 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8393 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8394 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8395 * elf-m10200.c (elf_backend_rela_normal): Define.
8396 * elf-m10300.c (elf_backend_rela_normal): Define.
8397 * elf32-fr30.c (elf_backend_rela_normal): Define.
8398 * elf32-i370.c (elf_backend_rela_normal): Define.
8399 * elf32-i860.c (elf_backend_rela_normal): Define.
8400 * elf32-m68k.c (elf_backend_rela_normal): Define.
8401 * elf32-mcore.c (elf_backend_rela_normal): Define.
8402 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8403 * elf32-ppc.c (elf_backend_rela_normal): Define.
8404 * elf32-s390.c (elf_backend_rela_normal): Define.
8405 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8406 * elf64-ppc.c (elf_backend_rela_normal): Define.
8407 * elf64-s390.c (elf_backend_rela_normal): Define.
8408 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8409 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8410 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8411 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8412
8413 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8414
8415 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8416 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8417
8418 2002-05-06 Alan Modra <amodra@bigpond.net.au>
8419
8420 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8421 when not relocatable. Fix reloc_emitter call for K&R.
8422
8423 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8424
8425 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8426 reloading local sym addend mistakenly removed in 2002-05-01 change.
8427
8428 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8429 (read_abbrevs): Change "offset" param to bfd_vma.
8430 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8431 Change "abbrev_offset" to bfd_vma.
8432 (read_indirect_string): Use correct conversion chars in error
8433 message format string, cast bfd_vma's to unsigned long.
8434 (read_abbrevs): Likewise.
8435 (read_attribute_value): Likewise.
8436 (decode_line_info): Likewise.
8437 (scan_unit_for_functions): Likewise.
8438 (parse_comp_unit): Likewise.
8439
8440 2002-05-04 Tom Rix <trix@redhat.com>
8441
8442 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8443 (coff_swap_reloc_out): Same.
8444 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8445 (xcoff_swap_reloc_out): Same.
8446 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8447 case some 16 bit relocs. Add reloc value to output.
8448 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
8449 R_RBR. Improve names.
8450 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8451 (bfd_xcoff_backend_data): Update with new reloc swap names.
8452 (bfd_pmac_xcoff_backend_data) : Same.
8453 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8454 (xcoff64_swap_reloc_out): Same.
8455 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
8456 R_POS. Add reloc value to output.
8457 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8458 bit R_RBR. Improve names, masks.
8459 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8460 (bfd_xcoff_backend_data): Update with new reloc swap names.
8461 (bfd_xcoff_aix5_backend_data) : Same.
8462
8463 2002-05-04 Alan Modra <amodra@bigpond.net.au>
8464
8465 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8466 bfd_count top_index, input_list, all_local_syms.
8467 (elf32_hppa_setup_section_lists): New function, split from
8468 elf32_hppa_size_stubs.
8469 (elf32_hppa_next_input_section): Likewise.
8470 (group_sections): Likewise.
8471 (get_local_syms): Likewise.
8472 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8473 stubs on undefined syms too.
8474 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8475 Only access htab elf fields when we have an elf hash table.
8476 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8477 (elf32_hppa_next_input_section): Declare.
8478
8479 2002-05-04 Bob Byrnes <byrnes@curl.com>
8480
8481 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8482 _bfd_new_bfd.
8483
8484 2002-05-03 H.J. Lu (hjl@gnu.org)
8485
8486 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8487 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8488 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8489 to hide a global symbol.
8490 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
8491 forced_local to true.
8492
8493 2002-05-02 Richard Henderson <rth@redhat.com>
8494
8495 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8496 vs SHN_UNDEF to zero.
8497
8498 2002-05-02 Alan Modra <amodra@bigpond.net.au>
8499
8500 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8501 16 bit reloc.
8502 <R_PPC64_SECTOFF_DS>: Likewise.
8503 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8504 SECTOFF reloc.
8505 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8506 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8507 SECTOFF reloc.
8508
8509 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8510 (ppc64_elf_ha_reloc): New function.
8511 (ppc64_elf_brtaken_reloc): New function.
8512 (ppc64_elf_sectoff_reloc): New function.
8513 (ppc64_elf_sectoff_ha_reloc): New function.
8514 (ppc64_elf_toc_reloc): New function.
8515 (ppc64_elf_toc_ha_reloc): New function.
8516 (ppc64_elf_toc64_reloc): New function.
8517 (ppc64_elf_unhandled_reloc): New function.
8518 (ppc64_elf_howto_raw): Use the above.
8519 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8520 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8521 <R_PPC64_SECTOFF_DS>: Likewise.
8522 (IS_ABSOLUTE_RELOC): Update.
8523 (struct ppc_link_hash_table): Add have_undefweak.
8524 (ppc64_elf_link_hash_table_create): Init.
8525 (func_desc_adjust): Set have_undefweak.
8526 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8527 add the .sfpr blr when have_undefweak.
8528 (ppc64_elf_setup_section_lists): Check hash table flavour.
8529 (ppc64_elf_next_input_section): Move output_section->owner test to
8530 ppc64elf.em.
8531 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8532 and relocatable test. Return TOCstart and don't set elf_gp.
8533 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8534 offset calculation. Add assert on weak sym branch tweaks.
8535 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8536 (ppc64_elf_toc): Declare.
8537 (ppc64_elf_next_input_section): Update.
8538
8539 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8540
8541 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8542 file_name.
8543
8544 2002-05-01 Alan Modra <amodra@bigpond.net.au>
8545
8546 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8547 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8548 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8549 call branches. Correct undefined weak destination.
8550 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8551 .sfpr, and correct case where either only savef* or restf* is
8552 needed.
8553
8554 Long branch stubs, multiple stub sections.
8555 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8556 (ppc64_elf_next_input_section): Declare.
8557 * elf64-ppc.c: Move linker-only prototypes.
8558 (STUB_SUFFIX): Define.
8559 (enum ppc_stub_type): New.
8560 (struct ppc_stub_hash_entry): New.
8561 (struct ppc_branch_hash_entry): New.
8562 (struct ppc_link_hash_entry): Add stub_cache, oh.
8563 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8564 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8565 Rename plt_overflow to stub_error.
8566 (ppc_stub_hash_lookup): Define.
8567 (ppc_branch_hash_lookup): Define.
8568 (stub_hash_newfunc): New function.
8569 (branch_hash_newfunc): New function.
8570 (link_hash_newfunc): Init new fields.
8571 (ppc64_elf_link_hash_table_create): Likewise.
8572 (ppc64_elf_link_hash_table_free): New function.
8573 (ppc_stub_name): New function.
8574 (ppc_get_stub_entry): New function.
8575 (ppc_add_stub): New function.
8576 (create_linkage_sections): Use bfd_make_section_anyway. Create
8577 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8578 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8579 and set up for plt call stubs. Link func and func desc syms.
8580 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8581 (func_desc_adjust): Avoid hash lookup when func desc sym available
8582 via shortcut, and set links when processing.
8583 (ppc64_elf_hide_symbol): Likewise.
8584 (allocate_dynrelocs): Don't allocate stub section here.
8585 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8586 Remove sstub code.
8587 (ppc_type_of_stub): New function.
8588 (build_one_stub): Delete.
8589 (ppc_build_one_stub): New function.
8590 (ppc_size_one_stub): New function.
8591 (ppc64_elf_setup_section_lists): New function.
8592 (ppc64_elf_next_input_section): New function.
8593 (group_sections): New function.
8594 (get_local_syms): New function.
8595 (ppc64_elf_size_stubs): Rewrite.
8596 (ppc64_elf_build_stubs): Rewrite.
8597 (ppc64_elf_relocate_section): Look up stub entry for REL24
8598 relocs. Don't propagate REL14* to dynamic objects. Look for long
8599 branch stubs if REL14* or REL24 relocs won't reach.
8600 (bfd_elf64_bfd_link_hash_table_free): Define.
8601
8602 2002-04-30 Mark Mitchell <mark@codesourcery.com>
8603
8604 * config.bfd: Add support for powerpc-*-windiss.
8605
8606 2002-04-30 Tom Rix <trix@redhat.com>
8607
8608 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8609 symbol names into the hash table.
8610
8611 2002-04-28 Tom Rix <trix@redhat.com>
8612
8613 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
8614 calulating relocations.
8615 (xcoff_complain_overflow) : Function table for relocation errors.
8616 (xcoff_ppc_relocate_section): Use relocation and complain function
8617 tables.
8618 (xcoff_complain_overflow_unsigned_func): New complain function.
8619 (xcoff_complain_overflow_signed_func): Same.
8620 (xcoff_complain_overflow_bitfield_func): Same.
8621 (xcoff_complain_overflow_dont_func): Same.
8622 (xcoff_reloc_type_crel): New recot function.
8623 (xcoff_reloc_type_br): Same.
8624 (xcoff_reloc_type_ba): Same.
8625 (xcoff_reloc_type_toc): Same.
8626 (xcoff_reloc_type_rel): Same.
8627 (xcoff_reloc_type_neg): Same.
8628 (xcoff_reloc_type_pos): Same.
8629 (xcoff_reloc_type_fail): Same.
8630 (xcoff_reloc_type_noop): Same.
8631 * libxcoff.h : Declare common parts for xcoff64.
8632 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
8633 and complain function tables.
8634
8635 2002-04-28 Alan Modra <amodra@bigpond.net.au>
8636
8637 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8638 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8639
8640 2002-04-26 Alan Modra <amodra@bigpond.net.au>
8641
8642 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8643 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8644
8645 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8646 same as the output before calling elf_link_input_bfd.
8647
8648 * coffcode.h (coff_compute_section_file_positions): Set
8649 section_tail after shuffling section list.
8650
8651 2002-04-24 Christian Groessler <chris@groessler.org>
8652
8653 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8654 addresses are 23bit with a special layout, not plain 32bit
8655 values. Prevent relocation of immediate values.
8656
8657 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8658
8659 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8660 MIPS-16 ASE flags are set, print something to indicate that.
8661
8662 2002-04-23 Alan Modra <amodra@bigpond.net.au>
8663
8664 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8665 under which a plt call stub is used.
8666 (final_link_relocate): Similarly.
8667 (allocate_plt_static): Clear h-plabel except when plt entry is
8668 exclusively used for a plabel.
8669 (allocate_dynrelocs): Use the above to simplify plt sizing.
8670 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8671 (elf32_hppa_link_hash_table_create): Init.
8672 (BL22_RP): Define.
8673 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8674 (elf32_hppa_check_relocs): Set has_22bit_branch.
8675
8676 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8677 (final_link_relocate): Likewise.
8678
8679 2002-04-22 Jakub Jelinek <jakub@redhat.com>
8680
8681 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8682 search table if some FDE is DW_EH_PE_aligned encoded either.
8683 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8684
8685 2002-04-22 Richard Smith <richard@ex-parrot.com>
8686 Jakub Jelinek <jakub@redhat.com>
8687
8688 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8689 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8690 encoded personality.
8691 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8692 for CIE/FDE removal.
8693
8694 2002-04-20 Tom Rix <trix@redhat.com>
8695
8696 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8697
8698 2002-04-20 Alan Modra <amodra@bigpond.net.au>
8699
8700 * archures.c (bfd_lookup_arch): Move the list order comment..
8701 (struct bfd_arch_info): ..to where it belongs.
8702 * bfd-in2.h: Regenerate.
8703
8704 * archures.c (bfd_lookup_arch): Add comment on list order.
8705 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8706 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8707 is always at head of list.
8708
8709 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8710
8711 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8712 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8713 definition of these functions for ARM_WINCE builds as they are
8714 not used.
8715 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
8716 for ARM_WINCE builds.
8717
8718 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8719
8720 * coff-arm.c (bfd_arm_process_before_allocation):
8721
8722 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
8723
8724 * cpu-sh.c (scan_mach): Delete.
8725 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8726 (bfd_sh_arch): Likewise.
8727
8728 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8729
8730 * ihex.c (ihex_write_object_contents): Fix check for records
8731 crossing 64K boundaries.
8732
8733 2002-04-16 Alan Modra <amodra@bigpond.net.au>
8734
8735 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8736 type rather than just assuming entries are ELF.
8737 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8738 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8739 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8740 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8741 rather than elf_link_hash_entry.
8742
8743 2002-04-15 Richard Henderson <rth@redhat.com>
8744
8745 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8746 n32 binaries.
8747
8748 2002-04-15 Michael Snyder <msnyder@redhat.com>
8749
8750 * opncls.c (bfd_close): Write contents if writeable.
8751 Minor formatting tidy-ups.
8752
8753 2002-04-15 Alan Modra <amodra@bigpond.net.au>
8754
8755 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8756
8757 2002-04-12 Michael Snyder <msnyder@redhat.com>
8758
8759 * bfd-in.h (bfd_get_section_lma): New access macro.
8760 Minor white-space fix-up.
8761
8762 2002-04-12 Alan Modra <amodra@bigpond.net.au>
8763
8764 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8765 header pad.
8766
8767 2002-04-09 DJ Delorie <dj@redhat.com>
8768
8769 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8770
8771 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8772
8773 * coffcode.h (coff_read_word): New.
8774 (coff_compute_checksum): New.
8775 (coff_apply_checksum): New.
8776 (coff_write_object_contents): Call coff_apply_checksum () to
8777 apply checksum to PE image.
8778
8779 2002-04-08 Randolph Chung <tausq@debian.org>
8780
8781 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8782 (elf32_hppa_final_link): Split out sorting logic to..
8783 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8784 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8785
8786 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8787
8788 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8789 pattern.
8790 * configure: Re-generate.
8791
8792 2002-04-07 Andrew Cagney <ac131313@redhat.com>
8793
8794 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8795 is greater or equal to 4.3.3.
8796 * configure: Regenerate.
8797 Fix PR gdb/344.
8798
8799 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
8800
8801 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8802 R_CRIS_32_PCREL>: Fix typo in name.
8803 (cris_elf_check_relocs): Always create .rela.got here when
8804 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8805 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8806 assume it's created.
8807
8808 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
8809
8810 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8811 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8812 define.
8813 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8814 * bfd.c (bfd_link_hash_table_free): Define.
8815 * binary.c (binary_bfd_link_hash_table_free): Define.
8816 * bout.c (b_out_bfd_link_hash_table_free): Define.
8817 * coff-rs6000.c (rs6000coff_vec): Include
8818 _bfd_generic_link_hash_table_free.
8819 (pmac_xcoff_vec): Likewise.
8820 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8821 (aix5coff64_vec): Likewise.
8822 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8823 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8824 (bfd_elf32_bfd_link_hash_table_free): Define.
8825 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8826 (bfd_elf32_bfd_link_hash_table_free): Define.
8827 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8828 define.
8829 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8830 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8831 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8832 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8833 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8834 (_bfd_generic_link_hash_table_free): Add prototype.
8835 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8836 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8837 * linker.c (_bfd_generic_link_hash_table_free): New function.
8838 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8839 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8840 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8841 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8842 * som.c (som_bfd_link_hash_table_free): Define.
8843 * srec.c (srec_bfd_link_hash_table_free): Define.
8844 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8845 * versados.c (versados_bfd_link_hash_table_free): Define.
8846 * vms.c (vms_bfd_link_hash_table_free): New function.
8847 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8848
8849 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8850 instead of bfd_alloc.
8851 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8852 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8853 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8854 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8855 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8856 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8857 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8858 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8859 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8860 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8861 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8862 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8863 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8864 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8865 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8866 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8867 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8868 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8869 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8870 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8871 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8872 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8873 * m68klinux.c (linux_link_hash_table_create): Likewise.
8874 * sparclinux.c (linux_link_hash_table_create): Likewise.
8875 * sunos.c (sunos_link_hash_table_create): Likewise.
8876 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8877
8878 * targets.c: Add _bfd_link_hash_table_free to xvec.
8879
8880 * bfd-in2.h: Regenerate.
8881 * libbfd.h: Regenerate.
8882 * libcoff.h: Regenerate.
8883
8884 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8885
8886 * dep-in.sed: Cope with absolute paths.
8887 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8888 Run "make dep-am".
8889 * Makefile.in: Regenerate.
8890 * coff-arm.c: Fix copyright date.
8891 * cpu-h8300.c: Likewise.
8892 * cpu-i370.c: Likewise.
8893 * cpu-s390.c: Likewise.
8894 * cpu-mips.c: Likewise.
8895 * po/SRC-POTFILES.in: Regenerate.
8896
8897 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8898
8899 * Makefile.am: Add elfxx-mips.c to the known backends.
8900 (elf32-mips.lo): remove dependency to coff/external.h.
8901 * Makefile.in: Regenerate.
8902 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8903 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8904 accordingly.
8905 * configure: Regenerate.
8906 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8907 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8908 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8909 MIPS specific backend functions.
8910 * elf32-mips.c: Moved most code to elfxx-mips.c.
8911 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8912 static.
8913 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8914 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8915 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8916 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8917 interface to allow selection of the right REL or RELA howto table.
8918 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8919 static. Let it refuse n32 objects.
8920 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8921 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8922 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8923 (elf32_mips_ignore_discarded_relocs): Rename from
8924 _bfd_elf32_mips_ignore_discarded_relocs.
8925 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8926 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8927 (elf_mips_howto_table_rela): Remove.
8928 * elf64-mips.c: Moved most code to elfxx-mips.c.
8929 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8930 (mips_elf64_rtype_to_howto): New function.
8931 (mips_elf64_object_p): Likewise.
8932 (elf64_mips_irix_compat): Likewise.
8933 * elfxx-mips.c: New file containing common code merged together from
8934 elf32-mips.c and elf64-mips.c.
8935 * elfxx-mips.h: New file containing MIPS specific prototypes from
8936 elf-bfd.h.
8937 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8938 elf_backend_mips_rtype_to_howto.
8939
8940 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8941
8942 * srec.c (MAXCHUNK, Chunk): Revise comments.
8943 (srec_write_record): Correct buffer size.
8944 (srec_write_header): Do without intermediate buffer.
8945 (srec_write_section): Validate Chunk.
8946 (srec_write_terminator): Pass NULL instead of dummy buffer.
8947 (srec_write_symbols): Pass file and symbol names directly to
8948 bfd_bwrite so sprintf won't overflow buffer.
8949
8950 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8951
8952 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8953 PC relative relocs against hidden symbols.
8954 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8955
8956 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8957
8958 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8959 LMAs, loop over segments until p_vaddr and p_memsz specify an
8960 extent enclosing the section.
8961
8962 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8963
8964 * ihex.c (ihex_write_object_contents): Do not allow records to
8965 cross a 64K boundary - wrap if necessary.
8966
8967 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8968
8969 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8970 which caused the returned LWP ID to always be 0.
8971
8972 2002-04-01 Richard Henderson <rth@redhat.com>
8973
8974 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8975 (elf32_sparc_relocate_section): Use it to figure out when to
8976 initialize .got entries.
8977 * elf64-sparc.c: Similarly.
8978
8979 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8980
8981 * linker.c (link_action): Ignore duplicate warning syms.
8982 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8983 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8984 (elf_adjust_dynamic_symbol): Likewise.
8985 (elf_export_symbol): Likewise.
8986 (elf_link_find_version_dependencies): Likewise.
8987 (elf_link_assign_sym_version): Likewise.
8988 (elf_link_sec_merge_syms): Likewise.
8989 (elf_link_output_extsym): Likewise.
8990 (elf_gc_sweep_symbol): Likewise.
8991 (elf_gc_propagate_vtable_entries_used): Likewise.
8992 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8993 (elf_gc_allocate_got_offsets): Likewise.
8994 (elf_collect_hash_codes): Likewise.
8995 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8996 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8997 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8998 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8999 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9000 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9001 (elf_cris_discard_excess_dso_dynamics): Likewise.
9002 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9003 (mark_PIC_calls): Likewise.
9004 (allocate_plt_static): Likewise.
9005 (allocate_dynrelocs): Likewise.
9006 (readonly_dynrelocs): Likewise.
9007 * elf32-i386.c (allocate_dynrelocs): Likewise.
9008 (readonly_dynrelocs): Likewise.
9009 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9010 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9011 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9012 (mips_elf_sort_hash_table_f): Likewise.
9013 (mips_elf_check_mips16_stubs): Likewise.
9014 * elf32-s390.c (allocate_dynrelocs): Likewise.
9015 (readonly_dynrelocs): Likewise.
9016 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9017 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9018 (xstormy16_relax_plt_realloc): Likewise.
9019 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9020 (elf64_alpha_output_extsym): Likewise.
9021 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9022 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9023 (mips_elf64_check_mips16_stubs): Likewise.
9024 (mips_elf64_output_extsym): Likewise.
9025 * elf64-ppc.c (func_desc_adjust): Likewise.
9026 (allocate_dynrelocs): Likewise.
9027 (readonly_dynrelocs): Likewise.
9028 * elf64-s390.c (allocate_dynrelocs): Likewise.
9029 (readonly_dynrelocs): Likewise.
9030 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9031 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9032 (readonly_dynrelocs): Likewise.
9033 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9034 * aoutx.h (aout_link_write_other_symbol): Likewise.
9035 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9036 (_bfd_coff_write_global_sym): Likewise.
9037 * i386linux.c (linux_tally_symbols): Likewise.
9038 * m68klinux.c (linux_tally_symbols): Likewise.
9039 * sparclinux.c (linux_tally_symbols): Likewise.
9040 * pdp11.c (aout_link_write_other_symbol): Likewise.
9041 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9042 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9043 (xcoff_write_global_symbol): Likewise.
9044
9045 * cofflink.c (_bfd_coff_final_link): Formatting.
9046 * cpu-mips.c (mips_compatible): Make static, prototype.
9047 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9048 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9049 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9050 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9051 (mips_elf64_final_link): Likewise.
9052 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9053 prototype.
9054
9055 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9056
9057 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9058 (SWAP_OUT_RELOC_OFFSET): Define.
9059
9060 2002-03-27 Gregory Steuck <greg@nest.cx>
9061
9062 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9063 terminating NULL if empty symbol table.
9064 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9065
9066 2002-03-26 H.J. Lu (hjl@gnu.org)
9067
9068 * elflink.h (elf_link_input_bfd): Revert the last change since
9069 the gcc exception handling isn't fixed yet.
9070
9071 2002-03-26 H.J. Lu (hjl@gnu.org)
9072
9073 * elflink.h (elf_link_input_bfd): Complain about relocations
9074 against local symbols in discarded sections.
9075
9076 2002-03-26 Alan Modra <amodra@bigpond.net.au>
9077
9078 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9079
9080 2002-03-23 Alan Modra <amodra@bigpond.net.au>
9081
9082 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9083 section file offset for !SEC_LOAD sections.
9084
9085 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
9086
9087 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9088 <case R_ARM_GOT>): Handle relocations to Thumb functions.
9089
9090 2002-03-21 Alan Modra <amodra@bigpond.net.au>
9091
9092 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9093 Whitespace changes.
9094 * archive.c: Update copyright date.
9095 * bfd-in2.h: Regenerate.
9096 * libbfd.h: Regenerate.
9097 * Makefile.am: Run "make dep-am"
9098 * Makefile.in: Regenerate.
9099 * po/SRC-POTFILES.in: Regenerate.
9100
9101 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
9102
9103 * dwarf2.c (struct funcinfo): Move up.
9104 (lookup_address_in_function_table): New argument function_ptr.
9105 Set it.
9106 (lookup_address_in_line_table): New argument function. If function
9107 is non-NULL, use it to handle ``addr'' before the first line note of
9108 the function.
9109 (comp_unit_find_nearest_line): Update and swap calls to
9110 lookup_address_in_function_table and lookup_address_in_line_table.
9111 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9112 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9113
9114 2002-03-20 Tom Rix <trix@redhat.com>
9115
9116 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
9117 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9118 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
9119
9120 2002-03-19 Tom Rix <trix@redhat.com>
9121
9122 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
9123 dynamic objects in archives.
9124
9125 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9126
9127 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9128 STT_NOTYPE symbols to STT_OBJECT.
9129
9130 2002-03-18 Jan Hubicka <jh@suse.cz>
9131
9132 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9133
9134 2002-03-18 Tom Rix <trix@redhat.com>
9135
9136 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9137 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9138 * coff-rs6000 (do_pad) : New function for archive padding.
9139 (do_copy) : New function for object file copying in archives.
9140 (do_shared_object_padding) : New function for padding shared
9141 objects to their text section alignment in archives.
9142 (bfd_xcoff_ar_achive_set_magic) : Stub.
9143 (xcoff_write_armap_big) : Use do_copy and do_pad.
9144 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9145 do_copy and do_pad.
9146 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
9147 bfd_xcoff_magic_number.
9148 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9149 fop.
9150 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9151 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9152 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9153 * rs6000-core.c : Update copyright date.
9154 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
9155 csectpp.
9156 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9157 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9158 (coff_set_flags) : Use bfd_xcoff_magic_number.
9159 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9160 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9161 * Makefile.am : Same.
9162 * config.bfd : Same.
9163 * targets.c : Same.
9164 * configure : Regnerate.
9165 * Makefile.in : Same.
9166 * bfd-in2.h : Same.
9167
9168 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9169
9170 * po/fr.po: Updated version.
9171
9172 2002-03-18 Alan Modra <amodra@bigpond.net.au>
9173
9174 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9175 * libbfd.h: Regenerate.
9176 * archive.c (coff_write_armap): Pass on failures from
9177 bfd_write_bigendian_4byte_int.
9178
9179 2002-03-14 H.J. Lu <hjl@gnu.org>
9180
9181 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9182 error to bfd_error_nonrepresentable_section for reinit_array
9183 section in DSO.
9184
9185 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9186
9187 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9188 OR it in rather than replacing previously selected flags.
9189
9190 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9191 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9192
9193 2002-03-14 Alan Modra <amodra@bigpond.net.au>
9194
9195 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9196 (N): Use the above.
9197 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9198 ensure reloc size matches before calling elf_link_input_bfd.
9199 Add an assert to check reloc size when counting output relocs.
9200
9201 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9202
9203 * mmo.c (mmo_get_loc): Return NULL rather than false.
9204
9205 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9206
9207 * po/fr.po: Updated version.
9208
9209 2002-03-13 Alan Modra <amodra@bigpond.net.au>
9210
9211 * archures.c (bfd_default_compatible): Test bits_per_word.
9212 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9213 bfd_default_compatible.
9214 * cpu-i370.c (i370_compatible): Likewise.
9215 * cpu-sparc.c (sparc_compatible): Likewise.
9216 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9217
9218 * elflink.h: Formatting fixes.
9219 (elf_link_output_extsym): Merge undefined and undef weak cases.
9220
9221 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9222 when word size of input matches output word size.
9223
9224 2002-03-12 Andreas Jaeger <aj@suse.de>
9225
9226 * cpu-i386.c (i386_compatible): New. Use it instead of
9227 bfd_default_compatible.
9228
9229 2002-03-07 H.J. Lu (hjl@gnu.org)
9230
9231 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9232 as the type for bfd_reloc_val.
9233
9234 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9235
9236 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9237 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9238 (elf_hppa_final_link_relocate): Correct relocations for indirect
9239 references to local data through the DLT. Fix .opd creation for
9240 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9241 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9242 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9243 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9244 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9245 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9246 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9247
9248 2002-03-05 Jakub Jelinek <jakub@redhat.com>
9249
9250 * merge.c (_bfd_merge_sections): Don't segfault if there
9251 is nothing to merge due to GC.
9252
9253 2002-03-05 Alan Modra <amodra@bigpond.net.au>
9254
9255 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9256 symbols that have been forced local.
9257
9258 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9259 to output forced local syms for non-shared link.
9260 (elf_link_output_extsym): Tweak condition for calling backend
9261 adjust_dynamic_symbol so that previous behaviour is kept.
9262 Whitespace changes throughout file.
9263
9264 2002-03-04 H.J. Lu <hjl@gnu.org>
9265
9266 * elf.c (bfd_section_from_shdr): Handle special sections,
9267 .init_array, .fini_array and .preinit_array.
9268 (elf_fake_sections): Likewise.
9269
9270 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9271 DT entry only if the section is in output for .init_array,
9272 .fini_array and .preinit_array. Complain about .preinit_array
9273 section in DSO.
9274 (elf_bfd_final_link): Warn zero size for .init_array,
9275 .fini_array and .preinit_array sections.
9276
9277 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9278 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9279 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9280 .preinit_array.
9281
9282 2002-03-04 Alan Modra <amodra@bigpond.net.au>
9283
9284 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9285 * configure: Regenerate.
9286
9287 2002-03-02 Tom Rix <trix@redhat.com>
9288
9289 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9290 symbolic equiv.
9291 * coff-rs6000.c (xcoff_howto_table): Same.
9292
9293 2002-03-01 David Mosberger <davidm@hpl.hp.com>
9294
9295 * elflink.h (size_dynamic_sections): If section named
9296 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9297 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9298 ".init_array" and ".fini_array".
9299 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9300 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9301 DT_FINI_ARRAY.
9302
9303 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
9304
9305 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9306 dynsyms.
9307
9308 2002-02-25 Alan Modra <amodra@bigpond.net.au>
9309
9310 * elf64-hppa.h: Update copyright date.
9311
9312 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9313 (ppc64_elf_relocate_section): Don't generate power4 style branch
9314 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9315
9316 2002-02-22 Jakub Jelinek <jakub@redhat.com>
9317
9318 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9319 last patch.
9320 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9321
9322 2002-02-21 Andreas Jaeger <aj@suse.de>
9323
9324 * elf64-x86-64.c: Major rework that introduces all recent changes
9325 to the x86-64 backend. Get a closer match to elf32-i386.
9326 (struct elf64_x86_64_dyn_relocs): Rename from
9327 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9328 all users.
9329 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9330 sections.
9331 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9332 remove casts, initialize new hash members.
9333 (create_got_section): New.
9334 (elf64_x86_64_create_dynamic_sections): New.
9335 (elf64_x86_64_copy_indirect_symbol): New.
9336 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9337 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9338 Reference count possible .plt and .got entries. Don't test input
9339 section SEC_READONLY here to try to avoid copy relocs, and keep
9340 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9341 DF_TEXTREL here. Delay setting of variables until needed. Cache
9342 pointer to "sreloc" section in elf_section_data. Tweak condition
9343 under which .got created. Report files with bad relocation
9344 section names.
9345 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9346 Reference count possible .plt entries. Don't deallocate .got and
9347 .relgot space here.
9348 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9349 do copy reloc processing for weakdefs. Remove redundant casts and
9350 aborts. Delay setting of vars until needed. Move creation of
9351 dynamic symbols and allocation of .plt and .rela.plt to
9352 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9353 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9354 (allocate_dynrelocs): New.
9355 (readonly_dynrelocs): New.
9356 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9357 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9358 Zero out the dynamic allocated content space.
9359 (elf64_x86_64_discard_copies): Removed.
9360 (elf64_x86_64_relocate_section): Make use of dynamic section
9361 short-cuts. Localise vars, and delay setting. Better error
9362 reporting, replace BFD_ASSERT with abort. Check
9363 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9364 regular object file and tread the weak definition as the normal
9365 one. Don't discard relocs for undefweak or undefined symbols and
9366 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9367 relocs.
9368 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9369 symbols that have been forced local. Use same test to decide if
9370 we can use a relative reloc for got as relocate_section. Expand
9371 SHN_UNDEF comment. Move expressions out of function calls.
9372 Replace BFD_ASSERT with abort.
9373 (bfd_elf64_bfd_final_link): Removed.
9374 (elf_backend_copy_indirect_symbol): Define.
9375
9376 2002-02-20 Tom Rix <trix@redhat.com>
9377
9378 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9379 (_bfd_xcoff_reloc_type_lookup): Use it.
9380 * coff64-rs6000.c (xcoff64_howto_table): Same.
9381 (xcoff64_reloc_type_lookup): Same.
9382
9383 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9384
9385 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
9386 little endian.
9387
9388 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9389
9390 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9391 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9392 * bfd-in2.h: Regenerate.
9393 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9394 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9395 with "s390:64-bit".
9396 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9397 (elf_s390_reloc_type_lookup): Likewise.
9398 (elf_s390_check_relocs): Likewise.
9399 (elf_s390_gc_sweep_hook): Likewise.
9400 (elf_s390_relocate_section): Likewise.
9401 (elf_s390_object_p): Use renamed architecture define.
9402 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9403
9404 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
9405
9406 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9407
9408 2002-02-19 Jakub Jelinek <jakub@redhat.com>
9409
9410 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9411 absptr -> pcrel optimization for shared libs.
9412 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9413 library cannot be converted to pcrel.
9414 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9415 relative.
9416 * elf32-i386.c (elf_i386_relocate_section): If
9417 _bfd_elf_section_offset returned -2, skip, but make sure the
9418 relocation is installed.
9419 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9420 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9421 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9422 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9423 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9424 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9425 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9426 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9427 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9428 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9429 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9430 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9431 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9432 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9433 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9434 _bfd_elf_section_offset returning -2 the same way as -1.
9435 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9436 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9437 and BFD_ASSERT.
9438 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9439
9440 2002-02-18 Tom Rix <trix@redhat.com>
9441
9442 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9443 (bfd_xcoff_size_dynamic_sections): Same.
9444 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9445 (bfd_xcoff_size_dynamic_sections): Same.
9446 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9447 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9448 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9449 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9450 * bfd-in2.h: Regenerate.
9451
9452 2002-02-18 Alan Modra <amodra@bigpond.net.au>
9453
9454 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9455 (struct ppc_link_hash_table): Add sfpr.
9456 (ppc64_elf_link_hash_table_create): Init it.
9457 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9458 .glink out to..
9459 (create_linkage_sections): ..here. Make .sfpr too.
9460 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9461 dynobj early.
9462 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9463 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9464 ._restf* functions, and create as needed.
9465 (func_desc_adjust): Only force_local for shared libs.
9466
9467 2002-02-18 David O'Brien <obrien@FreeBSD.org>
9468
9469 * configure.in: Bump version number post 2.12 branching.
9470 * configure: Regenerate.
9471
9472 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9473
9474 * mmo.c: Correct and improve comments.
9475 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9476 zero-pad. Use input to fill up non-empty bfd buffer.
9477 (mmo_flush_chunk): New function.
9478 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9479 changed. Don't emit location specifier if VMA is same as
9480 *LAST_VMAP after omitting leading zero contents. Call
9481 mmo_flush_chunk before emitting location specifier.
9482 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9483 with mmo_write_loc_chunk calls.
9484 (mmo_internal_write_section): Call mmo_flush_chunk after
9485 mmo_write_chunk.
9486 (mmo_write_symbols_and_terminator): Move :Main to first position
9487 in symbol array. Add faked one if it does not exist if there are
9488 other symbols. Don't add it if there are no symbols at all. Move
9489 out test for value of :Main from symbol loop. Rename table
9490 fakemain to maintable and variable mainsym to fakemain.
9491
9492 2002-02-15 Richard Henderson <rth@redhat.com>
9493
9494 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9495 section with no got matches any got. Simplify error generaion.
9496
9497 2002-02-15 Alan Modra <amodra@bigpond.net.au>
9498
9499 Support arbitrary length fill patterns.
9500 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9501 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9502 Call default_data_link_order.
9503 (default_fill_link_order): Delete.
9504 (default_data_link_order): New function.
9505 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9506 of bfd_fill_link_order with bfd_data_link_order.
9507 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9508 * elf64-mips.c (mips_elf64_final_link): Likewise.
9509
9510 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9511 Correct value returned in "end" for "0x<non-hex>".
9512
9513 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9514
9515 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9516 (scan): Test against 'mach' field in info structure.
9517
9518 2002-02-14 Alan Modra <amodra@bigpond.net.au>
9519
9520 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9521
9522 2002-02-14 Matt Fredette <fredette@netbsd.org>
9523
9524 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9525 EF_M68000.
9526
9527 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9528
9529 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
9530 non-zero physical addresses when adjusting the LMAs of new
9531 sections.
9532
9533 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9534
9535 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9536 from _bfd_elf_hppa_gen_reloc_type.
9537 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9538 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9539 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9540 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9541
9542 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
9543
9544 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9545 loading its contents if there's nothing to do in it.
9546
9547 2002-02-12 Alan Modra <amodra@bigpond.net.au>
9548
9549 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9550 64k boundary.
9551
9552 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9553 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9554 (ppc64_elf_finish_dynamic_sections): Set values for them.
9555
9556 2002-02-11 Michael Snyder <msnyder@redhat.com>
9557
9558 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9559 * elf.c (elfcore_grok_pstatus): Add prototype.
9560 (elfcore_grok_lwpstatus): Add prototype.
9561 (elfcore_write_lwpstatus): New function.
9562 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9563
9564 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
9565
9566 * elf32-sh.c: Added missing prototypes.
9567 * elf32-sh64.c: Likewise.
9568 (sh_elf_align_loads): Mark unused args as such.
9569 * elf64-sh64.c: Added missing prototypes.
9570 (struct elf_sh64_link_hash_entry): Fix typo.
9571 (sh_elf64_relocate_section): Fix info argument passed to
9572 _bfd_elf_section_offset.
9573
9574 2002-02-11 Alan Modra <amodra@bigpond.net.au>
9575
9576 * Makefile.am: "make dep-am".
9577 * Makefile.in: Regenerate.
9578 * aclocal.m4: Regenerate.
9579 * config.in: Regenerate.
9580 * configure: Regenerate.
9581
9582 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
9583
9584 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9585 variable warnings.
9586 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9587 comparison warning.
9588 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9589 cast warnings for the common case.
9590
9591 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9592
9593 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9594 vectors.
9595 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9596 vectors.
9597
9598 2002-02-09 Richard Henderson <rth@redhat.com>
9599
9600 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9601 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9602 (elf64_alpha_relocate_section): Likewise.
9603 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9604 * bfd-in2.h, libbfd.h: Rebuild.
9605
9606 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9607
9608 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9609 that base-plus-offset reloc accounting is consistent.
9610 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9611 up to date for undefined symbols.
9612
9613 2002-02-08 Eric Christopher <echristo@redhat.com>
9614
9615 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9616
9617 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9618 sections for the O32 ABI.
9619
9620 2002-02-08 Chris Demetriou <cgd@broadcom.com>
9621
9622 * elf32-arm.h: Fix formatting of _("...").
9623 * elf32-d10v.c: Likewise.
9624 * elf32-m68k.c: Likewise.
9625 * elf32-mips.c: Likewise.
9626
9627 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
9628
9629 * coff-or32.c: Fix compile time warning messages.
9630
9631 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
9632
9633 Contribute sh64-elf.
9634 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9635 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9636 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9637 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9638 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9639 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9640 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9641 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9642 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9643 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9644 New relocs.
9645 * libbfd.h, bfd-in2.h: Rebuilt.
9646 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9647 (sh_reloc_map): Map them.
9648 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9649 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9650 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9651 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9652 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9653 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9654 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9655 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9656 datalabel_got_offset.
9657 (sh_elf_link_hash_newfunc): Initialize it.
9658 (sh_elf_relocate_section): Augment the scope of
9659 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
9660 GOT and GOTOFF handling to new SHmedia relocation types. Support
9661 GOT_BIAS.
9662 (sh_elf_check_relocs): Likewise.
9663 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9664 PLT entries using movi_shori_putval. Support GOT_BIAS.
9665 (sh_elf_finish_dynamic_sections): Likewise.
9666 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9667 relocation, it's now done by the caller.
9668 (GOT_BIAS): New.
9669 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9670 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9671 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9672 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9673 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9674 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9675 sh64_elf64_hash_table): New.
9676 (sh_elf64_howto_table): Introduce new relocs.
9677 (sh_elf64_info_to_howto): Accept new PIC relocs.
9678 (sh_elf64_relocate_section): Augment the scope of
9679 seen_stt_datalabel. Support new PIC relocs.
9680 (sh_elf64_check_relocs): Support new PIC relocs.
9681 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9682 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9683 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9684 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9685 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9686 movi_shori_putval, movi_3shori_putval,
9687 sh64_elf64_create_dynamic_sections,
9688 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9689 sh64_elf64_size_dynamic_sections,
9690 sh64_elf64_finish_dynamic_symbol,
9691 sh64_elf64_finish_dynamic_sections): New.
9692 (elf_backend_create_dynamic-sections,
9693 bfd_elf64_bfd_link_hash_table_create,
9694 elf_backend_adjust_dynamic_symbol,
9695 elf_backend_size_dynamic_sections,
9696 elf_backend_finish_dynamic_symbol,
9697 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9698 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9699 elf_backend_got_header_size, elf_backend_plt_header_size):
9700 Define.
9701 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9702 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9703 match official numbers and names; moved unmaching ones to the
9704 range 0xf2-0xff.
9705 * elf32-sh64.c, elf64-sh64.c: Likewise.
9706 2001-03-12 DJ Delorie <dj@redhat.com>
9707 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9708 sections.
9709 2001-03-12 DJ Delorie <dj@redhat.com>
9710 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9711 be aligned.
9712 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9713 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
9714 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9715 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9716 .cranges section with SEC_SORT_ENTRIES set.
9717 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9718 incoming sorted .cranges section.
9719 (sh64_bfd_elf_copy_private_section_data): New.
9720 (sh64_elf_final_write_processing): Only sort .cranges and modify
9721 start address if called by linker.
9722 2001-01-08 Ben Elliston <bje@redhat.com>
9723 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9724 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
9725 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9726 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9727 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9728 line. Add comments before all entries.
9729 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9730 comment.
9731 (sh_elf64_reloc): Correct head comment.
9732 (sh_elf64_relocate_section): Correct spacing.
9733 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9734 instead call reloc_dangerous callback.
9735 <case R_SH_SHMEDIA_CODE>: New case.
9736 (sh_elf64_gc_mark_hook): Correct spacing.
9737 (sh_elf64_check_relocs): Ditto.
9738 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9739 New case.
9740 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9741 functions.
9742 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9743 clarify describing comment. Add comments before all entries.
9744 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9745 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9746 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
9747 Sort .cranges section in final link. Prepare to set bit 0 on
9748 entry address.
9749 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9750 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9751 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9752 .cranges section.
9753 (sh64_backend_section_from_shdr): New, to recognize
9754 SHT_SH5_CR_SORTED on incoming .cranges section.
9755 (elf_backend_section_from_shdr): Define.
9756 (sh64_elf_final_write_processing): Sort outgoing .cranges
9757 section. (New, temporarily disabled:) Set bit 0 on entry address
9758 according to ISA type.
9759 (sh64_find_section_for_address): New.
9760 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9761 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9762 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9763 bfd_malloc, not xmalloc.
9764 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9765 global.
9766 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9767 temporarily disabled) setting bit 0 on entry address.
9768 (elf_backend_final_write_processing): Define.
9769 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
9770 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9771 be a proper relocation for PTA and PTB rather than a marker.
9772 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9773 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9774 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9775 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9776 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9777 Zero src_mask.
9778 * elf64-sh64.c: Ditto.
9779 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9780 * elf32-sh64.c: Include opcodes/sh64-opc.h
9781 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9782 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9783 parameters. No unused parameters. Caller changed.
9784 <case R_SH_PT_16>: New case.
9785 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9786 * Makefile.in: Regenerate.
9787 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
9788 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9789 all code sections.
9790 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9791 (sh64_elf_merge_private_data): Ditto.
9792 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9793 to access stored section flags.
9794 (sh64_elf_final_write_processing): Return immediately unless
9795 called by linker. Use sh64_elf_section_data (cranges) to get size
9796 of linker-generated cranges entries.
9797 (sh64_elf_copy_private_data): Add missing "return true".
9798 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9799 (sh_elf64_merge_private_data): Ditto.
9800 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
9801 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9802 elf64-sh64.c:sh64_elf_fake_sections.
9803 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9804 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
9805 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9806 (sh64_elf_final_write_processing): New.
9807 (elf_backend_final_write_processing): Define.
9808 (sh64_elf_fake_sections): Get header flags from tdata field.
9809 (sh64_elf_copy_private_data): Do not call
9810 sh64_elf_copy_private_data_internal, just copy e_flags field.
9811 (sh64_elf_merge_private_data): Do not call
9812 sh64_elf_copy_private_data_internal.
9813 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
9814 Remove EF_SH64_ABI64, let ELF size make difference.
9815 Remove SH64-specific BFD section flag.
9816 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9817 containing SHmedia through elf_section_data (asect)->tdata
9818 non-zero, not using a BFD section flag.
9819 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9820 (sh64_elf_merge_private_data): Similar.
9821 (elf_backend_section_flags): Don't define.
9822 (sh64_elf_backend_section_flags): Delete.
9823 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9824 not EF_SH64_ABI64.
9825 (sh_elf64_merge_private_data): Similar.
9826 * section.c (Section flags definitions): Don't define
9827 SEC_SH_ISA_SHMEDIA.
9828 (bfd-in2.h): Regenerate.
9829 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
9830 Make DataLabel references work with partial linking.
9831 * elf32-sh64.c: Fix formatting.
9832 (sh64_elf_link_output_symbol_hook): New.
9833 (elf_backend_link_output_symbol_hook): Define to
9834 sh64_elf_link_output_symbol_hook.
9835 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9836 undefined if partial linking. Adjust sanity check.
9837 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9838 (elf_backend_link_output_symbol_hook): Define to
9839 sh64_elf64_link_output_symbol_hook.
9840 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9841 undefined if partial linking. Adjust sanity check.
9842 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
9843 Implement semantics for inter-file DataLabel references.
9844 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9845 (sh64_elf64_add_symbol_hook): New.
9846 (sh_elf64_relocate_section): If passing an indirect symbol with
9847 st_type STT_DATALABEL on the way to a symbol with st_other
9848 STO_SH5_ISA32, do not bitor 1 to the relocation.
9849 (elf_backend_add_symbol_hook): Define to
9850 sh64_elf64_add_symbol_hook.
9851 * elf64-sh32.c: Tweak comments.
9852 (DATALABEL_SUFFIX): Define.
9853 (sh64_elf_add_symbol_hook): New.
9854 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9855 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9856 symbol with st_type STT_DATALABEL on the way to a symbol with
9857 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9858 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
9859 Pass through STT_DATALABEL.
9860 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9861 (elf_backend_get_symbol_type): Define.
9862 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9863 (elf_backend_get_symbol_type): Define.
9864 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
9865 * elf32-sh64.c: Tweak comments.
9866 (sh64_elf_copy_private_data_internal): Add prototype.
9867 (bfd_elf32_bfd_set_private_flags): Define.
9868 (sh64_elf_copy_private_data_internal): Compare machine name, not
9869 textual BFD target name, to check whether to copy section flag
9870 SHF_SH5_ISA32.
9871 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9872 Tweak section-contents-type-mismatch message.
9873 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9874 Validize reloc-types.
9875 * elf64-sh64.c: New file.
9876 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9877 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9878 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9879 Regenerate dependencies.
9880 * Makefile.in: Regenerate.
9881 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9882 bfd_elf64_sh64l_vec.
9883 * configure.in: Handle bfd_elf64_sh64_vec and
9884 bfd_elf64_sh64l_vec.
9885 * configure: Regenerate.
9886 * po/POTFILES.in: Regenerate.
9887 * po/bfd.pot: Regenerate.
9888 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
9889 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9890 anything else but EF_SH64 and EF_SH64_ABI64.
9891 (sh64_elf_merge_private_data): Emit error for anything else but
9892 EF_SH64 and EF_SH64_ABI64.
9893 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9894 from targ_selvecs.
9895 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9896 bfd_elf32_sh64l_vec as a temporary measure.
9897 * configure: Regenerate.
9898 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
9899 * cpu-sh.c (arch_info_struct): Include sh5 item
9900 unconditionalized.
9901 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9902 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9903 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9904 * elf32-sh64.c: Tweak comments.
9905 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9906 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9907 (sh64_elf_copy_private_data_internal): Wrap long line.
9908 (sh64_elf_merge_private_data): Rewrite to allow objects from
9909 SH64 subsets to be linked together.
9910 (INCLUDE_SHMEDIA): Define.
9911 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9912 Parenthesize plus-expression inside or-expression.
9913 <global symbol>: Ditto.
9914 (sh_elf_set_mach_from_flags): Remove code refusing
9915 deleted EF_SH64_32BIT_ABI flag.
9916 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
9917 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9918 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9919 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9920 (sh_elf_relocate_section) <local symbol>: Or 1 in
9921 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9922 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9923 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9924 relocation.
9925 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
9926 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9927 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9928 Regenerate dependencies.
9929 * Makefile.in: Regenerate.
9930 * archures.c: Add bfd_mach_sh5.
9931 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9932 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9933 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9934 * configure: Regenerate.
9935 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9936 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9937 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9938 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9939 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9940 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9941 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9942 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9943 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9944 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9945 in item for SH5.
9946 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9947 for SHmedia relocs.
9948 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9949 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9950 shmedia_prepare_reloc, goto final_link_relocate if it returns
9951 non-zero, else fail as before.
9952 (sh_elf_set_mach_from_flags): Provide function only if not defined
9953 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9954 (sh_elf_set_private_flags): Provide function only if not defined
9955 as a macro.
9956 (sh_elf_copy_private_data): Similar.
9957 (sh_elf_merge_private_data): Similar.
9958 * section.c (SEC_SH_ISA_SHMEDIA): New.
9959 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9960 * elf32-sh64.c: New file.
9961 * libbfd.h: Regenerate.
9962 * bfd-in2.h: Regenerate.
9963 * po/POTFILES.in: Regenerate.
9964 * po/bfd.pot: Regenerate.
9965 * bfd-in2.h: Regenerate.
9966 * libbfd.h: Regenerate.
9967
9968 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9969
9970 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9971 been included, not drag it in.
9972 * bfd-in2.h: Regenerate.
9973
9974 2002-02-06 H.J. Lu (hjl@gnu.org)
9975
9976 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9977 the mach and ISA fields if necessary.
9978
9979 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9980
9981 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9982 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9983 be sure exactly which architecture this represents.
9984
9985 2002-02-05 Nick Clifton <nickc@redhat.com>
9986
9987 * po/tr.po: Updated translation.
9988
9989 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9990
9991 From Jimi X <jimix@watson.ibm.com>
9992 * archures (bfd_mach_ppc64): Define.
9993 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9994 (bfd_powerpc_arch): Define.
9995 * bfd-in2.h: Regenerate.
9996 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9997 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9998 (bfd_powerpc_archs): Add default powerpc64 arch.
9999
10000 2002-02-05 Alan Modra <amodra@bigpond.net.au>
10001
10002 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10003 against section syms in readonly sections. Don't do the global
10004 sym check if we find one.
10005 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10006 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
10007 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
10008 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10009 (elf_s390_grok_prstatus): Add missing prototype.
10010
10011 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10012
10013 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10014 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10015 Call bfd_get_section_by_name only once. Initialize
10016 bpodata->n_bpo_relocs_this_section.
10017 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10018 referring to DSOs.
10019 (bpo_reloc_request_sort_fn): Don't use difference of values as
10020 return-value.
10021
10022 2002-02-02 David O'Brien <obrien@FreeBSD>
10023
10024 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10025 version 4.5 and later the same as 5-CURRENT.
10026 * configure: Re-generate.
10027
10028 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10029
10030 * config.bfd (hppa*-*-netbsd*): New target.
10031
10032 2002-01-31 Philipp Thomas <pthomas@suse.de>
10033
10034 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10035 to front of message. Unify messages with elf32-arm.h. Use
10036 commas where neccessary.
10037 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10038 ERROR in messages. Unify messages with coff-arm.c. Correct
10039 VFP/FPA error message.
10040 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10041 APCS-32 for translation.
10042
10043 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10044
10045 Perform on-demand global register allocation from
10046 R_MMIX_BASE_PLUS_OFFSET relocs.
10047 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10048 bpo_reloc_request, struct bpo_greg_section_info): New.
10049 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10050 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10051 _bfd_mmix_check_all_relocs,
10052 _bfd_mmix_prepare_linker_allocated_gregs,
10053 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10054 (elf_mmix_howto_table): Correct src_mask for most relocs.
10055 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10056 case.
10057 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10058 case. Fix typo in comment. New label do_mmix_reloc.
10059 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10060 store first object file with a base-plus-offset reloc. Call
10061 mmix_elf_check_common_relocs for the part common with mmo.
10062 (mmix_elf_final_link): Write out linker-allocated register
10063 contents section.
10064 (elf_backend_gc_sweep_hook): Define.
10065 (bfd_elf64_bfd_relax_section): Define.
10066
10067 * mmo.c: Don't include <ctype.h>
10068 (mmo_init): Correct init-once logic.
10069
10070 2002-02-01 Tom Rix <trix@redhat.com>
10071
10072 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10073
10074 2002-02-01 Alan Modra <amodra@bigpond.net.au>
10075
10076 * Makefile.am: Run "make dep-am"
10077 * Makefile.in: Regenerate.
10078
10079 2002-01-31 David O'Brien <obrien@FreeBSD>
10080
10081 * configure.in: Recognize the differences in core files from FreeBSD
10082 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10083 5-CURRENT.
10084 * configure: Regenerate.
10085
10086 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
10087
10088 * coff-or32.c: New file.
10089 * cpu-or32.c: New file.
10090 * elf32-or32.c: New file.
10091 * archures.c: Add support for or32.
10092 * targets.c: Add support for or32.
10093 * bfd-in2.h: Regenerate.
10094 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
10095 coff_write_object_contents): Add support for or32.
10096 * config.bfd: Add target.
10097 * configure.in: Add support for or32.
10098 * configure: Regenerate.
10099 * Makefile.am: Add support for or32.
10100 * Makefile.in: Regenerate.
10101 * po/SRC-POTFILES.in: Add or32 files.
10102 * po/bfd.pot: Regenerate.
10103
10104 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10105 Don Lindsay <lindsayd@cisco.com>
10106
10107 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10108 false' with a return of a bfd_reloc_ error code.
10109
10110 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
10111
10112 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10113 unexport unreferenced symbols when --export-dynamic. Call
10114 _bfd_elf_strtab_delref when unexporting.
10115
10116 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
10117
10118 * bfd-in.h: Include <stdbool.h> if it is available.
10119 * bfd-in2.h: Regenerated.
10120
10121 2002-01-31 Alan Modra <amodra@bigpond.net.au>
10122
10123 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10124 not go via the plt.
10125
10126 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10127
10128 * archures.c: Tidy up formatting of embedded comments.
10129 * bfd.c: Tidy up formatting of embedded comments.
10130 * bfd-in.h: Fix formatting of comments.
10131 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10132 * section.c: Tidy up formatting of embedded comments.
10133 * syms.c: Tidy up formatting of embedded comments.
10134 * targets.c: Tidy up formatting of embedded comments.
10135
10136 * bfd-in2.h: Regenerate.
10137
10138 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10139
10140 * vms-tir.c (cmd_name): New function.
10141 (tir_cmd_name): New function.
10142 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10143 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10144 Fix formatting.
10145
10146 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10147 translation.
10148 (pe_print_pdata): Rearrange message to aid in translation.
10149
10150 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10151 translation.
10152
10153 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10154
10155 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10156
10157 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10158 message to aid in translation.
10159
10160 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10161 to aid in translation.
10162
10163 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10164
10165 2002-01-30 Philipp Thomas <pthomas@suse.de>
10166
10167 * coff-arm.c, elf32-elf.h: Unify messages.
10168
10169 2002-01-30 Nick Clifton <nickc@redhat.com>
10170
10171 * po/sv.po: Updated translation.
10172
10173 2002-01-30 Philipp Thomas <pthomas@suse.de>
10174
10175 * dwarf2.c (read_abbrev): Use full section name in error message.
10176 (decode_line_info): Likewise.
10177
10178 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10179 message.
10180
10181 2002-01-30 Alan Modra <amodra@bigpond.net.au>
10182
10183 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10184 descriptor symbols for undefined function code syms. Clear
10185 ELF_LINK_NON_ELF so that they can stay weak.
10186
10187 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10188 Mitch Lichtenberg <mpl@broadcom.com>
10189
10190 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10191 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10192 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10193 generation.
10194 * bfd-in2.h: Regenerate.
10195
10196 2002-01-29 Chris Demetriou <cgd@broadcom.com>
10197
10198 * elf32-mips.c: Add additional comments about HI16 relocation
10199 processing.
10200 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10201 pc-relative relocations. (Reverts change made on 2001-10-31.)
10202 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10203 for pc-relative relocations.
10204 (mips_elf_calculate_relocation): Add a comment about a kludge
10205 in the R_MIPS_GNU_REL_HI16 handling.
10206 (_bfd_mips_elf_relocate_section): Implement that kludge;
10207 adjust pc-relative HI16 relocation for difference in HI16 and
10208 LO16 addresses, since it can't easily be done in
10209 mips_elf_calculate_relocation.
10210
10211 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10212
10213 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10214 relocations with PC32 relocations for undefined or weak symbols.
10215 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10216 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10217
10218 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10219
10220 * elfcore.h (elf_core_file_p): Improve comment for last change.
10221
10222 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
10223
10224 * configure: Regenerated.
10225
10226 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10227
10228 * elfcore.h (elf_core_file_p): Set the machine architecture
10229 before processing the program headers.
10230
10231 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10232
10233 * configure.in <64-bit configuration>: If using gcc, check and
10234 emit error for egcs-1.1.2.
10235 * configure: Regenerate.
10236
10237 2002-01-26 Egor Duda <deo@logos-m.ru>
10238
10239 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10240 as possible to avoid stack corruption.
10241
10242 2002-01-26 Richard Henderson <rth@redhat.com>
10243
10244 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10245 for non-allocated sections.
10246
10247 2002-01-25 Mark Kettenis <kettenis@gnu.org>
10248
10249 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10250 prstat.pr_reg even if it is a struct.
10251
10252 2002-01-25 Steve Ellcey <sje@cup.hp.com>
10253
10254 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
10255
10256 2002-01-25 Philipp Thomas <pthomas@suse.de>
10257
10258 * coffgen.c (coff_print_symbol): Don't mark info message
10259 for translation.
10260
10261 2002-01-25 Nick Clifton <nickc@redhat.com>
10262
10263 * po/fr.po: Updated translation.
10264 * po/es.po: Updated translation.
10265
10266 2002-01-25 Philipp Thomas <pthomas@suse.de>
10267
10268 * coff-alpha.c (alpha_relocate_section): Unify warning message
10269 for GP relative relocations without GP defined.
10270 * coff-mips.c (mips_relocate_section): Likewise.
10271
10272 2002-01-25 Alan Modra <amodra@bigpond.net.au>
10273
10274 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10275 unsigned overflow when new_offset < old_offset.
10276
10277 2002-01-24 Philipp Thomas <pthomas@suse.de>
10278
10279 * bfd.c (_bfd_abort): Fix typo.
10280
10281 2002-01-23 Richard Henderson <rth@redhat.com>
10282
10283 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10284 plt entries for undefweak symbols.
10285
10286 2002-01-23 Steve Ellcey <sje@cup.hp.com>
10287
10288 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
10289 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10290 (bfd_elf32_h8300_vec): Ditto.
10291
10292 2002-01-23 Alan Modra <amodra@bigpond.net.au>
10293
10294 * elf64-ppc.c: Remove stale part of ABI comment.
10295 (NO_OPD_RELOCS): Define.
10296 (ppc64_elf_check_relocs): Use it.
10297 (ppc64_elf_relocate_section): Here too.
10298 (build_one_stub): Don't point function syms at the stub. Instead,
10299 hijack plt.offset.
10300 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10301 really go to the stub. Make all dynamic relocs in opd against
10302 locals.
10303 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10304 plt.offset.
10305
10306 2002-01-22 Richard Henderson <rth@redhat.com>
10307
10308 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10309
10310 2002-01-22 Alan Modra <amodra@bigpond.net.au>
10311
10312 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10313 TOC_BASE_OFF adjustment.
10314
10315 * Makefile.am: Run "make dep-am".
10316 * Makefile.in: Regenerate.
10317 * po/SRC-POTFILES.in: Regenerate.
10318
10319 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10320
10321 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10322 host defines.
10323
10324 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
10325
10326 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10327 Check for and emit error if sgot is NULL at this point.
10328
10329 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10330
10331 * config.bfd (ia64*-*-netbsd*): New target.
10332
10333 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10334
10335 * som.c (som_write_space_strings): Comment typo fix.
10336
10337 2002-01-21 Alan Modra <amodra@bigpond.net.au>
10338
10339 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10340 is_func_descriptor fields.
10341 (link_hash_newfunc): Init them.
10342 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10343 dot are candidates for plt entries. When processing .opd relocs,
10344 set function descriptor strings to point inside function code
10345 string, and set new ppc_link_hash_entry fields.
10346 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10347 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10348 function descriptors. It's now done in..
10349 (func_desc_adjust): New.
10350 (ppc64_elf_func_desc_adjust): New.
10351 (define elf_backend_always_size_sections): Define.
10352 (ppc64_elf_hide_symbol): New.
10353 (define elf_backend_hide_symbol): Define.
10354 (allocate_dynrelocs): Remove code looking up function descriptors
10355 as that has been done earlier.
10356 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10357 table.
10358 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10359 up function descriptor.
10360 (build_one_stub): Look up the function code sym. Check for
10361 invalid plt offsets.
10362 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10363 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10364
10365 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10366 boolean param.
10367 (_bfd_elf_link_hash_hide_symbol): Likewise.
10368 * elflink.h (elf_link_add_object_symbols): Adjust call to
10369 elf_backend_hide_symbol.
10370 (elf_fix_symbol_flags): Likewise.
10371 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10372 than bfd_alloc.
10373 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10374 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10375 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10376 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10377 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10378 and adjust to suit.
10379 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10380 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10381 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10382
10383 2002-01-18 Alan Modra <amodra@bigpond.net.au>
10384
10385 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10386 dynamic function descriptor symbol, not the associated function
10387 symbol.
10388
10389 2002-01-17 Eric Christopher <echristo@redhat.com>
10390
10391 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10392
10393 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10394
10395 * po/bfd.pot: Regenerate.
10396 * po/fr.po: Regenerate.
10397
10398 2002-01-17 Alan Modra <amodra@bigpond.net.au>
10399
10400 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10401 Remove "Elf_Internal_Shdr *" param.
10402 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10403 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10404 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10405 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10406 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10407 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10408 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10409 function to override special sections. Remove hdr arg from
10410 backend call, and don't loop.
10411
10412 2002-01-16 Eric Christopher <echristo@redhat.com>
10413
10414 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10415 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10416 relocations requiring gp0 and gp.
10417
10418 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
10419
10420 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
10421 EF_ARM_VFP_FLOAT.
10422 (elf32_arm_print_private_bfd_data): Likewise.
10423
10424 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10425
10426 * po/tr.po: Import new version.
10427
10428 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10429
10430 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10431 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10432 (ORI_R0_R0_0): Correct.
10433
10434 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10435
10436 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10437 when plt_not_loaded.
10438 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10439 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10440 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10441 (ppc64_elf_glink_code): Delete.
10442 (PPC64_ELF_GLINK_SIZE): Delete.
10443 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10444 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10445 ORI_R0_R0_0): Define.
10446 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10447 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10448 (ppc64_elf_link_hash_table_create): Init them.
10449 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10450 Don't copy to shared lib.
10451 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10452 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10453 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10454 room for .stub and .glink code.
10455 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10456 DT_PPC64_GLINK.
10457 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10458 bfd_elf64_bfd_final_link.
10459 (bfd_elf64_bfd_final_link): Don't define.
10460 (ppc64_elf_size_stubs): New.
10461 (build_plt_stub): New.
10462 (build_one_stub): New.
10463 (ppc64_elf_build_stubs): New.
10464 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10465 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10466 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10467 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10468 case output sections not separate. Adjust DT_RELASZ to not
10469 include plt relocs. Set reserved got entry. Set got and plt
10470 entry size.
10471 (elf_backend_got_header_size): Set to 8.
10472 * elf64-ppc.h: New file.
10473
10474 2002-01-16 Alan Modra <amodra@bigpond.net.au>
10475
10476 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10477 sections, use bfd_section_list_remove.
10478 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10479 * elflink.h (elf_link_add_object_symbols): When removing all
10480 sections, use bfd_section_list_clear.
10481
10482 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10483
10484 * po/sv.po: New file: Swedish translation.
10485 * configure.in (ALL_LINGUAS): Add sv.
10486 * configure: Regenerate.
10487
10488 2002-01-15 Jakub Jelinek <jakub@redhat.com>
10489
10490 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10491 * elf.c (merge_sections_remove_hook): New function.
10492 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10493 _bfd_merge_sections.
10494 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10495 * libbfd.h: Rebuilt.
10496 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10497 Call remove_hook if a SEC_EXCLUDE section is encountered.
10498
10499 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10500
10501 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10502 (xstormy16_reloc_map): Initialise new field with correct howto
10503 table.
10504 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10505 howto entry.
10506
10507 2002-01-10 Michael Snyder <msnyder@redhat.com>
10508
10509 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10510 (elfcore_write_pstatus): Use long instead of pid_t;
10511 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10512
10513 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
10514
10515 * elf.c: Update copyright years.
10516 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10517 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10518
10519 2002-01-08 Michael Snyder <msnyder@redhat.com>
10520
10521 Add capability to write corefile note sections, for gdb.
10522 * elf.c (elfcore_write_note): New function.
10523 (elfcore_write_prpsinfo): New function.
10524 (elfcore_write_prstatus): New function.
10525 (elfcore_write_pstatus): New function.
10526 (elfcore_write_prfpreg): New function.
10527 (elfcore_write_prxfpreg): New function.
10528 * elf-bfd.h: Add prototypes for above functions.
10529
10530 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
10531
10532 * elf.c (elf_fake_sections): Propagate errors from
10533 elf_backend_fake_section.
10534
10535 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10536
10537 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10538 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10539 (elf32-sh-nbsd.lo): New rule.
10540 * Makefile.in: Regenerate.
10541 * config.bfd (sh*le-*-netbsdelf*): New target.
10542 (sh*-*-netbsdelf*): New target.
10543 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10544 (bfd_elf32_shnbsd_vec): New vector.
10545 (bfd_elf32_shlnbsd_vec): New vector.
10546 * configure: Regenerate.
10547 * elf32-sh-nbsd.c: New file.
10548 * targets.c: Update copyright years.
10549 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
10550 bfd_elf32_shnbsd_vec.
10551
10552 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
10553
10554 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10555
10556 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
10557
10558 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10559 of a symbol in a section that will be deleted.
10560
10561 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10562
10563 * po/es.po: New file: Spanish translation.
10564 * configure.in (ALL_LINGUAS): Add es.
10565 * configure: Regenerate.
10566
10567 2002-01-06 Steve Ellcey <sje@cup.hp.com>
10568
10569 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10570 argument so we can handle HP-UX specially.
10571 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10572 (elfNN_hpux_backend_section_from_bfd_section): New for support
10573 of SHN_IA_64_ANSI_COMMON.
10574 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10575 (is_unwind_section_name): Add special HP-UX support.
10576 (elfNN_ia64_section_from_shdr): Add support for more sections.
10577 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10578 add support for more sections.
10579 (elfNN_ia64_additional_program_headers): Modify
10580 is_unwind_section_name call.
10581 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10582 only one unwind section in segment.
10583
10584 2002-01-06 Alan Modra <amodra@bigpond.net.au>
10585
10586 * syms.c (_bfd_generic_make_empty_symbol): New function.
10587 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10588 _bfd_generic_make_empty_symbol.
10589 * libbfd.h: Regenerate.
10590 * bfd-in2.h: Regenerate.
10591 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10592 (hppabsd_core_get_symtab_upper_bound): Don't define.
10593 (hppabsd_core_get_symtab): Likewise.
10594 (hppabsd_core_print_symbol): Likewise.
10595 (hppabsd_core_get_symbol_info): Likewise.
10596 (hppabsd_core_bfd_is_local_label_name): Likewise.
10597 (hppabsd_core_get_lineno): Likewise.
10598 (hppabsd_core_find_nearest_line): Likewise.
10599 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10600 (hppabsd_core_read_minisymbols): Likewise.
10601 (hppabsd_core_minisymbol_to_symbol): Likewise.
10602 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10603 Formatting fixes.
10604 * hpux-core.c: Similarly.
10605 * irix-core.c: Similarly.
10606 * osf-core.c: Similarly.
10607 * sco5-core.c: Similarly.
10608 * binary.c (binary_make_empty_symbol): Remove function, define as
10609 _bfd_generic_make_empty_symbol.
10610 * ihex.c (ihex_make_empty_symbol): Likewise.
10611 * mmo.c (mmo_make_empty_symbol): Likewise.
10612 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10613 * srec.c (srec_make_empty_symbol): Likewise.
10614 * versados.c (versados_make_empty_symbol): Likewise.
10615 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10616 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10617 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10618 rather than _bfd_vms_make_empty_symbol.
10619 * vms-misc.c (new_symbol): Likewise.
10620
10621 2002-01-05 Alan Modra <amodra@bigpond.net.au>
10622
10623 * section.c (bfd_section_init): Remove unnecessary initialisations.
10624 (bfd_section_list_clear): New function.
10625 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10626 (_bfd_strip_section_from_output): Use them.
10627 * coffcode.h (coff_set_alignment_hook): Likewise.
10628 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10629 * elf64-mips.c (mips_elf64_final_link): Likewise.
10630 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10631 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10632 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10633 * bfd-in2.h: Regenerate.
10634
10635 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10636 rather than doing our own section handling. Clean up after errors
10637 with bfd_release and bfd_section_list_clear. Handle unexpected
10638 flags.
10639 * aoutf1.h (sunos4_core_file_p): Likewise.
10640 * aix386-core.c (aix386_core_file_p): Likewise.
10641 * cisco-core.c (cisco_core_file_validate): Likewise.
10642 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10643 * trad-core.c (trad_unix_core_file_p): Likewise.
10644
10645 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
10646 with bfd_release and bfd_section_list_clear.
10647 * hpux-core.c (hpux_core_core_file_p): Likewise.
10648 * irix-core.c (irix_core_core_file_p): Likewise.
10649 * lynx-core.c (lynx_core_file_p): Likewise.
10650 * osf-core.c (osf_core_core_file_p): Likewise.
10651 * rs6000-core.c (rs6000coff_core_p): Likewise.
10652 * sco5-core.c (sco5_core_file_p): Likewise.
10653
10654 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10655 sign extension adjustments without conditionals.
10656
10657 2002-01-04 Jakub Jelinek <jakub@redhat.com>
10658
10659 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10660 CIE at .eh_frame start is removed due to no FDEs referencing it.
10661
10662 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10663
10664 * config.bfd (x86_64-*-netbsd*): New target.
10665 * configure.in (x86_64-*-netbsd*): Set COREFILE
10666 to netbsd-core.lo.
10667 * configure: Regenerated.
10668
10669 2002-01-03 Tom Rix <trix@redhat.com>
10670
10671 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10672 for recent bfd_make_section_anyway change.
10673
10674 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10675
10676 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10677 R_ARM_THM_PC11 reloc.
10678
10679 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10680
10681 * configure.in (LINGUAS): Add ja.
10682 * configure: Regenerate.
10683 * po/ja.po: Import from translation project's web site.
10684
10685 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10686
10687 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10688 messages to ease translation into other languages.
10689
10690 For older changes see ChangeLog-0001
10691 \f
10692 Local Variables:
10693 mode: change-log
10694 left-margin: 8
10695 fill-column: 74
10696 version-control: never
10697 End:
This page took 0.251046 seconds and 4 git commands to generate.