* gas/arm/arm7t.d: Replace '-#' with '#-'.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
85302095
AC
12003-11-03 Andrew Cagney <cagney@redhat.com>
2
3 * section.c (bfd_set_section_contents): Make the "location" buffer
4 constant.
5 * bfd-in2.h: Re-generate.
6
fc0a2244
AC
72003-10-30 Andrew Cagney <cagney@redhat.com>
8
9 * syms.c: Replace "struct symbol_cache_entry" with "struct
10 bfd_symbol".
11 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
12 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
13 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
14 * bfd-in2.h: Re-generate.
15
0aa92b58
JJ
162003-10-30 Jakub Jelinek <jakub@redhat.com>
17
18 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
19 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
20 fields.
21 (struct elfNN_ia64_local_hash_table): Remove.
22 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
23 to htab_t. Add loc_hash_memory field.
24 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
25 Removed.
26 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
27 functions.
28 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
29 loc_hash_table. Initialize loc_hash_memory.
30 (elfNN_ia64_hash_table_free): New function.
31 (elfNN_ia64_local_hash_lookup): Remove.
32 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
33 callback.
34 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
35 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
36 (bfd_elfNN_bfd_link_hash_table_free): Define.
37
68b6ddd0
AM
382003-10-30 Alan Modra <amodra@bigpond.net.au>
39
40 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
41 symbol string in place.
42
3f8b3ef3
NC
432003-10-30 Jim Blandy <jimb@redhat.com>
44
45 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
46 object's mach field: all PowerPC machines are supersets of the
47 original rs6000, but not later rs6000 machines.
48
482e2e37
AM
492003-10-30 Alan Modra <amodra@bigpond.net.au>
50
51 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
52 Add "val" and "sval" fields.
53 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
54 (read_attribute_value): Expand and adjust DW_* occurrences.
55 (scan_unit_for_functions, parse_comp_unit): Likewise.
56
257e20bc
NC
572003-10-30 Phil Edwards <phil@codesourcery.com>
58
59 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
60 other common ELF triples.
61 (i[3-7]86-*-vxworks): Change to ELF format.
62 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
63 (sh-*-vxworks): New stanza.
64
ddb2b442
AM
652003-10-30 Lars Knoll <lars@trolltech.com>
66 Michael Matz <matz@suse.de>
67 Jakub Jelinek <jakub@redhat.com>
68 Alan Modra <amodra@bigpond.net.au>
69
70 * merge.c (struct sec_merge_sec_info): Update comment.
71 (struct sec_merge_hash_entry): Remove entsize.
72 (sec_merge_hash_lookup): Only adjust alignment when creating.
73 (sec_merge_emit): Remove register keyword.
74 (cmplengthentry, last4_eq, last_eq): Delete.
75 (strrevcmp, strrevcmp_align, is_suffix): New.
76 (merge_strings): Use them to implement fast suffix merging.
77 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
78 Make "len" signed.
79 (_bfd_elf_strtab_add): Lose on >2G strings.
80 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
81 (cmplengthentry, last4_eq): Delete.
82 (strrevcmp, is_suffix): New.
83 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
84
5e681ec4
PB
852003-10-29 Daniel Jacobowitz <drow@mvista.com>
86
87 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
88 SEC_ALLOC.
89
902003-10-29 Philip Blundell <philb@gnu.org>
91
92 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
93 code sequence.
94 (PLT_HEADER_SIZE): New.
95 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
96 (struct elf32_arm_relocs_copied): ... this. Count both
97 pcrel and non-pcrel relocs. All uses updated.
98 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
99 sections and symbol/section mapping cache.
100 (create_got_section): New.
101 (elf32_arm_create_dynamic_sections): New.
102 (elf_backend_create_dynamic_sections): Use it.
103 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
104 (elf32_arm_check_relocs): Likewise.
105 (elf32_arm_adjust_dynamic_symbol): Likewise.
106 (elf32_arm_copy_indirect_symbol): New.
107 (elf32_arm_link_hash_table_create): Initialise new fields.
108 (elf32_arm_gc_sweep_hook): Implement.
109 (elf32_arm_discard_copies): Delete.
110 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
111 (elf32_arm_finish_dynamic_sections): Likewise.
112 (elf_backend_can_refcount): Define.
113 (elf_backend_copy_indirect_symbol): Likewise.
114 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
115
62f3bb11
AM
1162003-10-29 Alan Modra <amodra@bigpond.net.au>
117
d37c89e5
AM
118 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
119 (elf_backend_grok_psinfo): Define.
120 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
121
62f3bb11
AM
122 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
123 sections with the same name.
124 (elfcore_grok_lwpstatus): Likewise.
125 (elfcore_grok_win32pstatus): Likewise.
126 (elfcore_grok_note): Likewise.
127 (elfcore_grok_nto_status): Likewise.
128 (elfcore_grok_nto_gregs): Likewise.
129
35a0f415
DJ
1302003-10-27 Daniel Jacobowitz <drow@mvista.com>
131
132 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
133 objects.
134
e3d54347
RS
1352003-10-14 Richard Sandiford <rsandifo@redhat.com>
136
137 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
138
5e35cbc2
L
1392003-10-24 H.J. Lu <hongjiu.lu@intel.com>
140
141 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
142 hash table for real symbols.
143
9c3ed942
MS
1442003-10-23 Michael Snyder <msnyder@redhat.com>
145
146 * section.c (asection): Fix typo in comment.
147
0d4792f7
AM
1482003-10-23 Alan Modra <amodra@bigpond.net.au>
149
150 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
151 reloc symbol index to it. Don't allow gd syms in shared libs
152 to be optimized.
153 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
154 (ppc64_elf_size_stubs): Likewise.
155 (ppc64_elf_relocate_section): Check that tls relocs are only used
156 with tls syms, and similarly for non-tls. Correct symbol used
157 when optimizing toc tls code.
158
c9ac8978
NC
1592003-10-22 Nick Clifton <nickc@redhat.com>
160
161 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
162 processing an executable.
163
108ba305
JJ
1642003-10-22 Jakub Jelinek <jakub@redhat.com>
165
166 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
167 field changes.
168 (_bfd_elf_link_assign_sym_version): Likewise.
169 * elflink.h (size_dynamic_sections): Likewise.
170
af9ba621
CV
1712003-10-21 Alexandre Oliva <aoliva@redhat.com>,
172 Michael Snyder <msnyder@redhat.com>
173
174 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
175 bfd_mach_sh4a_nofpu): New machine types.
176 * bfd-in2.h: Rebuilt.
177 * cpu-sh.c (compatible): Remove unused function.
178 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
179 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
180 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
181
5a21e886
NC
1822003-10-21 Wouter van Heyst <wouter@vidicode.nl>
183
184 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
185 describing mismatched formats involving the Maverick FP type.
186
b749473b
NC
1872003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
188
189 * binary.c (binary_object_p): Pass machine flag along with
190 architecture.
191
3e602632
NC
1922003-10-21 Thorsten Brehm <brehm@gmx.net>
193
194 * archures.c (bfd_default_scan): Add support for mcf528x.
195 * ieee.c (ieee_write_processor): Likewise.
196
1972003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
62f3bb11 198 Bernardo Innocenti <bernie@develer.com>
3e602632
NC
199
200 * archures.c: Add MCF528x (MCFv4) support.
201 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
202 * bfd-in2.h: Regenerate.
203
198beae2
AC
2042003-10-20 Andrew Cagney <cagney@redhat.com>
205
206 * targets.c: Replace "struct sec" with "struct bfd_section"
207 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
208 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
209 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
210 * aout-tic30.c, aout-target.h:
211 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
62f3bb11 212
4e2147ff
HPN
2132003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
214
f60ebe14
HPN
215 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
216 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
217 (struct _mmix_elf_section_data): New member pjs.
218 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
219 functions.
220 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
221 (mmix_reloc_map): Ditto.
222 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
223 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
224 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
225 unused.
226 (mmix_elf_check_relocs): Move early return to after
227 mmix_elf_check_common_relocs call.
228 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
229 (_bfd_mmix_before_linker_allocation): Rename from
230 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
231 Arrange to set the initial relaxable size of sections.
232 (_bfd_mmix_after_linker_allocation): Rename from
233 _bfd_mmix_finalize_linker_allocated_gregs.
234 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
235 (bfd_elf64_get_section_contents): Define.
236 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
237 * libbfd.h, bfd-in2.h: Regenerate.
238
4e2147ff
HPN
239 * reloc.c (bfd_generic_relax_section): Default-set
240 section->_cooked_size here.
241 (bfd_generic_get_relocated_section_contents): Don't set it here.
242 Explain why.
243
4b71bec0
DA
2442003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
245
246 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
247 output section has been discarded.
248
d4e2de6b 2492003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
62f3bb11 250
d4e2de6b
NC
251 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
252 (h8300_reloc16_extra_cases): Likewise.
253 (h8300_bfd_link_add_symbols): Likewise.
254
2552003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
256
257 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
258 (h8300sn_info_struct): Likewise.
259 (h8300hn_info_struct): Likewise.
260
98a96df7
CF
2612003-10-16 Pavel Roskin <proski@gnu.org>
262
263 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
264 for sections which lack size info.
265
2cefff79
DS
2662003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
267
268 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
269 mingw32.
270
3e0e1ef1
L
2712003-10-16 H.J. Lu <hongjiu.lu@intel.com>
272
273 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
274 undefined patterns with '*'.
275
9da84788
L
2762003-10-16 H.J. Lu <hongjiu.lu@intel.com>
277
278 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
279 use the last CIE from a different section.
280 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
281 size of the output section.
282
ac393995
RM
2832003-10-07 Roland McGrath <roland@redhat.com>
284
285 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
286 new section from p_align header field.
287
7aaa0689
L
2882003-10-16 H.J. Lu <hongjiu.lu@intel.com>
289
290 * elf32-xtensa.c (xtensa_read_table_entries): The external size
291 of entry is 8 bytes.
292
6cee3f79
AC
2932003-10-15 Andrew Cagney <cagney@redhat.com>
294
295 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
296 with NAME##_canonicalize_symtab.
297 * libcoff-in.h (coff_canonicalize_symtab): Update.
298 * xsym.h (bfd_sym_canonicalize_symtab): Update.
299 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
300 * coffgen.c (coff_canonicalize_symtab): Update.
301 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
302 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
303 * ieee.c (ieee_vec): Update comment.
304 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
305 * mmo.c (mmo_canonicalize_symtab): Update.
306 * nlm-target.h (nlm_canonicalize_symtab): Update.
307 * nlmcode.h (nlm_canonicalize_symtab): Update.
308 * i386msdos.c (msdos_canonicalize_symtab): Update.
309 * hp300hpux.c (MY (canonicalize_symtab)): Update.
310 * oasys.c (oasys_canonicalize_symtab): Update.
311 * som.c (som_canonicalize_symtab): Update.
312 * pef.c (bfd_pef_canonicalize_symtab): Update.
313 * nlmcode.h (nlm_canonicalize_symtab): Update.
314 * xsym.c (bfd_sym_canonicalize_symtab): Update.
315 * vms.c (vms_canonicalize_symtab): Update.
316 * versados.c (versados_canonicalize_symtab): Update.
317 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
318 * ieee.c (ieee_canonicalize_symtab): Update.
319 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
320 * reloc.c: Update comment.
321 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
322 * coff64-rs6000.c (aix5coff64_vec): Update.
323 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
324 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
325 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
326 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
327 * hp300hpux.c (MY_canonicalize_symtab): Update.
328 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
329 * aout-tic30.c (MY_canonicalize_symtab): Update.
330 * aout-target.h (MY_canonicalize_symtab): Update.
331 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
332 * elf.c (_bfd_elf_canonicalize_symtab): Update.
333 * elfcode.h (elf_canonicalize_symtab): Update.
334 * ihex.c (ihex_canonicalize_symtab): Update.
335 * tekhex.c (tekhex_canonicalize_symtab): Update.
336 * binary.c (binary_canonicalize_symtab): Update.
337 * srec.c (srec_canonicalize_symtab): Update.
338
6288878d
KH
3392003-10-15 Kazu Hirata <kazu@cs.umass.edu>
340
341 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
342
46e993b9
KK
3432003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
344
345 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
346 relocations.
347 (sh_elf_check_relocs): Likewise.
348
349 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
350 (sh64_elf_merge_symbol_attribute): New.
351 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
352 (sh64_elf64_merge_symbol_attribute): New.
353
9bf7216d
KK
3542003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
355
356 * elf-bfd.h (struct elf_backend_data): New function pointer member
357 elf_backend_merge_symbol_attribute.
358 * elflink.h (elf_link_add_object_symbols): Adjust call to
359 elf_backend_merge_symbol_attribute if the backend defined it.
62f3bb11
AM
360 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
361 (elfNN_bed): Add that to the initializer.
9bf7216d 362
b614a702
BW
3632003-10-14 Bob Wilson <bob.wilson@acm.org>
364
365 * elf32-xtensa.c (get_is_linkonce_section): Delete.
366 (xtensa_is_property_section, xtensa_is_littable_section): Use
367 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
368 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
369 (xtensa_get_property_section_name): Check section name instead of
370 calling get_is_linkonce_section. Remove unused bfd parameter. Use
371 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
372 linkonce section names by appending ".xt.insn" or ".xt.lit".
373 (xtensa_read_table_entries): Remove bfd argument in call to
374 xtensa_get_property_section_name. Free section name when done.
375 (elf_xtensa_combine_prop_entries): Free leaking table.
376
98a8deaf
RS
3772003-10-13 Richard Sandiford <rsandifo@redht.com>
378
379 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
380 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
381 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
382 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
383 that were needed.
384 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
385 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
386
3f7deb8a
L
3872003-10-13 H.J. Lu <hongjiu.lu@intel.com>
388
389 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
390 (bfd_elf64_ia64_after_parse): Likewise.
391 * bfd-in2.h: Regenerated.
392
393 * elfxx-ia64.c (oor_ip): New.
394 (oor_branch_size): Likewise.
395 (bfd_elfNN_ia64_after_parse): Likewise.
396 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
397 equals sizeof (oor_ip).
398
0c72ffe0
KK
3992003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
400
401 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
402 renumbering of some relocation numbers.
403
8d6ad26e
AM
4042003-10-11 Alan Modra <amodra@bigpond.net.au>
405
406 * coff-sh.c: Move definition of MAP and guard more code with
407 COFF_IMAGE_WITH_PE.
a7f49d81
AM
408
409 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 410 * bfd-in2.h: Regenerate.
a7f49d81 411
ede6aaf3
L
4122003-10-10 H.J. Lu <hongjiu.lu@intel.com>
413
414 * Makefile.am: Run "make dep-am".
415 * Makefile.in: Regenerate.
416 * doc/Makefile.in: Likewise.
417
a3aa4448
L
4182003-10-09 H.J. Lu <hongjiu.lu@intel.com>
419
420 * cofflink.c: Include "safe-ctype.h".
421 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
422
9c8ee639
DB
4232003-10-08 Dave Brolley <brolley@redhat.com>
424 On behalf of Michael Snyder <msnyder@redhat.com>
425
426 * archures.c: Add FRV fr550 machine.
427 * cpu-frv.c: Ditto.
428 * elf32-frv.c: Ditto.
429 * bfd-in2.h: Regenerate.
430
6a691779
TS
4312003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
432
433 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
434 for non-SGI N64 ABI. Improve code consitency.
435
b15b52ef
AO
4362003-10-07 Alexandre Oliva <aoliva@redhat.com>
437
438 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
439 rightshift to 2.
440
cd339148
NS
4412003-10-07 Nathan Sidwell <nathan@codesourcery.com>
442
29ca8dc5
NS
443 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
444 parameter.
445 * cofflink.c (coff_link_add_symbols): Deal with split stab
446 sections.
447 * elflink.h (elf_link_add_object_symbols): Deal with split stab
448 sections.
449 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
450 * libbfd.h: Regenerated.
451
cd339148
NS
452 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
453 overflow, set reloc start position to after the count
454 reloc. Subtract one from num relocs. Give error on 0xffff relocs
455 and no overflow.
456 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
457 overflow.
458 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
459 0xffff.
460
10cf14ea
L
4612003-10-06 H.J. Lu <hongjiu.lu@intel.com>
462
463 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
464 last CIE/FDE if needed.
465
afa105f8
NC
4662003-10-06 Nick Clifton <nickc@redhat.com>
467
468 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
469 BFD64 is enabled.
470
85cf2a8a
NC
4712003-10-06 Matt Thomas <matt@3am-software.com>
472
8d6ad26e 473 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 474
4615568e
NC
4752003-10-06 Robert Millan <robertmh@gnu.org>
476
477 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
478 * config.bfd: Likewise.
479 * configure: Regenerate.
480
8b7cf393
CG
4812003-10-04 Christian Groessler <chris@groessler.org>
482
483 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
484 and R_CALLR.
485
0a6a3ebe
SC
4862003-10-04 Stephane Carrez <stcarrez@nerim.fr>
487
488 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
489 * elf32-m68hc11.c: Likewise.
490 * elf32-m68hc12.c: Likewise.
491 * elf32-m68hc1x.h: Likewise.
492
17e58af0
SC
4932003-10-04 Stephane Carrez <stcarrez@nerim.fr>
494
495 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
496 of flags between HC12 and HCS12.
497
27c630ba
NC
4982003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
499
500 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
501 which become empty after merging.
502
1fc0d173
JJ
5032003-09-30 Jakub Jelinek <jakub@redhat.com>
504
505 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
506 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
507
5f74bc13
CD
5082003-09-30 Chris Demetriou <cgd@broadcom.com>
509
510 * archures.c (bfd_mach_mipsisa64r2): New define.
511 * bfd-in2.h: Regenerate.
512 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
513 * cpu-mips.c (I_mipsisa64r2): New enum value.
514 (arch_info_struct): Add entry for I_mipsisa64r2.
515 * elfxx-mips.c (_bfd_elf_mips_mach)
516 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
517 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
518 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
519
b59dd4a5
L
5202003-09-29 H.J. Lu <hongjiu.lu@intel.com>
521
522 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
523 Handle SHN_IA_64_ANSI_COMMON.
524 (elf_backend_section_from_bfd_section): Defined.
525
243ef1e0
L
5262003-09-26 H.J. Lu <hongjiu.lu@intel.com>
527
528 * elflink.c (elf_link_read_relocs_from_section): Add an argument
529 of a pointer to section. Check bad symbol index.
530 (_bfd_elf_link_read_relocs): Modify calls to
531 elf_link_read_relocs_from_section.
532
d38eb334
DD
5332003-09-23 DJ Delorie <dj@redhat.com>
534
535 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
536 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
537 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
538 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
539 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
540 R_SH_PSHA, R_SH_PSHL added.
541 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
542 (sh_elf_relocate_section): Support new relocs.
543
f0578e28
BW
5442003-09-23 Bob Wilson <bob.wilson@acm.org>
545
546 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
547 dynamic relocation offsets.
548
62f3bb11 5492003-09-23 Alan Modra <amodra@bigpond.net.au>
010b84c1
AM
550
551 * simple.c (bfd_simple_get_relocated_section_contents): Free the
552 hash table using _bfd_generic_link_hash_table_free.
553
62f3bb11 5542003-09-23 Alan Modra <amodra@bigpond.net.au>
7dcb9820
AM
555
556 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
557 type of prefix_length and suffix_length to int. Rename "attributes"
558 to "attr". Comment.
559 (_bfd_elf_get_sec_type_attr): Update prototype.
560 * elf.c (get_special_section): Rewrite.
561 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
562 attr and type pointers.
563 (_bfd_elf_new_section_hook): Adjust for above.
564 (special_sections): Merge suffix with prefix. Set
565 prefix_length for all entries. Set suffix_length appropriately.
566 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
567 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
568 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
569 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
570 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
571 * elf32-v850.c (v850_elf_special_sections): Likewise.
572 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
573 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
574 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
575 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
576 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
577 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
578 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
579 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
580
61bcf373
DJ
5812003-09-21 Daniel Jacobowitz <drow@mvista.com>
582
583 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
584 ->got if the section already exists.
585
8bfd78b3
NS
5862003-09-19 Nathan Sidwell <nathan@codesourcery.com>
587
588 * dwarf2.c (decode_line_info): Cope with an initially empty
589 filename table.
590
6726e1ea
L
5912003-09-18 H.J. Lu <hongjiu.lu@intel.com>
592
593 * acinclude.m4: Include ../config/accross.m4.
594 * aclocal.m4: Regenerated.
595
596 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
597 or long long.
598 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
599 (host64): Remove if HOST_64BIT_TYPE is set to long.
600
601 * configure.in (HOST_64BIT_TYPE): Set according to the size of
602 long and long long.
603 (HOST_U_64BIT_TYPE): Likewise.
604 (host64): Likewise.
605 * configure: Regenerated.
606
5de3bf90
AM
6072003-09-19 Alan Modra <amodra@bigpond.net.au>
608
609 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
610 since some ABIs round up the size of the struct.
611
9e4d8df3
L
6122003-09-18 H.J. Lu <hongjiu.lu@intel.com>
613
614 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
615 the old symbol is undefined and the new symbol is defined.
616
228ce064
AS
6172003-09-18 Andreas Schwab <schwab@suse.de>
618
619 * simple.c (bfd_simple_get_relocated_section_contents): Use
620 _bfd_generic_link_hash_table_create instead of
621 bfd_link_hash_table_create.
622
fdbdabdd
L
6232003-09-10 H.J. Lu <hongjiu.lu@intel.com>
624
625 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
626 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
627
a252afa4
DA
6282003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
629 Randolph Chung <randolph@tausq.org>
630
631 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
632 hppa_link_hash_newfunc, hppa_build_one_stub,
633 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
634 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
635 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
636 for generating import stubs for calls to statically linked PIC
637 functions.
638 (hppa_type_of_stub): Don't generate an import stub for calls to
639 statically linked pic functions. Generate import stubs for calls
640 in a shared object, to functions not in a regular file, and to
641 defined weak functions. Add new argument INFO.
642 (hppa_build_one_stub): Don't undef ADDIL_DP.
643 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
644 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
645 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
646 non-shared link. Convert instructions that use the the linkage table
647 pointer, or a facsimile thereof, to use the global data pointer when
648 the reloc has been changed.
649
42acdc7c
JB
6502003-09-08 Joel Brobecker <brobecker@gnat.com>
651
652 * archures.c: Add new machine names for hppa.
653 * bfd-in2.h: Regenerate.
654 * cpu-hppa.c: Use the new machine names.
655
2a0e29b4
SC
6562003-09-06 Stephane Carrez <stcarrez@nerim.fr>
657
658 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
659 all_local_syms member.
660 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
661 to get the local symbols.
662
3f533aa9
SC
6632003-09-06 Stephane Carrez <stcarrez@nerim.fr>
664
665 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
666 (elf_backend_special_sections): Define.a
667
668 PR savannah/4950:
669 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
670 section is read-only.
671
8ad30312
NC
6722003-09-04 Nick Clifton <nickc@redhat.com>
673
674 * archures.c (bfd_mach_v850e1): Define.
675 * bfd-in2.h: Regenerate.
676 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
677 (arch_info_struct): Include an entry for bfd_mach_v850e1.
678 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
679 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
680 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
681 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
682 linked with v850e binaries. Mark the output as v850e.
5de3bf90 683
3922a8c1
NC
6842003-09-03 Nick Clifton <nickc@redhat.com>
685
5de3bf90 686 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
687 symbols that are used in relocs.
688
13dfd2d0
NC
6892003-08-30 Robert Millan <robertmh@gnu.org>
690
691 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
692 * config.bfd: Likewise.
693 * configure: Regenerate.
694
1c0881dd
CG
6952003-08-31 Christian Groessler <chris@groessler.org>
696
697 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
698 instead of returning bfd_reloc_continue.
699
ac0e732e
AJ
7002003-08-31 Andreas Jaeger <aj@suse.de>
701
702 * merge.c: Update to ISO C90.
703
ec317fb1
ILT
7042003-08-27 Ian Lance Taylor <ian@airs.com>
705
49c97a80
ILT
706 * configure.in: Check for strtoull.
707 * bfd.c (bfd_scan_vma): Use strtoull when available.
708 * configure, config.in: Regenerate.
709
ec317fb1
ILT
710 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
711 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
712 __GNUC__ when deciding whether to use long long for
713 BFD_HOST_64_BIT.
714 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
715
d539b3aa
CG
7162003-08-27 Christian Groessler <chris@groessler.org>
717
718 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
719 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
720 functions.
721 (elf32_i860_howto_table): Insert the new functions as
722 'special_function's in the proper reloc type entries.
723
73052b5e
RS
7242003-08-27 Richard Sandiford <rsandifo@redhat.com>
725
726 * elf32-frv.c (elf32_frv_relocate_section): Use
727 _bfd_elf_rela_local_sym.
728
2c848f79
MS
7292003-08-26 Michael Snyder <msnyder@redhat.com>
730
731 * cpu-frv.c: Remove unused enum.
732
980491e6
MR
7332003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
734
735 * reloc.c: Fix documentation for MIPS ELF relocations.
736 libbfd.h: Regenerate.
737 bfd-in2.h: Regenerate.
738
6d1227b8
JE
7392003-08-24 Jason Eckhardt <jle@rice.edu>
740
5de3bf90 741 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 742
f680ea79
JE
7432003-08-24 Jason Eckhardt <jle@rice.edu>
744
745 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
746 shift by 2 before storing the relocated value.
747
c28b1c28
JE
7482003-08-23 Jason Eckhardt <jle@rice.edu>
749
5de3bf90 750 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
751 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
752 LOWn, SPLITn, and BRADDR.
753 (RTYPE2HOWTO): Check that the r_type is within the howto_table
754 before trying to access the entry.
755 (coff_i860_rtype_to_howto): Likewise.
756 (coff_i860_reloc_type_lookup): New function.
757 (i860_reloc_processing): New function.
758 (coff_bfd_reloc_type_lookup): Define macro.
759 (RELOC_PROCESSING): Define macro.
760 Minor formatting adjustments.
761
40a0491a
AM
7622003-08-23 Alan Modra <amodra@bigpond.net.au>
763
764 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
765
69bbc4c0
L
7662003-08-22 H.J. Lu <hongjiu.lu@intel.com>
767
768 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
769 .got section at 8 bytes.
770
8b956130
NC
7712003-08-21 Nick Clifton <nickc@redhat.com>
772
85db1db4 773 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 774
6c21aa76
NC
7752003-08-21 Randolph Chung <tausq@debian.org>
776
777 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
778 can have OSABI=Linux or OSABI=SysV. Check for both.
779 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
780
3673a93e
NC
7812003-08-21 Nick Clifton <nickc@redhat.com>
782
783 * po/sv.po: Updated Swedish translation.
784
427b80f4
RS
7852003-08-20 Richard Sandiford <rsandifo@redhat.com>
786
787 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
788
560e09e9
NC
7892003-08-20 Nick Clifton <nickc@redhat.com>
790
791 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
792 replace some duplicated code in most elfxx-xxxx.c files. This
793 version uses the new fields in bfd_link_info.
794
40a0491a
AM
795 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
796 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
797 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
798 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
799 * elf32-i386.c (elf_i386_relocate_section): Likewise.
800 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
801 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
802 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
803 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
804 * elf32-s390.c (elf_s390_relocate_section): Likewise.
805 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
806 * elf32-vax.c (elf_vax_relocate_section): Likewise.
807 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
808 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
809 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
810 * elf64-s390.c (elf_s390_relocate_section): Likewise.
811 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
812 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
813 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
814
815 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
816 elf_hppa_remark_useless_dynamic_symbols,
817 elf_hppa_relocate_section): Use the new fields in
818 bfd_link_info structure.
819 * elf32-sh.c (sh_elf_relocate_section): Likewise.
820 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
821 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
822 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
823 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
824 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
825
826 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
827 undefined symbols in shared libraries. Remove redundant test
828 of shlib_undefined when reporting references to forced local
829 symbols.
560e09e9 830
4091ea4e
L
8312003-08-18 Andreas Schwab <schwab@suse.de>
832
833 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
834 executables.
835
b0cdc7bc
HPN
8362003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
837
838 * simple.c (bfd_simple_get_relocated_section_contents): Move
839 reloc_done hack to before first bfd_section_size call. Change all
840 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
841
c1993d04
AM
8422003-08-16 Alan Modra <amodra@bigpond.net.au>
843
844 * elf64-ppc.c: Don't include elf/ppc.h.
845
792b4a53
RS
8462003-08-14 Richard Sandiford <rsandifo@redhat.com>
847
848 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
849 code to work with 64-bit bfds.
850
fdc09da8
AM
8512003-08-14 Alan Modra <amodra@bigpond.net.au>
852
853 * dep-in.sed: Remove libintl.h.
854 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
855 (POTFILES.in): Remove target.
856 * Makefile.in: Regenerate.
857
ee87f2da
AM
8582003-08-12 Alan Modra <amodra@bigpond.net.au>
859
860 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
861 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
862 use the function sym from the previous reloc.
863
15f40dfc
JJ
8642003-08-11 Jakub Jelinek <jakub@redhat.com>
865
866 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
867 fatal if -pie.
868 * elf32-s390.c (elf_s390_relocate_section): Likewise.
869 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
870 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
871 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
872 * elf64-s390.c (elf_s390_relocate_section): Likewise.
873 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
874 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
875 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
876 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
877 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
878 on undefined symbols if -pie.
879 * elf32-sh.c (sh_elf_relocate_section): Likewise.
880
6ab189d5
AM
8812003-08-11 Alan Modra <amodra@bigpond.net.au>
882
883 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
884 branch to __libc_start_main.
885
3b260895
NC
8862003-08-08 Dmitry Diky <diwil@mail.ru>
887
6ab189d5
AM
888 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
889 gcc order.
3b260895
NC
890 * cpu-msp430.c: Likewise.
891 * elf32-msp430.c: Likewise.
892 * bfd-in2.h: Regenerate.
893
c39a58e6
AM
8942003-08-07 Alan Modra <amodra@bigpond.net.au>
895
9c5bfbb7
AM
896 * elfxx-target.h: Remove PTR cast.
897 * targets.c (bfd_target): Make backend_data const void *.
898 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
899 * elf-m10300.c: Likewise.
900 * elf.c: Likewise.
901 * elf32-hppa.c: Likewise.
902 * elf32-i386.c: Likewise.
903 * elf32-m68hc1x.c: Likewise.
904 * elf32-ppc.c: Likewise.
905 * elf32-s390.c: Likewise.
906 * elf32-sh.c: Likewise.
907 * elf32-sh64.c: Likewise.
908 * elf32-sparc.c: Likewise.
909 * elf32-xtensa.c: Likewise.
910 * elf64-mips.c: Likewise.
911 * elf64-ppc.c: Likewise.
912 * elf64-s390.c: Likewise.
913 * elf64-sh64.c: Likewise.
914 * elf64-sparc.c: Likewise.
915 * elf64-x86-64.c: Likewise.
916 * elfcode.h: Likewise.
917 * elfcore.h: Likewise.
918 * elflink.c: Likewise.
919 * elflink.h: Likewise.
920 * elfxx-ia64.c: Likewise.
921 * elfxx-mips.c: Likewise.
922 * elfxx-mips.h: Likewise.
923 * elf.c (prep_headers): Remove useless check for null backend_data.
924 * bfd-in2.h: Regenerate.
925
c39a58e6
AM
926 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
927 (NAME): Use ## rather than CONCAT4 macro.
928 * elfcode.h: Remove one remaining PARAMS macro.
929 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
930 * elf-strtab.c: Likewise.
931 * elf-hppa.h: Likewise.
932 * elf32-hppa.h: Likewise.
933 * elf32-hppa.c: Likewise.
934 (elf32_hppa_add_symbol_hook): Delete.
935 (elf_backend_add_symbol_hook): Don't define.
936 * libhppa.h: Convert to C90. Replace INLINE with inline.
937
97b639ba
AM
9382003-08-06 Alan Modra <amodra@bigpond.net.au>
939
940 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
941 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
942 function descriptors, but warn.
943 (ppc_build_one_stub): Remove a couple of vars. Move code creating
944 stub syms so that we can avoid a stub sym if we already have a
945 plt sym. Do not redefine an existing symbol.
946 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
947 glink.
948
9e7d479d
NC
9492003-08-06 Nick Clifton <nickc@redhat.com>
950
951 * po/fr.po: Updated French translation.
952
77f3d027
AM
9532003-08-06 Alan Modra <amodra@bigpond.net.au>
954
955 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
956 SEC_LINKER_CREATED.
957
50d6c878
DJ
9582003-08-05 Daniel Jacobowitz <drow@mvista.com>
959
960 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
961 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
962
14abcef9
NC
9632003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
964
4a21a492 965 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
966 message if the line number table could not be read.
967
8c675694
NC
9682003-08-04 Nick Clifton <nickc@redhat.com>
969
970 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
971 to messages produced for .gnu.warning.SYMBOL sections.
972
268b6b39
AM
9732003-08-04 Alan Modra <amodra@bigpond.net.au>
974
975 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
976 * elfcore.h: Likewise.
977 * elflink.c: Likewise.
978 * elflink.h: Likewise.
979 * elf.c (sym_is_global): Remove INLINE.
980 (align_file_position): Replace INLINE with inline.
981 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
982 (elf_file_p): Replace INLINE with inline.
983
866f48b7
KK
9842003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
985
986 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
987
8651fcf9
L
9882003-08-01 H.J. Lu <hongjiu.lu@intel.com>
989
990 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
991
37cd2629
L
9922003-08-01 H.J. Lu <hongjiu.lu@intel.com>
993
994 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
995 ElfNN_External_Rela instead of Elf64_External_Rela.
996
91fb2a9d
NC
9972003-08-01 Nick Clifton <nickc@redhat.com>
998
999 * config.bfd: Add code to catch obsolete configurations and warn
1000 about them unless --enable-obsolete is used. Use this to mark
1001 vax-vms port as obsolete.
1002
e656e369
AM
10032003-07-30 Alan Modra <amodra@bigpond.net.au>
1004
1005 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1006 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1007 Formatting.
1008 * elfxx-target.h: Remove PARAMS macro. Formatting.
1009
50bc7936
AM
10102003-07-30 Alan Modra <amodra@bigpond.net.au>
1011
1012 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1013 * elf64-ppc.c (get_fdh): New function, split out from
1014 ppc64_elf_edit_opd.
1015 (ppc64_elf_check_relocs): Use get_fdh.
1016 (func_desc_adjust): Likewise. Tidy.
1017 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1018 exit. Use get_fdh. Account for superfluous dynamic relocs.
1019 (ppc64_elf_relocate_section): Warning fix.
1020
a62d170c
JE
10212003-07-30 Jason Eckhardt <jle@rice.edu>
1022
1023 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1024
7734b6e9
JE
10252003-07-30 Jason Eckhardt <jle@rice.edu>
1026
1027 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1028
37f4508b
AM
10292003-07-30 Randolph Chung <tausq@debian.org>
1030
1031 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1032 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1033
217aa764
AM
10342003-07-30 Alan Modra <amodra@bigpond.net.au>
1035
1036 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1037 Replace PTR with void *. Formatting.
1038 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1039 (make_mapping): Likewise.
1040
494dac0c
AM
10412003-07-29 Alan Modra <amodra@bigpond.net.au>
1042
1043 * elf64-ppc.c (func_desc_adjust): Give linker created function
1044 descriptor symbols a size and type.
1045 (ppc64_elf_relocate_section): Correct lq insn test.
1046
deaaf2f3
EC
10472003-07-28 Eric Christopher <echristo@redhat.com>
1048
1049 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1050 (ppc_elf_install_value): New function.
1051 (ppc_elf_sort_rela): Remove.
1052 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1053 and replace with out of range branch stubs.
1054 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1055
709e685d
AO
10562003-07-29 Alexandre Oliva <aoliva@redhat.com>
1057
1058 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1059 from input_bfd.
1060
36c506c5
AM
10612003-07-28 Alan Modra <amodra@bigpond.net.au>
1062
1063 * elf.c (special_sections): Set attributes for .got and .plt.
1064
5d35169e
AM
10652003-07-27 Alan Modra <amodra@bigpond.net.au>
1066
1067 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1068 on function descriptors.
1069 (ELIMINATE_COPY_RELOCS): Expand comment.
1070 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1071 Do include ".toc1".
1072
3cddba1e
L
10732003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1074
1075 * elf.c (_bfd_elf_new_section_hook): Set the default section
1076 type to SHT_NULL.
1077 (elf_fake_sections): Set the section type based on asect->flags
1078 if it is SHT_NULL. Don't abort on processor specific section
1079 types.
1080
d622ef4b
L
10812003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1082
1083 * bfd-in2.h: Regenerated.
1084
2f89ff8d
L
10852003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1086
1087 * elf-bfd.h (bfd_elf_special_section): New.
1088 (elf_backend_data): Add special_sections, a pointer to
1089 bfd_elf_special_section.
1090 (elf_section_type). New.
1091 (elf_section_flags): New.
1092 (_bfd_elf_get_sec_type_attr): New.
1093
1094 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1095 real section type/flags.
1096 (special_sections): New.
1097 (get_special_section): New.
1098 (_bfd_elf_get_sec_type_attr): New.
1099 (_bfd_elf_new_section_hook): Check special_section to set
1100 elf_section_type and elf_section_flags.
1101 (elf_fake_sections): Don't use section name to set ELF section
1102 data.
1103
1104 * elf32-m32r.c (m32r_elf_special_sections): New.
1105 (elf_backend_special_sections): Defined.
1106
1107 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1108 (elf_backend_special_sections): Defined.
1109
1110 * elf32-mcore.c (mcore_elf_special_sections): New.
1111 (elf_backend_special_sections): Defined.
1112
1113 * elf32-ppc.c (ppc_elf_special_sections): New.
1114 (elf_backend_special_sections): Defined.
1115
1116 * elf32-sh64.c (sh64_elf_special_sections): New.
1117 (elf_backend_special_sections): Defined.
1118
1119 * elf32-v850.c (v850_elf_special_sections): New.
1120 (elf_backend_special_sections): Defined.
1121
1122 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1123 (elf_backend_special_sections): Defined.
1124
1125 * elf64-alpha.c (elf64_alpha_special_sections): New.
1126 (elf_backend_special_sections): Defined.
1127
1128 * elf64-hppa.c (elf64_hppa_special_sections): New.
1129 (elf_backend_special_sections): Defined.
1130
1131 * elf64-ppc.c (ppc64_elf_special_sections): New.
1132 (elf_backend_special_sections): Defined.
1133
1134 * elf64-sh64.c (sh64_elf64_special_sections): New.
1135 (elf_backend_special_sections): Defined.
1136
1137 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1138 (elf_backend_special_sections): Defined.
1139
1140 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1141
1142 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1143 (elf_backend_special_sections): Defined.
1144
1145 * elfxx-target.h (elf_backend_special_sections): New. Default
1146 to NULL.
1147 (elfNN_bed): Initialize special_sections.
1148
1149 * section.c (bfd_abs_section): Remove const.
1150 (bfd_und_section): Likewise.
1151 (bfd_com_section): Likewise.
1152 (bfd_ind_section): Likewise.
1153
20650579
NC
11542003-07-24 Nick Clifton <nickc@redhat.com>
1155
1156 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1157 sections are assigned the LOAD attribute.
1158
deaaf2f3 11592003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
1160
1161 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1162 * elf32-sh64-com.c: Likewise.
1163 * elf32-sh64.c: Likewise.
1164 * elf32-sh64.h: Likewise.
1165 * elf64-sh64.c: Likewise.
1166
3d85aebe
KK
11672003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1168
1169 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1170 (allocate_dynrelocs): Likewise.
1171 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1172 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1173
834d807b
NC
11742003-07-24 Nick Clifton <nickc@redhat.com>
1175
1176 * po/fr.po: Updated French translation.
1177
571b5725
BW
11782003-07-23 Bob Wilson <bob.wilson@acm.org>
1179
1180 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1181 near the beginning of the file. Swap order of arguments. Call
1182 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1183 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1184 (elf_xtensa_relocate_section): Likewise.
1185 (shrink_dynamic_reloc_sections): Likewise.
1186
b536dc1e
BW
11872003-07-23 Bob Wilson <bob.wilson@acm.org>
1188
1189 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1190 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1191 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1192 first printing an error message.
1193 (elf_xtensa_finish_dynamic_sections): Likewise.
1194 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1195 discarding literal table entries.
1196 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1197 (elf_xtensa_do_asm_simplify): Likewise.
1198
7f888330
SC
11992003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1200
1201 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1202 we have a local symbol in common section.
1203
ecc27c31
L
12042003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1205
1206 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1207 weak symbols.
1208
f9f3cf65
NC
12092003-07-22 Nick Clifton <nickc@redhat.com>
1210
1211 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1212 expected RS6000 storage classes.
1213
bb32e54f
L
12142003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1215
1216 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1217 output_bfd unused to silence gcc.
1218
796f2a93
NC
12192003-07-21 Nick Clifton <nickc@redhat.com>
1220
1221 * po/sv.po: Updated Swedish translation.
1222
f6c52c13
AM
12232003-07-21 Alan Modra <amodra@bigpond.net.au>
1224
1225 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1226 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1227 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1228 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1229 now done in _bfd_elf_symbol_refs_local_p.
1230 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1231 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1232 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1233
aa37626c
L
12342003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1235
1236 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1237
1e364ec9
L
12382003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1239
1240 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1241 (SYMBOL_CALLS_LOCAL): Likewise.
1242
1243 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1244 immediately if symbol isn't defined locally.
1245
986a241f
RH
12462003-07-18 Richard Henderson <rth@redhat.com>
1247
1248 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1249 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1250 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1251 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1252 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1253 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1254 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1255 Update all callers to provide the relocation being resolved.
1256
ac4b3dd8
NC
12572003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1258
1259 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1260 targ_cflags.
1261
6c37ac4d
NC
12622003-07-17 Nick Clifton <nickc@redhat.com>
1263
1264 * po/es.po: New Spanish translation.
1265 * po/sv.po: New Swedish translation.
1266 * po/opcodes.pot: Regenerate.
1267
02e6ad56
RH
12682003-07-16 Richard Henderson <rth@redhat.com>
1269
1270 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1271 * elfxx-ia64.c, targets.c: Likewise.
1272
5686517c
RH
12732003-07-16 Richard Henderson <rth@redhat.com>
1274
1275 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1276 for symbols defined locally plus -Bsymbolic. Tidy logic.
1277
5a7ea749
RS
12782003-07-15 Richard Sandiford <rsandifo@redhat.com>
1279
1280 * archures.c (bfd_mach_mips7000): New.
1281 * bfd-in2.h: Regenerated.
1282 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1283 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1284 (mips_mach_extensions): Add an entry for it.
1285
76bff705
NC
12862003-07-14 Nick Clifton <nickc@redhat.com>
1287
1288 * po/tr.po: Update with latest version.
1289 * po/SRC-POTFILES.in: Regenerate.
1290 * po/bfd.pot: Regenerate.
1291 * Makfile.in: Regenerate.
1292 * configure: Regenerate.
1293
d0facd1b
NC
12942003-07-12 Jeff Baker <jbaker@qnx.com>
1295
1296 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1297 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1298 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1299 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1300
bcb9b88d
NC
13012003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1302
1303 * coffcode.h (coff_set_section_contents): Set the
1304 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1305
7a9823f1
RS
13062003-07-11 Richard Sandiford <rsandifo@redhat.com>
1307
1308 * bfd-in.h (bfd_h8300_pad_address): Declare.
1309 * bfd-in2.h: Regenerate.
1310 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1311 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1312 addresses before checking whether they can be relaxed.
1313 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1314 Don't complain about overflows in general 8-bit relocations.
1315 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1316 Fix handling of R_H8_DIR24A8.
1317
c6baf75e
RS
13182003-07-11 Richard Sandiford <rsandifo@redhat.com>
1319
1320 * elf32-h8300.c: Convert function prototypes and definitions
1321 to C90 syntax.
1322 * coff-h8300.c: Likewise.
1323 * cpu-h8300.c: Likewise.
1324
fce00800
AM
13252003-07-11 Alan Modra <amodra@bigpond.net.au>
1326
1327 * po/SRC-POTFILES.in: Regenerate.
1328 * po/bfd.pot: Likewise.
1329
e901de89
BW
13302003-07-10 Bob Wilson <bob.wilson@acm.org>
1331
1332 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1333 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1334 .xt.lit.plt section.
1335 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1336 and allocate memory for it.
1337 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1338 section to the .got.loc section.
1339 (elf_xtensa_finish_dynamic_sections): Fix up call to
1340 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1341 the address of .got.loc.
1342 (relax_property_section): Shrink .got.loc to match changes in any
1343 literal table section.
1344 (xtensa_is_property_section): Change to match
1345 xtensa_get_property_section_name.
1346 (xtensa_is_littable_section): New.
1347
eff26f78
L
13482003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1349
1350 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1351 -1LL.
1352
942e0f42
AM
13532003-07-10 Alan Modra <amodra@bigpond.net.au>
1354
1355 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1356 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1357 Run "make dep-am".
1358 * Makefile.in: Regenerate.
1359
73c3cd1c
AO
13602003-07-10 Alexandre Oliva <aoliva@redhat.com>
1361
1362 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1363 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1364 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1365 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1366 * elf32-am33lin.c: Rename global functions.
1367 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1368 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1369 * configure.in (bfd_elf32_am33lin_vec): Added.
1370 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1371 (elf32-am33lin.lo): List dependencies.
1372 * aclocal.m4, configure, Makefile.in: Rebuilt.
1373 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1374 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1375 ELF_ARCH was not defined before.
1376 (elf_symbol_leading_char): Define if not defined.
1377 * elf32-am33lin.c: Override the definitions above.
1378 * targets.c (bfd_elf32_am33lin_vec): New.
1379
03a12831
AO
13802003-07-09 Alexandre Oliva <aoliva@redhat.com>
1381
1382 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1383 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1384 pcrel_relocs_copied.
1385 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1386 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1387 ld-linux.so.2 to ld.so.1.
1388 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1389 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1390 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1391 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1392 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1393 .rela.* section contents with bfd_zalloc.
1394 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1395 * elf-m10300.c: Added declarations for functions missing them.
1396 Merge some shared-library changes from the i386 back-end. Use
1397 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1398 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1399 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1400 members of elf_link_hash_entry. Adjusted references.
1401 (mn10300_elf_final_link_relocate): dynobj was already loaded
1402 into a local variable, use it.
1403 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1404 * elf-m10300.c: Add missing function prototypes.
1405 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1406 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1407 relocation for dynamic relocations.
1408 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1409 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1410 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1411 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1412 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1413 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1414 adress is already known at the time we compute relaxations.
1415 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1416 and PLT32 to narrower relocations.
1417 * libbfd.h, bfd-in2.h: Rebuilt.
1418 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1419 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1420 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1421 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1422 BFD_RELOC_MN10300_RELATIVE): New relocs.
1423 * libbfd.h, bfd-in2.h: Rebuilt.
1424 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1425 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1426 fields.
1427 (elf_mn10300_howto): Defined new relocation types.
1428 (mn10300_reloc_map): Map them.
1429 (_bfd_mn10300_elf_create_got_section): New fn.
1430 (mn10300_elf_check_relocs): Handle PIC relocs.
1431 (mn10300_elf_final_link_relocate): Likewise.
1432 (mn10300_elf_relocate_section): Handle DSOs.
1433 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1434 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1435 elf_mn10300_pic_plt_entry): New.
1436 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1437 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1438 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1439 elf_mn10300_plt_reloc_offset: New macros.
1440 (ELF_DYNAMIC_INTERPRETER): Likewise.
1441 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1442 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1443 (_bfd_mn10300_elf_discard_copies): Likewise.
1444 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1445 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1446 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1447 (elf_backend_can_gc_sections,
1448 elf_backend_create_dynamic_sections,
1449 elf_backend_adjust_dynamic_sections,
1450 elf_backend_size_dynamic_sections,
1451 elf_backend_finish_dynamic_symbol,
1452 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1453 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1454 elf_backend_got_header_size, elf_backend_plt_header_size): New
1455 macros.
1456
b08fa4d3
AO
14572003-07-09 Alexandre Oliva <aoliva@redhat.com>
1458
1459 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1460 * elf-m10300.c (compute_function_info): Account for AM33
1461 registers in `movm' when computing stack space for `call' when
1462 linking for AM33/2.0 link.
1463 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1464 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1465 * bfd-in2.h: Rebuilt.
1466 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1467 * elf-m10300.c: Updated.
1468 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1469 * archures.c (bfd_mach_am332): Defined.
1470 * bfd-in2.h: Rebuilt.
1471 * cpu-m10300.c (bfd_am332_arch): Defined.
1472 (bfd_am33_arch): Chained with am33-2.
1473 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1474 (_bfd_mn10300_elf_final_write_processing): Likewise.
1475
201933ea
L
14762003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1477
1478 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1479
e717da7e
AM
14802003-07-10 Alan Modra <amodra@bigpond.net.au>
1481
1482 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1483 (struct ppc64_elf_obj_tdata): New.
1484 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1485 (ppc64_elf_mkobject): New function.
1486 (struct got_entry): Add "owner". Move "tls_type".
1487 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1488 (ppc64_elf_init_stub_bfd): New function.
1489 (create_got_section): Create header .got in dynobj. Create .got
1490 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1491 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1492 Look for dynobj .got, and test it.
1493 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1494 (update_local_sym_info): Likewise.
1495 (ppc64_elf_check_relocs): Likewise.
1496 (ppc64_elf_gc_sweep_hook): Likewise.
1497 (ppc64_elf_tls_optimize): Likewise.
1498 (allocate_dynrelocs): Likewise.
1499 (ppc64_elf_size_dynamic_sections): Likewise.
1500 (ppc64_elf_relocate_section): Likewise.
1501 (ppc64_elf_next_toc_section): Update comment.
1502 (toc_adjusting_stub_needed): Remove unneeded cast.
1503 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1504 testing section flags.
1505 (ppc64_elf_build_stubs): Likewise.
1506 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1507 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1508 (func_desc_adjust): Copy over dynamic info for undef weaks.
1509 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1510 (ppc64_elf_size_stubs): Update prototype.
1511 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1512 input sections rather than scanning dynobj.
1513
18ad015f
RS
15142003-07-09 Richard Sandiford <rsandifo@redhat.com>
1515
1516 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1517 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1518 (mips_elf_create_msym_section): Delete.
1519 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1520 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1521 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1522 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1523 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1524 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1525 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1526
e10609d3
RS
15272003-07-09 Richard Sandiford <rsandifo@redhat.com>
1528
1529 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1530 symbols protected.
1531
0d591ff7
RS
15322003-07-09 Richard Sandiford <rsandifo@redhat.com>
1533
1534 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1535 of relocations whose offset is -2.
1536
fdd07405
RS
15372003-07-09 Richard Sandiford <rsandifo@redhat.com>
1538
1539 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1540 forced-local symbols like other locals. Don't create relocations
1541 against STN_UNDEF in irix objects.
1542
d2fba50d
RS
15432003-07-09 Richard Sandiford <rsandifo@redhat.com>
1544
1545 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1546 compatible objects, add the values of defined external symbols
1547 to the addend.
1548
6eaa6adc
RS
15492003-07-09 Richard Sandiford <rsandifo@redhat.com>
1550
1551 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1552 initialize a GOT entry to the symbol's st_value.
1553
0c83546a
AM
15542003-07-08 Alan Modra <amodra@bigpond.net.au>
1555
43c40ab2
AM
1556 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1557 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1558 (ppc_elf_tdata): Define.
1559 (elf_local_ptr_offsets): Adjust.
1560 (ppc_elf_mkobject): New function.
1561 (bfd_elf32_mkobject): Define.
1562
0c83546a
AM
1563 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1564 * elfcore.h (elf_core_file_p): Likewise.
1565 * section.c (bfd_section_init): Remove prototype.
1566
58111eb7
AM
15672003-07-08 Alan Modra <amodra@bigpond.net.au>
1568
1569 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1570 field.
1571 (enum elf_linker_section_enum): Delete.
1572 (struct elf_linker_section): Delete.
1573 (struct elf_linker_section_pointers): Delete.
1574 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1575 Make linker_section_pointers a void**.
1576 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1577 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1578 of old item in elf-bfd.h.
1579 (struct elf_linker_section): Likewise.
1580 (struct elf_linker_section_pointers): Likewise.
1581 (elf_local_ptr_offsets): Define.
1582 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1583 (ppc_elf_link_hash_newfunc): Init it.
1584 (struct ppc_elf_link_hash_table): Add sbss.
1585 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1586 individual fields.
1587 (elf_create_linker_section): Fold into..
1588 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1589 Make rela section here if shared.
1590 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1591 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1592 clearing in a loop.
1593 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1594 section here.
1595 (ppc_elf_check_relocs): Adjust.
1596 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1597 creating .sbss by hand.
1598 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1599
15f8604d
JJ
16002003-07-04 Jakub Jelinek <jakub@redhat.com>
1601
1602 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1603 complain_overflow_bitfield.
1604 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1605 complain_overflow_bitfield.
1606
3368a7fb
JJ
16072003-07-04 Jakub Jelinek <jakub@redhat.com>
1608
1609 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1610 true even if -pie.
1611
9203ba99
JJ
16122003-07-04 Jakub Jelinek <jakub@redhat.com>
1613
1614 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1615 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1616 !info->executable.
1617 (get_fptr): For -pie create .opd as writable section and create
1618 .rela.opd as well.
1619 (elfNN_ia64_check_relocs): Change info->shared into
1620 !info->executable.
1621 (allocate_fptr): Likewise.
1622 (allocate_dynrel_entries): Account for a relative reloc for -pie
1623 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1624 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1625 section if -pie.
1626 (set_got_entry): Don't create a relative reloc if -pie
1627 want_ltoff_fptr for undefweak symbol.
1628 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1629 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1630 @fptr().
1631
1632 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1633 even if -pie.
1634 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1635 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1636 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1637 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1638 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1639 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1640 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1641 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1642 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1643
e0a868d1 16442003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1645
1646 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1647 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1648 <R_H8_DIR32A16>: Fix type of relocation.
1649
35cad4c4
KK
16502003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1651
1652 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1653 sections were created already. Remove unnecessary tests of
1654 the previous change.
1655
03151a5a
KK
16562003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1657
1658 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1659 bfd_make_section for existing sections.
1660
003d627e
AM
16612003-07-04 Alan Modra <amodra@bigpond.net.au>
1662
2293c499
AM
1663 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1664 create_got_section if we already have done so.
1665 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1666 (sh_elf_check_relocs): Likewise.
1667 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1668 htab->root.dynobj instead.
1669 (sh_elf_check_relocs): Likewise.
1670 (sh_elf_finish_dynamic_sections): Likewise.
1671
003d627e
AM
1672 * section.c (bfd_make_section): Return NULL for existing section.
1673
fa681e5d
AM
16742003-07-04 Alan Modra <amodra@bigpond.net.au>
1675
1676 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1677 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1678
1679 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1680 (_bfd_elf_find_pointer_linker_section): Likewise.
1681 (bfd_elf32_create_pointer_linker_section): Likewise.
1682 (bfd_elf32_finish_pointer_linker_section): Likewise.
1683 (bfd_elf64_create_pointer_linker_section): Likewise.
1684 (bfd_elf64_finish_pointer_linker_section): Likewise.
1685 (_bfd_elf_make_linker_section_rela): Likewise.
1686 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1687 (elf_finish_pointer_linker_section): Likewise.
1688 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1689 (_bfd_elf_create_linker_section): Move this function..
1690 (_bfd_elf_find_pointer_linker_section): ..and this..
1691 * elflink.h (elf_create_pointer_linker_section): ..and this..
1692 (elf_finish_pointer_linker_section): ..and this..
1693 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1694 calls.
1695 (elf_create_linker_section): Convert to C90, tidy.
1696 (elf_find_pointer_linker_section): Likewise.
1697 (elf_create_pointer_linker_section): Likewise.
1698 (elf_finish_pointer_linker_section): Likewise.
1699 * elf32-i370.c: Delete #if 0 code.
1700
772119ce
AM
17012003-07-02 Alan Modra <amodra@bigpond.net.au>
1702
1703 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1704 _restf* to be satisfied by shared libs, and always force them local.
1705 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1706 Correct test for "bl".
1707 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1708 primary opcode 31.
1709
bd1ea41b
MS
17102003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1711
1712 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1713 (s390_tls_reloc): New function.
1714 (elf_howto_table): Add long displacement relocations R_390_20,
1715 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1716 (elf_s390_reloc_type_lookup): Likewise.
1717 (elf_s390_check_relocs): Likewise.
1718 (elf_s390_gc_sweep_hook): Likewise.
1719 (elf_s390_relocate_section): Likewise.
1720 * elf64-s390.c: Same changes as for elf32-s390.c.
1721 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1722 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1723 BFD_RELOC_390_TLS_GOTIE20.
1724 * bfd-in2.h: Regenerate.
1725 * libbfd.h: Likewise.
1726
113202d6
AM
17272003-06-30 Alan Modra <amodra@bigpond.net.au>
1728
1729 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1730 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1731
c58b9523
AM
17322003-06-29 Alan Modra <amodra@bigpond.net.au>
1733
1734 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1735 Replace PTR with void *. Formatting.
1736 * archive64.c: Likewise.
1737 * archures.c: Likewise.
1738 * bfd-in.h: Likewise.
1739 * bfd.c: Likewise.
1740 * bfdio.c: Likewise.
1741 * bfdwin.c: Likewise.
1742 * cache.c: Likewise.
1743 * corefile.c: Likewise.
1744 * format.c: Likewise.
1745 * init.c: Likewise.
1746 * libbfd-in.h: Likewise.
1747 * libbfd.c: Likewise.
1748 * linker.c: Likewise.
1749 * opncls.c: Likewise.
1750 * reloc.c: Likewise.
1751 * section.c: Likewise.
1752 * simple.c: Likewise.
1753 * syms.c: Likewise.
1754 * targets.c: Likewise.
1755 * bfd-in2.h: Regenerate.
1756 * libbfd.h: Regenerate.
1757
1758 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1759 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1760 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1761 (bfd_getb64): Rewrite without parens.
1762 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1763 * cache.c (insert, snip): Remove INLINE.
1764 * linker.c (bfd_link_add_undef): Likewise.
1765
27482721
AJ
17662003-06-29 Andreas Jaeger <aj@suse.de>
1767
1768 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1769 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1770 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1771 trim plt entries. Move undefweak non-default visibility test ...
1772 (allocate_dynrelocs): ... from here.
1773 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1774 Change all callers.
1775 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1776 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1777 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1778 dynreloc and .got relocs.
1779 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1780 for .got relocs.
27482721 1781
2b86c02e
TS
17822003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1783
1784 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1785
e7c81c25
NC
17862003-06-27 Nick Clifton <nickc@redhat.com>
1787
1788 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1789 bfd_add_gnu_debuglink_section and only create the section, do not
1790 fill in its contents.
1791 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1792 contents of a .gnu-debuglink section.
1793 * bfd-in2.h: Regenerate.
1794
72b4917c
TS
17952003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1796
1797 * elfxx-mips.c: Revert .got alignment to 2**4.
1798
91709090
TS
17992003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1800
1801 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1802
7a79a000
TS
18032003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1804
1805 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1806 relocation header setup.
1807
e47cd125
AM
18082003-06-25 Alan Modra <amodra@bigpond.net.au>
1809
1810 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1811 (ppc_elf_reloc_type_lookup): Modify comment.
1812 (ppc_elf_info_to_howto): Ditto.
1813 (ppc_elf_relocate_section): Ditto.
1814 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1815
1049f94e
AM
18162003-06-25 Alan Modra <amodra@bigpond.net.au>
1817
1818 * aout-ns32k.c: Correct spelling of "relocatable".
1819 * aoutx.h: Likewise.
1820 * bfd-in.h: Likewise.
1821 * bfd.c: Likewise.
1822 * bout.c: Likewise.
1823 * coff-a29k.c: Likewise.
1824 * coff-alpha.c: Likewise.
1825 * coff-arm.c: Likewise.
1826 * coff-i386.c: Likewise.
1827 * coff-i860.c: Likewise.
1828 * coff-i960.c: Likewise.
1829 * coff-m68k.c: Likewise.
1830 * coff-m88k.c: Likewise.
1831 * coff-mcore.c: Likewise.
1832 * coff-mips.c: Likewise.
1833 * coff-or32.c: Likewise.
1834 * coff-ppc.c: Likewise.
1835 * coff-rs6000.c: Likewise.
1836 * coff-sh.c: Likewise.
1837 * coff-tic80.c: Likewise.
1838 * coff64-rs6000.c: Likewise.
1839 * cofflink.c: Likewise.
1840 * cpu-ns32k.c: Likewise.
1841 * ecoff.c: Likewise.
1842 * ecofflink.c: Likewise.
1843 * elf-bfd.h: Likewise.
1844 * elf-eh-frame.c: Likewise.
1845 * elf-hppa.h: Likewise.
1846 * elf-m10200.c: Likewise.
1847 * elf-m10300.c: Likewise.
1848 * elf.c: Likewise.
1849 * elf32-arm.h: Likewise.
1850 * elf32-avr.c: Likewise.
1851 * elf32-cris.c: Likewise.
1852 * elf32-d10v.c: Likewise.
1853 * elf32-dlx.c: Likewise.
1854 * elf32-fr30.c: Likewise.
1855 * elf32-frv.c: Likewise.
1856 * elf32-h8300.c: Likewise.
1857 * elf32-hppa.c: Likewise.
1858 * elf32-i370.c: Likewise.
1859 * elf32-i386.c: Likewise.
1860 * elf32-i860.c: Likewise.
1861 * elf32-i960.c: Likewise.
1862 * elf32-ip2k.c: Likewise.
1863 * elf32-iq2000.c: Likewise.
1864 * elf32-m32r.c: Likewise.
1865 * elf32-m68hc11.c: Likewise.
1866 * elf32-m68hc1x.c: Likewise.
1867 * elf32-m68k.c: Likewise.
1868 * elf32-mcore.c: Likewise.
1869 * elf32-mips.c: Likewise.
1870 * elf32-msp430.c: Likewise.
1871 * elf32-openrisc.c: Likewise.
1872 * elf32-ppc.c: Likewise.
1873 * elf32-s390.c: Likewise.
1874 * elf32-sh.c: Likewise.
1875 * elf32-sh64.c: Likewise.
1876 * elf32-sparc.c: Likewise.
1877 * elf32-v850.c: Likewise.
1878 * elf32-vax.c: Likewise.
1879 * elf32-xstormy16.c: Likewise.
1880 * elf32-xtensa.c: Likewise.
1881 * elf64-alpha.c: Likewise.
1882 * elf64-hppa.c: Likewise.
1883 * elf64-mips.c: Likewise.
1884 * elf64-mmix.c: Likewise.
1885 * elf64-ppc.c: Likewise.
1886 * elf64-s390.c: Likewise.
1887 * elf64-sh64.c: Likewise.
1888 * elf64-sparc.c: Likewise.
1889 * elf64-x86-64.c: Likewise.
1890 * elfcode.h: Likewise.
1891 * elflink.h: Likewise.
1892 * elfn32-mips.c: Likewise.
1893 * elfxx-ia64.c: Likewise.
1894 * elfxx-mips.c: Likewise.
1895 * i386linux.c: Likewise.
1896 * ieee.c: Likewise.
1897 * libcoff-in.h: Likewise.
1898 * linker.c: Likewise.
1899 * m68klinux.c: Likewise.
1900 * pdp11.c: Likewise.
1901 * pe-mips.c: Likewise.
1902 * peXXigen.c: Likewise.
1903 * reloc.c: Likewise.
1904 * reloc16.c: Likewise.
1905 * sparclinux.c: Likewise.
1906 * sunos.c: Likewise.
1907 * syms.c: Likewise.
1908 * versados.c: Likewise.
1909 * vms.c: Likewise.
1910 * xcofflink.c: Likewise.
1911 * bfd-in2.h: Regenerate.
1912 * libcoff.h: Regenerate.
1913 * libbfd.h: Regenerate.
1914
55fd94b0
AM
19152003-06-24 Alan Modra <amodra@bigpond.net.au>
1916
d85f2c7d
AM
1917 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1918 local sym errors.
1919
55fd94b0
AM
1920 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1921 prototypes and casts. Replace PTR with void *. Formatting.
1922 * elf32-ppc.c: Likewise. Break long strings too.
1923 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1924 (ppc_elf_unhandled_reloc): Internationalize error message.
1925 * elf32-ppc.h: Remove PARAMS.
1926
88810f8c
MM
19272003-06-23 Mark Mitchell <mark@codesourcery.com>
1928
1929 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1930 APUinfo slots.
1931 (ppc_elf_final_write_processing): Likewise.
1932
6e35c4da
L
19332003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1934
1935 * elflink.h (elf_link_input_bfd): Check raw size when using
1936 kept_section to preserve debug information discarded by
1937 linkonce.
1938
8f3bab57
AM
19392003-06-20 Alan Modra <amodra@bigpond.net.au>
1940
1941 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1942 (ppc64_elf_setup_section_lists): Set it.
1943 (ppc64_elf_relocate_section): Check sym section id against top_id.
1944 (ppc_build_one_stub): Comment on top_id.
1945
efbc813e
NC
19462003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1947
1948 * config.bfd: Add tic4x-*-rtems*.
1949
4ce794b7
AM
19502003-06-20 Alan Modra <amodra@bigpond.net.au>
1951
1952 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1953 prototypes and casts. Replace PTR with void *. Format copyright.
1954 Mention ABI links.
1955 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1956 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1957 (ppc_type_of_stub): Make r_type an enum.
1958 (ppc64_elf_size_stubs): Likewise.
1959 * elf64-ppc.h: Remove PARAMS macro.
1960
d2a300cf
AM
19612003-06-19 Alan Modra <amodra@bigpond.net.au>
1962
3254fd24
AM
1963 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1964 elf hash tab fields.
1965
d2a300cf
AM
1966 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1967 (ppc64_elf_info_to_howto): Likewise.
1968 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1969 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1970
83615de0
AM
19712003-06-19 Alan Modra <amodra@bigpond.net.au>
1972
1973 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1974 reloc overflow on discarded eh_frame entries.
1975
9b5ecbd0
AM
19762003-06-19 Alan Modra <amodra@bigpond.net.au>
1977
1978 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1979 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1980 Return error condition.
1981 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1982 that have has_gp_reloc set.
1983 (struct ppc_link_hash_table): Add stub_count.
1984 (ppc_build_one_stub): Increment it.
1985 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1986 individual fields.
1987 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1988
64c456e1
AM
19892003-06-18 Alan Modra <amodra@bigpond.net.au>
1990
1991 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1992 size calculation from addend. Round size up.
1993
3dab95d3
HPN
19942003-06-18 Hans-Peter Nilsson <hp@axis.com>
1995
1996 * elf32-cris.c (cris_elf_relocate_section) <case
1997 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1998 symbol from a normal object or an undefined weak symbol.
1999
0b13192e
AM
20002003-06-18 Alan Modra <amodra@bigpond.net.au>
2001
2002 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2003 R_PPC64_TOC relocs.
2004
f97b9cb8
L
20052003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2006
2007 * section.c (struct sec): Put back kept_section.
2008 (STD_SECTION): Put back kept_section initialization.
2009 * bfd-in2.h: Regenerate.
2010
2011 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2012 sections for relocateable output. Use kept_section to preserve
2013 debug information discarded by linkonce.
2014
9f1c3a0a
L
20152003-06-17 Roland McGrath <roland@redhat.com>
2016
2017 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2018 segment-relative relocation between different segments.
2019
734b6cf9
AM
20202003-06-17 Alan Modra <amodra@bigpond.net.au>
2021
1cf1f670
AM
2022 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2023 optimizations earlier.
2024
734b6cf9
AM
2025 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2026 Restore previous input_list type.
2027 (ppc64_elf_link_hash_table_create): Undo last change.
2028 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2029 per output section, but don't bother with bfd_abs_section marker.
2030 (ppc64_elf_next_input_section): Adjust for multiple input section
2031 lists.
2032 (group_sections): Likewise.
2033
23fbd6fa
JJ
20342003-06-17 Jakub Jelinek <jakub@redhat.com>
2035
2036 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2037 *r_offset == r_addend for RELATIVE relocs against .got.
2038
dad27d18
AM
20392003-06-17 Alan Modra <amodra@bigpond.net.au>
2040
2041 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2042
b613960a
NC
20432003-06-17 Nick Clifton <nickc@redhat.com>
2044
2045 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
2046 in the vtable_entries_used array to allow for the accessing
2047 the largest element.
b613960a 2048
000732f7
AM
20492003-06-17 Alan Modra <amodra@bigpond.net.au>
2050
3d6f9012
AM
2051 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2052 input_list.
2053 (ppc64_elf_link_hash_table_create): Init input_list here.
2054 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2055 per output section. Set toc_off for abs and other standard sections.
2056 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2057 (ppc64_elf_next_input_section): Adjust for single input section list.
2058 Don't set toc_curr from input bfds that haven't set elf_gp.
2059 (group_sections): Adjust for single input section list.
2060
000732f7
AM
2061 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2062
81407a69
AM
20632003-06-16 Alan Modra <amodra@bigpond.net.au>
2064
2065 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2066 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2067 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2068 got section for RELATIVE relocs. Fix wrong comment. Change condition
2069 under which dynamic relocs update the section contents.
2070
a06a29f2
NC
20712003-06-13 Robert Millan <zeratul2@wanadoo.es>
2072
2073 * config.bfd: Add i386-netbsd-gnu target.
2074
7d1ebfb2
NC
20752003-06-12 Nick Clifton <nickc@redhat.com>
2076
2077 * opncls.c (calc_crc32): Rename to
2078 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 2079 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 2080 hard-coded ".gnu_debuglink" in the code.
81407a69 2081 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 2082 xmalloc with a call to malloc.
81407a69 2083 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 2084 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 2085 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
2086 section to a bfd.
2087 * bfd-in2.h: Regenerate.
2088
20892003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2090
7d1ebfb2
NC
2091 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2092 New target (was i[3-7]86-*-openbsd* before).
2093 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2094 (vax-*-openbsd*): New target.
2095
d80dcc6a
TS
20962003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2097
2098 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2099 for n32, too.
2100 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2101 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2102 (mips_elf_create_got_section): Likewise.
2103 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2104
a7ebbfdf
TS
21052003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2106
2107 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2108 (elf_mips_howto_table_rel): Use it.
2109 (gprel32_with_gp): Move prototype.
2110 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2111 Use mips_elf_generic_reloc.
2112 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2113 Code cleanup.
2114 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2115 zero addend.
2116 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2117 as in the other *_gprel*_reloc functions.
2118 (gprel32_with_gp): Handle partial_inplace properly.
2119 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2120 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2121 Do addend handling directly instead of calling
2122 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2123 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2124 of zero addend. Handle partial_inplace properly.
2125 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2126 addend.
2127 (mips_elf64_gprel16_reloc): Likewise.
2128 (mips_elf64_literal_reloc): Likewise.
2129 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2130 logic as in the other *_gprel*_reloc functions. Handle
2131 partial_inplace properly.
2132 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2133 addend. Handle partial_inplace properly.
2134 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2135 of calling _bfd_mips_elf_gprel16_with_gp.
2136 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2137 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2138 of zero addend.
2139 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2140 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2141 of calling _bfd_mips_elf_gprel16_with_gp.
2142 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2143 partial_inplace properly. Fix wrong addend handling. Fix overflow
2144 check.
2145 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2146 exported.
2147 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2148 (_bfd_mips_elf_relocate_section): Likewise.
2149 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2150 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2151 (_bfd_mips_elf_sign_extend): New prototype.
2152
49ba19a4 21532003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2154
49ba19a4
NC
2155 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2156 New target (was sparc-*-openbsd* before).
2157 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 2158
de6e5e1a
NC
2159 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2160 * configure: Regenerate.
2161
3b443373
L
21622003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2163
2164 * po/Make-in (DESTDIR): New.
2165 (install-data-yes): Support $(DESTDIR).
2166 (uninstall): Likewise.
2167
795bb480
AM
21682003-06-11 Alan Modra <amodra@bigpond.net.au>
2169
2170 * Makefile.am (config.status): Depend on version.h.
2171 Run "make dep-am".
2172 * Makefile.in: Regenerate.
2173 * po/SRC-POTFILES.in: Regenerate.
2174
adadcc0c
AM
21752003-06-10 Alan Modra <amodra@bigpond.net.au>
2176 Gary Hade <garyhade@us.ibm.com>
2177
2178 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2179
f4984206
RS
21802003-06-10 Richard Sandiford <rsandifo@redhat.com>
2181
2182 * archures.c (bfd_mach_h8300sxn): New architecture.
2183 * bfd-in2.h: Regenerate.
2184 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2185 (h8300sxn_info_struct): New.
2186 (h8300sx_info_struct): Link to it.
2187 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2188 (elf32_h8_final_write_processing): Likewise.
2189
ad8e1ba5
AM
21902003-06-08 Alan Modra <amodra@bigpond.net.au>
2191
2192 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2193 elfxx-target.h so that we can use elf_backend_got_header_size.
2194 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2195 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2196 associated macros.
2197 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2198 dst_mask.
2199 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2200 ppc_stub_plt_branch_r2off.
2201 (struct ppc_stub_hash_entry): Reorganize.
2202 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2203 toc_curr, toc_off and emit_stub_syms.
2204 (ppc64_elf_link_hash_table_create): Init them.
2205 (ppc_stub_name): Correct string size.
2206 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2207 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2208 used.
2209 (ppc_type_of_stub): Tweak root.type test.
2210 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2211 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2212 ppc_stub_plt_branch_r2off.
2213 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2214 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2215 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2216 Initialize elf_gp and toc_curr.
2217 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2218 (ppc64_elf_next_input_section): Set toc_off.
2219 (group_sections): Ensure groups have the same TOC.
2220 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2221 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2222 Build new glink stub.
2223 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2224 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2225 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2226 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2227 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2228 (STD_SECTION): Update.
2229 * ecoff.c (bfd_debug_section): Update comment.
2230 * bfd-in2.h: Regenerate.
2231
90fff0d4
DJ
22322003-06-05 Daniel Jacobowitz <drow@mvista.com>
2233
2234 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2235 NULL function pointers.
2236
c82b20e4
DJ
22372003-06-05 Daniel Jacobowitz <drow@mvista.com>
2238
2239 * simple.c (bfd_simple_get_relocated_section_contents): Call
2240 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2241
53d4437a
SS
22422003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2243
5a5b9651
SS
2244 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2245 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2246 swaptables.
2247 * coff-tic4x.c: Ditto
53d4437a
SS
2248 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2249 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
2250 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2251 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2252 swap tables.
53d4437a
SS
2253 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2254 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2255 * coff-apollo.c: Ditto
2256 * coff-arm.c: Ditto
2257 * coff-h8300.c: Ditto
2258 * coff-h8500.c: Ditto
2259 * coff-i960.c: Ditto
2260 * coff-m68k.c: Ditto
2261 * coff-m88k.c: Ditto
2262 * coff-mcore.c: Ditto
2263 * coff-sh.c: Ditto
2264 * coff-sparc.c: Ditto
2265 * coff-tic80.c: Ditto
2266 * coff-we32k.c: Ditto
2267 * coff-z8k.c: Ditto
2268 * coff-w65.c: Ditto
2269
736694c8
SS
22702003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2271
2272 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2273 initialization bug
2274
9ee5e499
JJ
22752003-06-03 Jakub Jelinek <jakub@redhat.com>
2276
2277 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2278 (bfd_section_from_phdr): Likewise.
2279 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2280 (get_program_header_size): Count with PT_GNU_STACK.
2281 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2282 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2283
6f6f27f8
L
22842003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2285
2286 * elflink.h (elf_link_input_bfd): Call linker error_handler
2287 for discarded definitions.
2288
a3b6428f
NC
22892003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2290
2291 * syms.c (decode_section_type): Return 'n' if section flags are
2292 SEC_HAS_CONTENTS && SEC_READONLY.
2293
e30ddb24
NC
22942003-06-03 Nick Clifton <nickc@redhat.com>
2295
2296 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2297 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2298 (v850_elf_reloc_map): Likewise.
2299 (v850_elf_check_relocs): Likewise.
2300 (v850_elf_perform_relocation): Likewise.
2301 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2302 to make R_V850_REl32 pc-relative.
adadcc0c 2303
2558b9a9
KK
23042003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2305
2306 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2307 and DT_DEBUG dynamic tag even for position independent executables.
2308 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2309
f15398ef
DJ
23102003-06-02 Daniel Jacobowitz <drow@mvista.com>
2311
2312 * config.bfd: Move obsolete entries out of the range of the
2313 targmatch sed script.
2314
cad28985
DJ
23152003-06-02 Daniel Jacobowitz <drow@mvista.com>
2316
2317 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2318
f2c822e3
JJ
23192003-05-31 Jakub Jelinek <jakub@redhat.com>
2320
2321 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2322 plt entries, not just 8191.
2323
c9c27aad
DJ
23242003-05-30 Daniel Jacobowitz <drow@mvista.com>
2325
2326 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2327 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2328
36af4a4e
JJ
23292003-05-30 Ulrich Drepper <drepper@redhat.com>
2330 Jakub Jelinek <jakub@redhat.com>
2331
2332 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2333 instead of info->shared where appropriate.
2334 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2335 * elflink.c (_bfd_elf_create_got_section): Likewise.
2336 (_bfd_elf_link_create_dynamic_sections): Likewise.
2337 (_bfd_elf_link_assign_sym_version): Likewise.
2338 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2339 and DT_DEBUG dynamic tag even for position independent executables.
2340 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2341 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2342 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2343 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2344 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2345 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2346 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2347 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2348 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2349
f8843e87
AM
23502003-05-30 Kris Warkentin <kewarken@qnx.com>
2351
2352 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2353 signalled thread.
2354 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2355
29e1a6e4
NC
23562003-05-29 Nick Clifton <nickc@redhat.com>
2357
2358 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2359 Tidy up formatting.
2360 * Makefile.am: Add dependency on safe-ctype.h.
2361 * Makefile.in: Regenerate.
2362
4b555070
TS
23632003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2364
2365 * elfxx-mips.c: Don't force symbols local unconditionally.
2366
0236e03e
L
23672003-05-28 Alan Modra <amodra@bigpond.net.au>
2368
2369 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2370 undefined_symbol call.
2371
9e4aeb93
RS
23722003-05-27 Richard Sandiford <rsandifo@redhat.com>
2373
2374 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2375 (mips_elf_link_hash_table): Likewise.
2376
d0c728db
TS
23772003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2378
2379 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2380 R_MIPS_GNU_REL16_S2 support.
2381 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2382 (mips_elf64_rtype_to_howto): Use it.
2383 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2384 R_MIPS_GNU_REL16_S2 support.
2385 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2386 (mips_elf_n32_rtype_to_howto): Use it.
2387
759ebd76
DA
23882003-05-21 Stuart F. Downing <sdowning@fame.com>
2389
2390 * som.h: Define PA_2_0 before including a.out.h
2391
143d77c5
EC
23922003-05-07 Eric Christopher <echristo@redhat.com>
2393 Alexandre Oliva <aoliva@redhat.com>
2394
2395 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2396 pic tests, change to warning.
2397 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2398
cea3d58d
NC
23992003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2400
2401 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2402 well as shle-...-netbsdelf. Remove duplicate entry.
2403
385a4c14
NC
24042003-05-21 Nick Clifton <nickc@redhat.com>
2405
60e42408
NC
2406 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2407 for X_STORMY16_REL_12 reloc.
2408
385a4c14 2409 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2410 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2411 (bfd_elf_get_runpath_list): Likewise.
2412
129b8c20
RM
24132003-05-19 Roland McGrath <roland@redhat.com>
2414
2415 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2416 * bfd-in.h: Declare it.
2417 * bfd-in2.h: Regenerated.
2418 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2419 * elf-bfd.h (struct elf_backend_data): New function pointer member
2420 elf_backend_bfd_from_remote_memory.
2421 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2422 Declare them.
2423 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2424 (elfNN_bed): Add that to the initializer.
2425
24262003-05-15 Roland McGrath <roland@redhat.com>
2427
2428 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2429
22d5e339
L
24302003-05-20 Jakub Jelinek <jakub@redhat.com>
2431
2432 * elflink.h (elf_link_output_extsym): Only issue error about !=
2433 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2434
24352003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2436
2437 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2438 when removing the old definition for symbols with non-default
2439 visibility.
2440
b645cb17
JE
24412003-05-18 Jason Eckhardt <jle@rice.edu>
2442
2443 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2444
d2ff124f
AS
24452003-05-17 Andreas Schwab <schwab@suse.de>
2446
2447 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2448 elf_section_data during processing of pc-relative and absolute
2449 relocations.
2450 (elf_m68k_relocate_section): Use the cached reloc section instead
2451 of computing it again. Fix handling of visibility. Don't modify
2452 addend when copying over a relocation into the output.
2453
9c7a29a3
AM
24542003-05-17 Alan Modra <amodra@bigpond.net.au>
2455
2456 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2457 to trim plt entries. Move undefweak non-default visibility test..
2458 (allocate_dynrelocs): ..from here.
2459 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2460 dynamic_sections_created here. Update comment. Move undefweak
2461 non-default visibility test..
2462 (allocate_dynrelocs): ..from here. Fix comment.
2463 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2464 to trim plt entries. Move undefweak non-default visibility test..
2465 (allocate_dynrelocs): ..from here. Fix comment.
2466 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2467 STV_DEFAULT rather than comparing with zero.
2468 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2469 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2470
9bcf4de0
TS
24712003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2472
2473 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2474 pointers.
2475 (_bfd_set_gp_value): Likewise.
2476
5d1db417
MS
24772003-05-16 Michael Snyder <msnyder@redhat.com>
2478 From Bernd Schmidt <bernds@redhat.com>
2479 * archures.c (bfd_mach_h8300sx): New.
2480 * bfd-in2.h: Regenerate.
2481 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2482 (h8300sx_info_struct): New.
2483 (h8300s_info_struct): Link to it.
2484 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2485 (elf32_h8_final_write_processing): Likewise.
2486 (elf32_h8_relax_section): Likewise.
2487
80c7c40a
NC
24882003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2489
2490 * config.bfd: Accept i[3-7]86 variants.
2491 * configure.host: Likewise.
2492 * configure.in: Likewise.
2493 * configure: Regenerate.
2494
c1be741f
L
24952003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2496
2497 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2498 symbol.
2499
a15d9d3a
L
25002003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2501
2502 * elflink.h (elf_link_check_versioned_symbol): Also allow
2503 the base version.
2504
09695f56
AM
25052003-05-15 Alan Modra <amodra@bigpond.net.au>
2506 H.J. Lu <hongjiu.lu@intel.com>
2507
2508 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2509 (elf_i386_relocate_section): Likewise.
2510 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2511 (ppc_elf_relocate_section): Likewise.
2512 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2513 (ppc64_elf_relocate_section): Likewise.
2514
40f62fa0
TS
25152003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2516
2517 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2518
47247ced
SC
25192003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2520
2521 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2522 processor capability, allow merge of HC12 and HCS12 in some cases.
2523 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2524 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2525 (bfd_m68hc12_arch): Link it.
2526 (scan_mach): New function.
2527
32dfa85d
AH
25282003-05-13 Andrew Haley <aph@redhat.com>
2529
2530 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2531
586119b3
AM
25322003-05-13 Alan Modra <amodra@bigpond.net.au>
2533 H.J. Lu <hongjiu.lu@intel.com>
2534
2535 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2536 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2537 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2538 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2539 (ppc_elf_relocate_section): Likewise.
2540 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2541 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2542 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2543 relocs need no other types.
2544 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2545 dynreloc check.
2546 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2547 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2548 .got relocs.
2549
04e534c3
KK
25502003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2551
2552 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2553 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2554 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2555 visibility, a) don't allocate plt entries, b) don't allocate
2556 .got relocs, c) discard dyn rel space
adadcc0c
AM
2557 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2558 don't generate dynamic relocs.
04e534c3
KK
2559 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2560 for weakdefs when symbol already adjusted.
2561
0afb2dc0
NC
25622003-05-12 Nick Clifton <nickc@redhat.com>
2563
2564 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2565 overflow detection for R_XSTORMY16_16 reloc.
2566
9d29900b
NC
25672003-05-12 Paul Clarke <paulc@senet.com.au>
2568
2569 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2570
a48c6a54
JE
25712003-05-11 Jason Eckhardt <jle@rice.edu>
2572
2573 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2574 adjust upper bits.
2575 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2576 proper place.
2577 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2578 proper place.
2579
44f745a6
AS
25802003-05-11 Andreas Schwab <schwab@suse.de>
2581
2582 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2583 complicated tests for unresolvable relocs with a simple direct
2584 scheme using "unresolved_reloc" var. Report some detail on
2585 bfd_reloc_outofrange and similar errors.
2586
4ec72bde
MS
25872003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2588
2589 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2590 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2591 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2592 * elf64-s390.c: Likewise.
2593
64285810
MS
25942003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2595
2596 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2597 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2598 ELF_LINK_NON_GOT_REF from weakdef.
2599 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2600 already been adjusted before treating it specially.
2601 * el64-s390.c: Likwise.
2602
82058a73
MS
26032003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2604
2605 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2606 non-default visibility, a) don't make them dynamic, b) discard
2607 space for dynamic relocs.
2608 (elf_s390_relocate_section): Initialize the GOT entries and skip
2609 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2610 symbols with non-default visibility.
2611 * elf64-s390.c: Likewise.
2612
60d8b524
AM
26132003-05-09 Alan Modra <amodra@bigpond.net.au>
2614
2615 * cpu-arm.c (arm_check_note): Warning fix.
2616 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2617 to keep relocs if edited.
2618 (iq2000_elf_print_private_bfd_data): Return TRUE.
2619 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2620 ELF64_R_SYM.
2621 (elfNN_ia64_relax_ldxmov): Warning fix.
2622 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2623 * xtensa-modules.c (get_num_opcodes): Warning fix.
2624
e57b5356
AM
26252003-05-09 Andrey Petrov <petrov@netbsd.org>
2626
2627 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2628
45d6a902
AM
26292003-05-09 Alan Modra <amodra@bigpond.net.au>
2630
2631 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2632 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2633 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2634 (bfd_elf_record_link_assignment): Move from elflink.h.
2635 (_bfd_elf_merge_symbol): Likewise.
2636 (_bfd_elf_add_default_symbol): Likewise.
2637 (_bfd_elf_export_symbol): Likewise.
2638 (_bfd_elf_link_find_version_dependencies): Likewise.
2639 (_bfd_elf_link_assign_sym_version): Likewise.
2640 (_bfd_elf_link_read_relocs): Likewise.
2641 (_bfd_elf_link_size_reloc_section): Likewise.
2642 (_bfd_elf_fix_symbol_flags): Likewise.
2643 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2644 (_bfd_elf_link_sec_merge_syms): Likewise.
2645 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2646 and bed->s->sizeof_rela.
2647 (_bfd_elf_link_output_relocs): Likewise.
2648 * elf-bfd.h (struct elf_size_info): Rename file_align to
2649 log_file_align.
2650 (struct elf_info_failed): Move from elflink.h.
2651 (struct elf_assign_sym_version_info): Likewise.
2652 (struct elf_find_verdep_info): Likewise.
2653 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2654 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2655 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2656 _bfd_elf_link_assign_sym_version,
2657 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2658 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2659 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2660 _bfd_elf_link_sec_merge_syms): Declare.
2661 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2662 (_bfd_elf32_link_read_relocs): Likewise.
2663 (bfd_elf64_link_create_dynamic_sections): Likewise.
2664 (_bfd_elf64_link_read_relocs): Likewise.
2665 * elflink.h: Move lots o' stuff elsewhere.
2666 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2667 (bfd_elf64_record_link_assignment): Likewise.
2668 (bfd_elf_record_link_assignment): Declare.
2669 * bfd-in2.h: Regenerate.
2670 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2671 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2672 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2673 (assign_file_positions_for_segments): Likewise.
2674 (assign_file_positions_except_relocs): Likewise.
2675 (swap_out_syms, elfcore_write_note): Likewise.
2676 * elf-m10200.c: Adjust for changed function names.
2677 * elf-m10300.c: Likewise.
2678 * elf32-arm.h: Likewise.
2679 * elf32-h8300.c: Likewise.
2680 * elf32-hppa.c: Likewise.
2681 * elf32-ip2k.c: Likewise.
2682 * elf32-m32r.c: Likewise.
2683 * elf32-m68hc11.c: Likewise.
2684 * elf32-m68hc1x.c: Likewise.
2685 * elf32-m68k.c: Likewise.
2686 * elf32-mips.c: Likewise.
2687 * elf32-ppc.c: Likewise.
2688 * elf32-sh.c: Likewise.
2689 * elf32-v850.c: Likewise.
2690 * elf32-xtensa.c: Likewise.
2691 * elf64-alpha.c: Likewise.
2692 * elf64-hppa.c: Likewise.
2693 * elf64-mmix.c: Likewise.
2694 * elf64-ppc.c: Likewise.
2695 * elf64-sh64.c: Likewise.
2696 * elfxx-ia64.c: Likewise.
2697 * elfxx-mips.c: Likewise.
2698 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2699 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2700 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2701 * elf64-mips.c (mips_elf64_size_info): Likewise.
2702 * elf64-s390.c (s390_elf64_size_info): Likewise.
2703 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2704
bf1e742e
L
27052003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2706
2707 * elflink.h (elf_add_default_symbol): After skipping the
2708 unversioned symbol, go to non-default one.
2709
6a32c710
L
27102003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2711
2712 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2713 want_plt field.
2714 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2715 for symbols with non-default visibility.
2716
71552942
L
27172003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2718
2719 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2720 case that a DSO references a hidden symbol which may be
2721 satisfied by a versioned symbol in another DSO.
2722 (elf_link_output_extsym): Check versioned definition for hidden
2723 symbol referenced by a DSO.
2724
208c2cd6
NC
27252003-05-07 Nick Clifton <nickc@redhat.com>
2726
2727 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2728 R_XSTORMY16_16 reloc to ignore overflows.
2729
aa701218
AO
27302003-05-06 Alexandre Oliva <aoliva@redhat.com>
2731
2732 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2733 error message for mixing different-endian files. Check for ABI
2734 compatibility of input files with the selected emulation.
2735
4e795f50
AM
27362003-05-05 Alan Modra <amodra@bigpond.net.au>
2737
2738 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2739 non-default visibility, a) don't make them dynamic, b) discard
2740 space for dynamic relocs.
2741 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2742
2743 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2744 non-default visibility, a) don't allocate plt entries, b) don't
2745 allocate .got relocs, c) discard dyn rel space,
2746 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2747 don't generate dynamic relocs.
2748 * elf64-ppc.c (allocate_dynrelocs): As above.
2749 (ppc64_elf_relocate_section): As above.
2750
4bc6e03a
AJ
27512003-05-05 Andreas Jaeger <aj@suse.de>
2752
2753 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2754 relocation entries for weak undefined symbols with non-default
2755 visibility.
2756 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2757 skip R_386_32/R_386_PC32 for weak undefined symbols with
2758 non-default visibility.
2759
ef5aade5
L
27602003-05-04 H.J. Lu <hjl@gnu.org>
2761
2762 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2763 relocation entries for weak undefined symbols with non-default
2764 visibility.
2765 (elf_i386_relocate_section): Initialize the GOT entries and
2766 skip R_386_32/R_386_PC32 for weak undefined symbols with
2767 non-default visibility.
129b8c20 2768
ef5aade5
L
2769 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2770 descriptors for weak undefined symbols with non-default
2771 visibility.
2772 (allocate_dynrel_entries): Don't allocate relocation entries
2773 for symbols resolved to 0.
2774 (set_got_entry): Don't install dynamic relocation for weak
2775 undefined symbols with non-default visibility.
2776 (set_pltoff_entry): Likewise.
2777
2778 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2779 with non-default visibility.
2780 (elf_link_output_extsym): Don't make weak undefined symbols
2781 with non-default visibility dynamic.
2782
c424e0e9
L
27832003-05-04 H.J. Lu <hjl@gnu.org>
2784
2785 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2786
d31e3dfe
L
27872003-05-04 H.J. Lu <hjl@gnu.org>
2788
2789 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2790 symbol dynamic. Check indirection when removing the old
2791 definition for symbols with non-default visibility.
2792 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2793
4d2e1ff0
NC
27942003-05-02 Nick Clifton <nickc@redhat.com>
2795
2796 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2797 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2798 unsigned overflow.
2799
d40d037c
AJ
28002003-05-02 Andreas Jaeger <aj@suse.de>
2801
2802 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2803 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2804 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2805 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2806 ELF_LINK_NON_GOT_REF from weakdef.
2807
c5d1701e
NC
28082003-05-02 Charles Lepple <clepple@ghz.cc>
2809 Nick Clifton <nickc@redhat.com>
2810
2811 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2812 * aclocal.m4: Regenerate.
2813 * configure: Regenerate.
2814 * Makefile.in: Regenerate.
2815
81848ca0
AM
28162003-05-01 Alan Modra <amodra@bigpond.net.au>
2817
2818 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2819 weakdef sym has already been adjusted before treating it specially.
2820 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2821 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2822 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2823 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2824
c7996ad6
L
28252003-04-28 H.J. Lu <hjl@gnu.org>
2826
2827 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2828 the relax finalize pass.
2829
2830 * section.c (struct sec): Add need_finalize_relax and remove
2831 flag11.
2832 (STD_SECTION): Update struct sec initializer.
2833 * bfd-in2.h: Regenerated.
2834
f006af20
L
28352003-04-28 H.J. Lu <hjl@gnu.org>
2836
2837 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2838 to copy any information related to dynamic linking when we flip
2839 the indirection.
2840
1b1fe8fe
L
28412003-04-27 H.J. Lu <hjl@gnu.org>
2842
2843 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2844 (ELF_LINK_DYNAMIC_WEAK): New.
2845
2846 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2847 a symbol should be skipped. Ignore definitions in dynamic
2848 objects for symbols with non-default visibility.
2849 (elf_add_default_symbol): Adjusted.
2850 (elf_link_add_object_symbols): Check if a symbol should be
2851 skipped. Don't merge the visibility field with the one from
2852 a dynamic object.
2853 (elf_link_check_versioned_symbol): Use undef_bfd.
2854 (elf_link_output_extsym): Warn if a forced local symbol is
2855 referenced from dynamic objects. Make non-weak undefined symbol
2856 with non-default visibility a fatal error.
2857
052a450c
DJ
28582003-04-27 Daniel Jacobowitz <drow@mvista.com>
2859
2860 * configure.in: Bump version on HEAD to 2.14.90.
2861 * configure: Regenerated.
2862
d204f4c0
SC
28632003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2864
2865 PR savannah/3331:
2866 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2867 when we couldn't relax something.
2868
3c0a515d
L
28692003-04-25 Alan Modra <amodra@bigpond.net.au>
2870
2871 * elflink.h (elf_merge_symbol): When we find a regular definition
2872 for an indirect symbol, flip the indirection so that the old
2873 direct symbol now points to the new definition.
2874
d145330d
RM
28752003-04-24 Roland McGrath <roland@redhat.com>
2876
2877 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2878
fc0bffd6
AM
28792003-04-24 Alan Modra <amodra@bigpond.net.au>
2880
2881 * elf32-ppc.c: Formatting and comment fixes.
2882 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2883 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2884
28852003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2886
2887 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2888 * bfd-in2.h: Rebuilt.
2889 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2890 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2891 & H8300SNMAGIC.
2892 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2893 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2894 (h8300sn_info_struct, h8300hn_info_struct): New.
2895 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2896 (elf32_h8_final_write_processing): Likewise.
2897
267fb3c1
KK
28982003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2899
2900 * elf32-sh.c (tpoff): New.
2901 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2902 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2903 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2904 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2905 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2906 (dtpoff_base): Fix wrong indentation.
2907 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2908 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2909 R_SH_TLS_TPOFF32 relocations.
2910
ef230218
JR
29112003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2912
2913 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2914 * cpu-sh.c: Likewise.
2915 * elf32-sh.c: Likewise.
2916 * reloc.c (bfd_reloc_code_real): Likewise.
2917 * elf32-sh64-com.c: Change comment to refer to SuperH.
2918 * elf32-sh64.c: Likewise.
2919 * elf64-sh64.c: Likewise.
2920 * bfd-in2.h (enum bfd_architecture): Regenerate.
2921
8c29f035
AM
29222003-04-23 Alan Modra <amodra@bigpond.net.au>
2923
2924 From Julien LEMOINE <speedblue@debian.org>
2925 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2926 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2927
26597c86
NC
29282003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2929
2930 * archures.c: Replace references to Mitsubishi M32R with references
2931 to Renesas M32R.
2932 * relocs.c: Likewise.
2933 * bfd-in2.h: Regenerate.
2934
cc13e3ef
RH
29352003-04-21 Richard Henderson <rth@redhat.com>
2936
2937 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2938 executable when a symbol is defined both regular and dynamic.
2939
f5a6f915
SC
29402003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2941
2942 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2943 (elf32-m68hc1x.lo): Update dependencies
2944 * configure.in: Add elf32-m68hc1x.lo.
2945 * configure: Rebuild.
2946 * Makefile.in: Rebuild.
2947
3a65329d
SC
29482003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2949
2950 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2951 (m68hc11_elf_hash_table_create): New function.
2952 (elf32_m68hc11_link_hash_table_free): New function.
2953 (stub_hash_newfunc): New function.
2954 (m68hc11_add_stub): New function.
2955 (elf32_m68hc11_add_symbol_hook): New function.
2956 (elf32_m68hc11_setup_section_lists): New function.
2957 (elf32_m68hc11_next_input_section): New function.
2958 (elf32_m68hc11_size_stubs): New function.
2959 (elf32_m68hc11_build_stubs): New function.
2960 (m68hc11_get_relocation_value): New function.
2961 (elf32_m68hc11_relocate_section): Call the above to redirect
2962 some relocations to the trampoline code.
2963 (m68hc11_elf_export_one_stub): New function.
2964 (m68hc11_elf_set_symbol): New function.
2965 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2966 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2967 is not yet initialized.
2968
2969 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2970 (elf32_m68hc11_stub_hash_entry): New struct.
2971 (m68hc11_page_info): Add trampoline handler address.
2972 (m68hc11_elf_link_hash_table): Add stubs generation members.
2973 (elf32_m68hc11_add_symbol_hook): Declare.
2974 (elf32_m68hc11_setup_section_lists): Declare.
2975 (elf32_m68hc11_size_stubs): Declare.
2976 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2977
3a65329d
SC
2978 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2979 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2980 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2981 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2982 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2983 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2984 (bfd_elf32_bfd_link_hash_table_create): Define.
2985 (elf_backend_add_symbol_hook): Define.
2986 (m68hc11_elf_bfd_link_hash_table_create): New function.
2987 (m68hc11_elf_build_one_stub): New function.
2988 (m68hc11_elf_size_one_stub): New function.
2989 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2990 (bfd_elf32_bfd_link_hash_table_create): Define.
2991
2992 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2993 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2994 (m68hc12_phys_addr): Ditto.
2995 (m68hc12_phys_page): Ditto.
2996 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2997 (elf32_m68hc11_gc_mark_hook): Likewise.
2998 (elf32_m68hc11_gc_sweep_hook): Likewise.
2999 (elf32_m68hc11_check_relocs): Likewise.
3000 (elf32_m68hc11_relocate_section): Likewise.
3001 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3002 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3003 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3004 (m68hc12_elf_build_one_stub): New function.
3005 (m68hc12_elf_size_one_stub): New function.
3006 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3007 (elf_backend_add_symbol_hook): Define.
3008 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3009
4081944f
NC
30102003-04-18 Nick Clifton <nickc@redhat.com>
3011
3012 * format.c (bfd_check_format_matches): Only check associated
3013 vector if the matching_vector has been created.
3014
060dc71d
AO
30152003-04-15 Alexandre Oliva <aoliva@redhat.com>
3016
3017 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3018 2003-04-09's change.
3019
a3476bef
NC
30202003-04-15 Brian Ford <ford@vss.fsi.com>
3021
3022 * peicode.h (coff_swap_scnhdr_in): If a section holds
3023 uninitialized data and is from an object file or from an
3024 executable image that has not initialized the s_size field, or if
3025 the physical size is padded, use the virtual size (stored in
3026 s_paddr) instead.
3027
ca4fa240
NC
30282003-04-15 H.J. Lu <hjl@gnu.org>
3029
3030 * elflink.h (elf_link_add_object_symbols): Properly report
3031 filename for alignment reduction.
3032
c2dcd04e
NC
30332003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3034
3035 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3036 * reloc.c: Likewise.
3037 * coff-h8300.c: Likewise.
3038 * coff-h8500.c: Likewise.
3039 * coff-sh.c: Likewise.
3040 * cpu-h8300.c: Likewise.
3041 * cpu-sh.c: Likewise.
3042 * elf32-h8300.c: Likewise.
3043 * elf32-sh.c: Likewise.
3044 * elf32-sh64-com.c: Likewise.
3045 * elf32-sh64.c: Likewise.
3046 * elf64-sh64.c: Likewise.
3047 * bfd-in2.h: Regenerate.
3048
f7661995
NC
30492003-04-14 H.J. Lu <hjl@gnu.org>
3050
3051 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3052 alignment for common symbols. Warn reducing alignment for
3053 common symbols. Report old filename when symbol size changes.
3054
93a2b7ae
AO
30552003-04-12 Alexandre Oliva <aoliva@redhat.com>
3056
3057 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3058 occurrences of the same test changed in the previous patch.
3059 Optimize.
3060
0176c794
AO
30612003-04-11 Alexandre Oliva <aoliva@redhat.com>
3062
3063 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3064 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3065 GOT_DISP/addend only if the symbol got a global GOT entry.
3066
0fdc1bf1
AO
30672003-04-10 Alexandre Oliva <aoliva@redhat.com>
3068
3069 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3070 GOT_PAGE/GOT_OFST referencing overridable symbol to
3071 GOT_DISP/addend.
3072 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3073 global symbol as GOT_DISP.
3074
9b8c98a4
BW
30752003-04-10 Bob Wilson <bob.wilson@acm.org>
3076
3077 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3078 next relocation on an undefined symbol.
3079
ec1659c8
RH
30802003-04-09 Richard Henderson <rth@redhat.com>
3081
3082 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3083 Ignore relocations against r_symndx == 0.
3084
7dfb07f7
L
30852003-04-09 H.J. Lu <hjl@gnu.org>
3086
3087 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3088 FALSE for undefined symbols.
3089 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3090
a3805e4e
AO
30912003-04-09 Alexandre Oliva <aoliva@redhat.com>
3092
3093 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3094 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3095 addr_size.
3096
69931e60
AO
30972003-04-08 Alexandre Oliva <aoliva@redhat.com>
3098
3099 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3100 pointer size from ABI, not arch_bits_per_address.
3101
59a8c196
KB
31022003-04-07 Kevin Buettner <kevinb@redhat.com>
3103
3104 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3105 constants for n32 ABI.
3106
8e16317c
NC
31072003-04-06 Andrew Cagney <cagney@redhat.com>
3108
3109 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3110 free that leads to GDB vs BFD memory corruption.
3111
196486be
SC
31122003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3113
3114 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3115 symbols that mark the end of the section.
3116 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3117 converting to a relative branch so that the offset is computed after
3118 the relaxation; also relocate a jsr into a bsr if possible but don't
3119 relax them if they are to a far symbol as we need to call the
3120 trampoline code.
3121 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3122
be33c5dd
SS
31232003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3124
3125 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3126 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3127 * bfd-in2.h: Regenerate
3128 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3129 * cpu-tic4x.c: Ditto
3130
ff0c9faf
NC
31312003-04-03 Nick Clifton <nickc@redhat.com>
3132
3133 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3134 differently for object files and executables.
3135 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3136 for object files or for executables who have not already
3137 initialised the field.
3138 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3139 the PE format bfd is an executable.
3140
2b98e6c0
AM
31412003-04-03 Alan Modra <amodra@bigpond.net.au>
3142
3143 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3144 here as it's too early to reliably determine locality.
3145 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 3146 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 3147
92403579
BW
31482003-04-02 Bob Wilson <bob.wilson@acm.org>
3149
3150 * xtensa-modules.c: Remove comment indicating that this is a
3151 generated file.
3152
c45a316a
AM
31532003-04-02 Alan Modra <amodra@bigpond.net.au>
3154
3155 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3156
e0001a05
NC
31572003-04-01 Bob Wilson <bob.wilson@acm.org>
3158
8c29f035
AM
3159 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3160 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3161 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3162 xtensa-modules.lo.
3163 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3164 xtensa-modules.c.
3165 (cpu-xtensa.lo): New target.
3166 (elf32-xtensa.lo): Likewise.
3167 (xtensa-isa.lo): Likewise.
3168 (xtensa-modules.lo): Likewise.
3169 * Makefile.in: Regenerate.
3170 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3171 (bfd_archures_list): Add bfd_xtensa_arch.
3172 * config.bfd: Handle xtensa-*-*.
3173 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3174 * configure: Regenerate.
3175 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3176 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3177 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3178 (bfd_elf32_xtensa_le_vec): Likewise.
3179 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3180 * cpu-xtensa.c: New file.
3181 * elf32-xtensa.c: Likewise.
3182 * xtensa-isa.c: Likewise.
3183 * xtensa-modules.c: Likewise.
3184 * libbfd.h: Regenerate.
3185 * bfd-in2.h: Likewise.
e0001a05 3186
5a6c6817
NC
31872003-04-01 Nick Clifton <nickc@redhat.com>
3188
3189 * archures.c (bfd_mach_arm_unknown): Define.
3190 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3191 bfd_arm_get_mach_from_notes): Prototype.
3192 * bfd-in2.h: Regenerate.
3193 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3194 bfd_arm_merge_machines.
3195 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3196 * coffcode.h (coff_set_arch_mach_hook): Call
3197 bfd_arm_get_mach_from_notes.
3198 * coffgen.c (coff_real_object_p): Revert previous delta.
3199 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3200 .note section.
3201 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3202 binaries compiled for different architectures..
3203 (bfd_arm_update_notes): New function: Update an ARM note section.
3204 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3205 number from an ARM note section.
3206 * elf32-arm.h (elf32_arm_object_p): Use
3207 bfd_arm_get_mach_from_notes.
3208 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3209 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 3210
0cc1cf99
BE
32112003-04-01 Ben Elliston <bje@wasabisystems.com>
3212
3213 * dwarf2.c (read_attribute_value): Correct typo in comment.
3214
af3ef9fe
NC
32152003-04-01 Nick Clifton <nickc@redhat.com>
3216
3217 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3218 instead of concat().
3219 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
3220 (add_line_info): Make a copy of the filename when storing it into
3221 the info structure.
af3ef9fe 3222
6e84a906
DJ
32232003-03-31 Andreas Schwab <schwab@suse.de>
3224 Daniel Jacobowitz <drow@mvista.com>
3225
3226 * simple.c (bfd_simple_get_relocated_section_contents): Add
3227 parameter symbol_table. Optionally use it instead of the symbol
3228 table from the bfd. Save and restore output offsets and output
3229 sections around bfd_get_relocated_section_contents. Fix a memory
3230 leak.
3231 (simple_save_output_info, simple_restore_output_info): New
3232 functions.
3233 * bfd-in2.h: Regenerate.
3234 * dwarf2.c (read_abbrevs): Use
3235 bfd_simple_get_relocated_section_contents instead of
3236 bfd_get_section_contents.
3237 (decode_line_info): Likewise.
3238 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3239 find_rela_addend.
3240 (find_rela_addend): Remove.
3241 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3242 debugging sections.
3243 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3244 not bfd_zalloc.
3245
5ed6aba4
NC
32462003-03-31 David Heine <dlheine@suif.stanford.edu>
3247
3248 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3249 bfd_alloc.
3250 * dwarf2.c (concat_filename): Always allocate space for the
3251 returned filename.
3252 (decode_line_info): Free the allocated filename returned by
3253 concat_filename.
3254 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3255 * elf.c (copy_private_bfd_data): Likewise.
3256 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3257 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3258 * format.c (bfd_check_format_matches): Likewise.
3259 * linker.c (bfd_generic_final_link): Likewise.
3260 * opncls.c (find_separate_debug_info): Likewise.
3261 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3262
5941afc1
L
32632003-03-28 H.J. Lu <hjl@gnu.org>
3264
3265 * elflink.h (elf_link_add_object_symbols): Correctly combine
3266 visibilities.
3267
9d73f260
JJ
32682003-03-27 Jakub Jelinek <jakub@redhat.com>
3269
3270 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3271 to -1 before recomputing got offsets.
3272
a5ad465a
AS
32732003-03-26 Andreas Schwab <schwab@suse.de>
3274
3275 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3276 (elf_m68k_relocate_section): Use it to correctly handle symbols
3277 forced to be local.
3278 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3279 entries for symbols that are forced to be local.
3280
d0647110
AO
32812003-03-25 Alexandre Oliva <aoliva@redhat.com>
3282
3283 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3284 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3285 * elfn32-mips.c, elf64-mips.c: Use it.
3286
e16bb312
NC
32872003-03-25 Stan Cox <scox@redhat.com>
3288 Nick Clifton <nickc@redhat.com>
8c29f035 3289
9b5ecbd0 3290 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3291
3292 * archures.c: Add bfd_mach_arm_iWMMXt.
3293 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3294 * bfd-in2.h: Regenerate.
3295 * libbfd.h: Regenerate.
3296 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3297 object files to be linked with XScale ones.
3298 (coff_arm_final_link_postscript): Update note section.
3299 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3300 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3301 after identifying a coff binary.
3302 * cpu-arm.c (processors): Add iWMMXt.
3303 (arch_inf): Likewise.
3304 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3305 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3306 be linked with XScale ones.
3307 (elf32_arm_section_flags): New function: Set flags on note section.
3308 (elf32_arm_final_write_processing): Handle note section.
3309
25f14c34
DD
33102003-03-21 DJ Delorie <dj@redhat.com>
3311
3312 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3313 _bfd_elf_rela_local_sym.
3314
04b3329b
L
33152003-03-20 H.J. Lu <hjl@gnu.org>
3316
3317 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3318 non-ELF outputs.
3319
c25cfdf8
NC
33202003-03-20 Nick Clifton <nickc@redhat.com>
3321
3322 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3323 $idata5 in case bfd_coff_final_link is not called.
3324
3e1d7f19
JJ
33252003-03-19 Jakub Jelinek <jakub@redhat.com>
3326
3327 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3328 field.
3329 (canon_reloc_count): Define.
3330 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3331 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3332 reloc_count.
3333 (sparc64_elf_canonicalize_reloc): New routine.
3334 (bfd_elf64_canonicalize_reloc): Define.
3335
3fa1d917
JJ
33362003-03-18 Jakub Jelinek <jakub@redhat.com>
3337
3338 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3339 againt mergeable sections. Take r_addend into account when caching
3340 trampolines.
3341
f86b235a
RH
33422003-03-18 Richard Henderson <rth@redhat.com>
3343
8c29f035
AM
3344 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3345 local symbols that have no dyninfo.
f86b235a 3346
49ae03bf
NC
33472003-03-14 Gene Smith <gene.smith@siemens.com>
3348
3349 * ieee.c (ieee_write_expression): Handle the case where symbol is
3350 NULL.
3351 General formatting improvements.
3352
6a457e5c
NC
33532003-03-13 Nick Clifton <nickc@redhat.com>
3354
3355 * configure.in (LINGUAS): Add zh_CN.
3356 * configure: Regenerate.
3357 * po/zh_CN.po: New file.
3358
93516ec3
NC
33592003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3360
3361 * aout-cris.c (BYTES_IN_WORD): Don't define.
3362 aout-encap.c: Likewise.
3363 aout-ns32k.c: Likewise.
3364 aout-tic30.c: Likewise.
3365 hp300bsd.c: Likewise.
3366 i386aout.c: Likewise.
3367 i386dynix.c: Likewise.
3368 i386linux.c: Likewise.
3369 i386lynx.c: Likewise.
3370 i386mach3.c: Likewise.
3371 m68k4knetbsd.c: Likewise.
3372 m68klinux.c: Likewise.
3373 m68klynx.c: Likewise.
3374 m68knetbsd.c: Likewise.
3375 m88kmach3.c: Likewise.
3376 mipsbsd.c: Likewise.
3377 newsos3.c: Likewise.
3378 sparclinux.c: Likewise.
3379 sparclynx.c: Likewise.
3380 sparcnetbsd.c: Likewise.
3381 vaxbsd.c: Likewise. Fix comment formatting.
3382
fee24f1c
AO
33832003-03-12 Alexandre Oliva <aoliva@redhat.com>
3384
0b25d3e6
AO
3385 * Reverted 2003-03-02's patch.
3386
fee24f1c
AO
3387 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3388 overridable.
3389 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3390 mips_elf64_get_dynamic_reloc_upper_bound,
3391 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3392 (bfd_elf64_get_canonicalize_reloc,
3393 bfd_elf64_get_dynamic_reloc_upper_bound,
3394 bfd_elf64_canonicalize_dynamic_reloc): Define.
3395 (mips_elf64_slurp_reloc_table): Support dynamic.
3396 (mips_elf64_slurp_one_reloc_table): Adjust.
3397
64fb1839
NC
33982003-03-12 Nick Clifton <nickc@redhat.com>
3399
3400 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3401 'index' to 'offset' in test for zero value.
3402
908488f1
AO
34032003-03-11 Alexandre Oliva <aoliva@redhat.com>
3404
3405 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3406 dynamic relocations pointing to local or section symbols, use the
3407 NULL symbol instead. Document the choice to not emit an
3408 additional R_MIPS_64 relocation.
3409
e515b051
AM
34102003-03-11 Alan Modra <amodra@bigpond.net.au>
3411
3412 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3413 zero index dynamic tls relocs generated for the GOT. Tidy code.
3414 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3415 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3416
a23b6845
AM
34172003-03-07 Alan Modra <amodra@bigpond.net.au>
3418
87d243f1
AM
3419 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3420 a tls_get_addr call.
3421
a23b6845
AM
3422 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3423 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3424 ELF_LINK_NON_GOT_REF from weakdef.
3425 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3426 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3427 ELF_LINK_NON_GOT_REF from weakdef.
3428 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3429 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3430 ELF_LINK_NON_GOT_REF from weakdef.
3431
2d36fe5f
AH
34322003-03-06 Jakub Jelinek <jakub@redhat.com>
3433 Andrew Haley <aph@redhat.com>
3434
3435 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3436 output is relocateable.
3437
34f304a7
NC
34382003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3439
3440 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3441 R_COMMENT.
3442
7b609f53
AM
34432003-03-06 Alan Modra <amodra@bigpond.net.au>
3444
3445 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3446 error messages.
3447 (ELIMINATE_COPY_RELOCS): Define to zero.
3448 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3449 TLSLD relocs. Report reloc types on a number of errors. Optimize
3450 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3451 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3452 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3453 calculating TLSLD relocs. Report reloc types on a number of errors.
3454 Don't capitalize error messages.
3455
6a0fb186
L
34562003-03-03 H.J. Lu <hjl@gnu.org>
3457
3458 * elfxx-ia64.c (USE_BRL): Removed.
3459 (oor_ip): Removed.
3460
34f304a7 34612003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3462
3463 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3464 relocation (no special function), and make it non-partial_inplace.
3465 (sh_elf_relax_section): When creating a bsr, use a consistent value
3466 no matter if the symbol is extern or not; set addend to -4.
3467 Don't swap load / non-load instructions for SH4.
3468 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3469 rather than if the symbol is external to determine if adjusting the
3470 offset makes sense. Adjust the addend too if appropriate.
3471 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3472 relocation.
3473
a9d68a1e
NC
34742003-03-03 Nick Clifton <nickc@redhat.com>
3475
3476 * po/da.po: Installed latest translation.
3477
7c2be35c
TS
34782003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3479
3480 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3481 R_MIPS_PC16 to rightshift 2.
3482 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3483 (bfd_elf32_bfd_reloc_type_lookup): Support
3484 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3485 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3486 R_MIPS_PC16 to rightshift 2.
3487 (mips_elf64_howto_table_rela): Likewise.
3488 (mips_reloc_map): Map to rightshifted BFD reloc.
3489 * elfn32-mips.c: The same as in elf64-mips.c.
3490 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3491 (mips_elf_calculate_relocation): Handle rightshifted addends for
3492 R_MIPS_PC16.
3493 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3494 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3495 * libbfd.h: Regenerate.
3496 * bfd-in2.h: Regenerate.
3497
484a4f9c
RH
34982003-02-28 Richard Henderson <rth@redhat.com>
3499
3500 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3501 for ltoff22x relaxation.
3502
2ce40c65
AM
35032003-03-01 Alan Modra <amodra@bigpond.net.au>
3504
3505 * bfd-in.h (_bfd): Don't define.
3506 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3507 * syms.c: Likewise.
3508 * bfd-in2.h: Regenerate.
3509
2c4c2bc0
RH
35102003-02-27 Richard Henderson <rth@redhat.com>
3511
3512 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3513 (elfNN_ia64_check_relocs): Set it.
3514 (allocate_global_data_got): Check it.
3515 (allocate_local_got): Likewise.
3516 (allocate_dynrel_entries): Likewise.
3517 (elfNN_ia64_relax_ldxmov): New.
3518 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3519 (elfNN_ia64_choose_gp): Split out from ...
3520 (elfNN_ia64_final_link): ... here.
8c29f035 3521
c2852e88
AC
35222003-02-27 Andrew Cagney <cagney@redhat.com>
3523
3524 * bfd.c (struct bfd): Rename "struct _bfd".
3525 * bfd-in.h: Update copyright.
3526 (struct bfd): Rename "struct _bfd".
3527 (_bfd): Define for backward compatibility.
3528 * bfd-in2.h: Regenerate.
3529
3f87cb70
AM
35302003-02-25 Alan Modra <amodra@bigpond.net.au>
3531
3f9a32bd
AM
3532 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3533 and rel_hdr2 when initially counting input relocs rather than after
3534 creating output reloc sections.
4fabe71e
AM
3535 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3536 sizes.
3f9a32bd 3537
3f87cb70
AM
3538 * Makefile.am: Run "make dep-am".
3539 * Makefile.in: Regenerate.
3540
07c6e936
NC
35412003-02-24 Kris Warkentin <kewarken@qnx.com>
3542
3543 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3544 (elfcore_grog_nto_note): New function.
3545 (elfcore_grog_nto_gregs): New function.
3546 (elfcore_grog_nto_status): New function.
3547
aad5d350
AM
35482003-02-24 Alan Modra <amodra@bigpond.net.au>
3549
3550 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3551 section flags before concluding that we've already been called.
3552 Don't use register keyword.
3553 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3554 (_bfd_elf_create_linker_section): Formatting.
3555
2ab1486e
NC
35562003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3557
3558 * coff-h8300.c: Fix typo: intial -> initial.
3559 * coff-ppc.c: Likewise.
3560
70bccea4
AM
35612003-02-20 Alan Modra <amodra@bigpond.net.au>
3562
3563 * elf32-ppc.c: Formatting.
3564 (allocate_dynrelocs): LD and GD relocs against the same sym need
3565 separate GOT entries.
3566 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3567 entries per symbol.
3568
ee05f2fe
AM
35692003-02-19 Alan Modra <amodra@bigpond.net.au>
3570
26e41594
AM
3571 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3572 removal. Localize vars. Remove unnecessary dynobj test.
3573 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3574 of INFO.
3575 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3576 and optimize.
3577 (elf_i386_relocate_section): Likewise.
3578 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3579 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3580 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3581 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3582 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3583 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3584 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3585 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3586 Formatting.
3587
f4656909
AM
3588 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3589 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3590 test.
3591 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3592 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3593 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3594 and optimize. Use ELIMINATE_COPY_RELOCS.
3595 (ppc64_elf_relocate_section): Likewise.
3596
ee05f2fe
AM
3597 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3598 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3599 (ELIMINATE_COPY_RELOCS): Define.
3600 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3601 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3602 (MUST_BE_DYN_RELOC): Define.
3603 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3604 and optimize. Trim dyn_relocs.
3605 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3606 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3607 track of pc_rel dyn relocs.
3608 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3609 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3610 allocate_dynrelocs. Don't recalculate "sec".
3611
7619e7c7
AM
36122003-02-18 Alan Modra <amodra@bigpond.net.au>
3613
d881513a
AM
3614 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3615 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3616 on invalid LD relocs.
3617 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3618 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3619 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3620
7619e7c7
AM
3621 * elf32-ppc.h: New file.
3622 * elf32-ppc.c: Include elf32-ppc.h.
3623 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3624 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3625 Add "tls_mask" field.
3626 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3627 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3628 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3629 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3630 Make use of htab shortcuts throughout file.
3631 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3632 (ppc_elf_link_hash_table_create): Init new fields.
3633 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3634 (ppc_elf_howto_raw): Add tls relocs.
3635 (ppc_elf_reloc_type_lookup): Handle them.
3636 (ppc_elf_unhandled_reloc): New function.
3637 (ppc_elf_create_got): Stash got section pointer in hash table,
3638 return status. Make .rela.got too.
3639 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3640 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3641 NON_GOT_REF set. Don't allocate space in .plt here..
3642 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3643 not allocating plt entries unnecessarily. Allocate got entries here.
3644 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3645 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3646 "info" during allocate_dynrelocs hash traversal. Use htab section
3647 shortcuts rather than searching for named sections. Get rid of
3648 "plt" and "strip" booleans.
3649 (update_local_sym_info, bad_shared_reloc): New functions.
3650 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3651 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3652 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3653 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3654 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3655 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3656 relocs that might use a plt entry. Set NON_GOT_REF too.
3657 Enumerate all do-nothing relocs.
3658 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3659 tls relocs and all plt relocs.
3660 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3661 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3662 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3663 shortcuts.
3664 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3665 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3666 entries and got relocs here. Warn on non-zero got reloc addend.
3667 Split out branch taken/not taken reloc code into a separate switch
3668 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3669 Split out HA reloc adjustments to separate switch statement. Don't
3670 warn on reloc overflow if we've already warned about undefined.
3671 Don't rebuild sym name when reporting errors. Report all possible
3672 errors from _bfd_final_link_relocate.
3673 (bfd_elf32_bfd_final_link): Don't define.
3674
cd27b276
AM
36752003-02-18 Alan Modra <amodra@bigpond.net.au>
3676
3677 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3678 rebuild sym name when reporting errors.
3679
ae9a127f
NC
36802003-02-17 Nick Clifton <nickc@redhat.com>
3681
3f9a32bd 3682 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3683 allow_shlib_undefined for shared libraries.
3684 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3685 of allow_shlib_undefined.
3686 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3687 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3688 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3689 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3690 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3691 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3692 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3693 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3694 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3695 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3696 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3697 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3698 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3699 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3700 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3701 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3702
b5f852ea
NC
37032003-02-17 Nick Clifton <nickc@redhat.com>
3704
3705 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3706 address field to use in the comparison.
3f9a32bd 3707 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3708
3193e234
NC
37092003-02-14 Bob Wilson <bob.wilson@acm.org>
3710
3711 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3712 backends when checking if the generic ELF target should be used.
3713
21efdc8d
NC
3714 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3715 outside of functions, treat values as absolute addresses.
3716
ed781d5d
NC
3717 * bfd.c: Change embedded documentation to use consistent indentation
3718 and to split up long lines. Change informal style of description
3719 for functions lacking real documentation.
3720 * coffcode.h: Break up long lines in embedded documentation.
3721 * format.c: Likewise.
3722 * targets.c: Likewise.
3723 * libcoff.h: Regenerate.
3724 * bfd-in2.h: Regenerate.
3725
58ac9f71
AM
37262003-02-14 Alan Modra <amodra@bigpond.net.au>
3727
3728 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3729 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3730 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3731 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3732 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3733 (group_sections): Don't share a stub section if stubs are for a large
3734 section. Adjust comment.
3735 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3736 !stubs_always_before_branch.
3737 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3738 treat undefined and undefweak specially when processing dyn relocs.
3739
9147e853
JJ
37402003-02-13 Jakub Jelinek <jakub@redhat.com>
3741
3742 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3743
427bfd90
NC
37442003-02-13 Nick Clifton <nickc@redhat.com>
3745
3746 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3747 in computation of offset to insert into BL instruction.
3748
42b5d0ea
NC
37492003-02-11 Uwe Stieber <uwe@wwws.de>
3750
3751 * config.bfd: Add support for kaOS as cross build target system.
3752
a48ebf4d
AM
37532003-02-11 Alan Modra <amodra@bigpond.net.au>
3754
3755 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3756 .__tls_get_addr too.
3757 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3758
c95b8a7a
KK
37592003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3760
3761 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3762 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3763 (sh_elf_link_hash_newfunc): Remove the initialization of
3764 tls_tpoff32 field.
3765 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3766 for which tls_tpoff32 flag is set.
3767 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3768 of the symbol includes the entry matched with the input_section
3769 and having tls_tpoff32 flag on. When linking statically, set
3770 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3771 is defined in this executable.
3772 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3773
a779acda
JJ
37742003-02-10 Jakub Jelinek <jakub@redhat.com>
3775
3776 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3777 even if there is just non-empty .rela.plt.
3778
fde78edd
NC
37792003-02-10 Nick Clifton <nickc@redhat.com>
3780
3781 * archures.c (bfd_mach_arm_ep9312): Define.
3782 * bfd-in2.h: Regenerate.
3783 * cpu-arm.c (processors[]): Add ep9312.
3784 (bfd_arm_arch): Add ep9312.
3785 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3786 messages and add test for Maverick floating point support.
3787 (elf32_arm_print_private_bfd_data): Handle
3788 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3789 (elf32_arm_object_p): New function.
3790 (elf_backend_object_p): Define.
fde78edd 3791
e7b938ca
AM
37922003-02-10 Alan Modra <amodra@bigpond.net.au>
3793
3794 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3795 variables, structure fields or function params to tls_mask or
3796 similar to better reflect usage.
3797 (struct got_entry): Comment.
9b5ecbd0 3798 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3799 (get_tls_mask): Rename from get_tls_type.
3800
951fd09b
AM
38012003-02-09 Alan Modra <amodra@bigpond.net.au>
3802
3803 * elf64-ppc.c (TLS_GD_LD): Don't define..
3804 (TLS_GD): ..define this instead and update all uses.
3805 (TLS_TPRELGD): Define.
3806 (ppc64_elf_link_hash_table_create): Tweak initialization of
3807 init_refcount and init_offset.
3808 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3809 Mark second slot of GD or LD toc entries.
3810 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3811 from other tls types.
3812 (ppc64_elf_tls_setup): New function, split out from..
3813 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3814 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3815 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3816 return value to properly decide whether toc GD and LD entries can
3817 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3818 to determine GD or LD rather than looking at TLS_LD flag. Don't
3819 attempt to adjust got entry tls_type here..
3820 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3821 look for possible merges.
3822 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3823 optimization.
3824 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3825 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3826 Make use of return value from get_tls_type to properly detect GD and
3827 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3828 handle tls_get_addr removal when looking at REL24 relocs, do it when
3829 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3830 GD or LD.
3831 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3832
acc990f2
AM
38332003-02-08 Alan Modra <amodra@bigpond.net.au>
3834
00b28bb0
AM
3835 * elf32-hppa.c (group_sections): Don't share a stub section if
3836 stubs are for a large section.
3837
acc990f2
AM
3838 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3839 stubs if !stubs_always_before_branch.
3840
589e6347
NC
38412003-02-07 Nick Clifton <nickc@redhat.com>
3842
3843 * elf.c (swap_out_syms): Generate an error message if an
3844 equivalent output section cannot be found for a symbol.
3845
c328dc3f
JJ
38462003-02-07 Jakub Jelinek <jakub@redhat.com>
3847
3848 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3849 local_got_entries is NULL.
3850
84f97cb6
AS
38512003-02-06 Andreas Schwab <schwab@suse.de>
3852
3853 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3854 (read_value): Add parameter is_signed, use signed extraction if
3855 the value is signed.
3856 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3857 encoding to read_value.
3858
6349e628
AM
38592003-02-06 Alan Modra <amodra@bigpond.net.au>
3860
3861 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3862 plt info when called to transfer weak sym info.
3863
411e1bfb
AM
38642003-02-05 Alan Modra <amodra@bigpond.net.au>
3865
3866 * reloc.c: Add PPC and PPC64 TLS relocs.
3867 * libbfd.h: Regenerate.
3868 * bfd-in2.h: Regenerate.
3869 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3870 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3871 against a 32 bit field.
3872 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3873 (_ppc64_elf_section_data): Add t_symndx and comments.
3874 (ppc64_elf_section_data): Use elf_section_data macro.
3875 (ppc64_elf_new_section_hook): American spelling.
3876 (struct got_entry, struct plt_entry): New.
3877 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3878 (struct ppc_stub_hash_entry): Add "addend" field.
3879 (struct ppc_link_hash_entry): Add "tls_type".
3880 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3881 TLS_EXPLICIT): Define.
3882 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3883 (link_hash_newfunc): Init new fields.
58ac9f71 3884 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3885 init_offset to NULL.
3886 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3887 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3888 there.
3889 (update_local_sym_info, update_plt_info): New functions.
3890 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3891 handling to use got.glist rather than got.refcount. Likewise for PLT.
3892 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3893 (func_desc_adjust): Adjust for new PLT list.
3894 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3895 (get_sym_h, get_tls_type): New functions.
3896 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3897 (ppc64_elf_tls_optimize): New function.
3898 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3899 TLS relocs.
3900 (ppc64_elf_size_dynamic_sections): Likewise.
3901 (ppc_type_of_stub): Adjust for new PLT list.
3902 (ppc_build_one_stub): Likewise.
3903 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3904 calls specially.
3905 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3906 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3907 init GOT entries that have a reloc. Generate GOT relocs here..
3908 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3909 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3910
0cca5f05
AS
39112003-02-04 Andreas Schwab <schwab@suse.de>
3912
3913 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3914 (elf_m68k_link_hash_traverse): Remove.
3915 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3916 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3917 reduce casting.
3918 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3919 casting.
3920 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3921 instead of elf_m68k_link_hash_traverse.
3922 (elf_m68k_discard_copies): Change first parameter to pointer to
3923 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3924 elf_m68k_link_hash_entry is needed.
3925
5cab59f6
AM
39262003-02-04 Alan Modra <amodra@bigpond.net.au>
3927
3928 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3929 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3930 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3931 "plt" field.
3932 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3933 Add "init_offset" field.
3934 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3935 (elf_local_got_ents): Declare.
3936 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3937 and "plt".
3938 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3939 (_bfd_elf_link_hash_table_init): Set "init_offset".
3940 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3941 from init_offset.
3942 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3943
3944 * elf.c (bfd_elf_local_sym_name): Split out from..
3945 (group_signature): ..here.
3946 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3947
68bfbfcc
AM
39482003-02-04 Alan Modra <amodra@bigpond.net.au>
3949
3950 * elf-bfd.h (enum elf_link_info_type): Remove.
3951 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3952 to struct sec. Remove linkonce_p field.
3953 (elf_linkonce_p): Delete.
3954 (elf_discarded_section): Update for sec_info_type change.
3955 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3956 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3957 (ELF_INFO_TYPE_NONE): Define.
3958 (ELF_INFO_TYPE_STABS): Define.
3959 (ELF_INFO_TYPE_MERGE): Define.
3960 (ELF_INFO_TYPE_EH_FRAME): Define.
3961 (ELF_INFO_TYPE_JUST_SYMS): Define.
3962 (STD_SECTION): Update struct sec initializer.
3963 * ecoff.c (bfd_debug_section): Likewise.
3964 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3965 * elflink.h: Likewise.
3966 * elf-eh-frame.c: Likewise.
3967 * elf64-alpha.c: Likewise.
3968 * elfxx-ia64.c: Likewise.
3969 * elfxx-mips.c: Likewise.
3970 * bfd-in2.h: Regenerate.
3971
3972 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3973 referring to used_by_bfd.
3974 * elf64-sparc.c (sec_do_relax): Likewise.
3975 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3976 * elfxx-mips.c (mips_elf_section_data): Likewise.
3977 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3978 (ieee_get_section_contents): Likewise.
3979 (ieee_new_section_hook): Formatting.
3980 (ieee_canonicalize_reloc): Remove commented out code.
3981 * mmo.c (mmo_section_data): Define. Use throughout file.
3982 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3983
31f7ba04
NC
39842003-01-31 Graydon Hoare <graydon@redhat.com>
3985
3986 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3987 * Makefile.in: Regenerate.
3988 * opncls.c (calc_crc32, get_debug_link_info,
3989 seperate_debug_file_exists, find_seperate_debug_file): New
3990 internal functions.
3991 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3992 contained inside a .gnu_debuglink section.
3993 * bfd-in2.h: Regenerate.
3994
38985a1c
AO
39952003-01-29 Alexandre Oliva <aoliva@redhat.com>
3996
3997 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3998 entry->abfd when it's NULL.
3999
4bb9a95f
AO
40002003-01-27 Alexandre Oliva <aoliva@redhat.com>
4001
4002 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4003 _bfd_elf_section_offset returning -2 the same way as -1.
4004
f4416af6
AO
4005 * elfxx-mips.c (mips_elf_multi_got): New function.
4006 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4007 addend into union along with address and link hash entry.
4008 (struct mips_got_info): Added bfd2got and next.
4009 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4010 (mips_elf_got_section, mips_elf_create_got_section): Use
4011 SEC_EXCLUDE bit to tell whether we really need the got
4012 section. Take boolean arguments to disregard an excluded
4013 section, or to create it as excluded. Adjust all callers.
4014 Use mips_elf_got_section all over.
4015 (mips_elf_local_got_index, mips_elf_got_page,
4016 mips_elf_got16_entry): Take input bfd as argument, and pass it
4017 on to mips_elf_create_local_got_entry.
4018 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4019 Take input bfd as argument, and manage entries in the
4020 appropriate GOT.
4021 (mips_elf_got_offset_from_index): Take input bfd as argument,
4022 and use it to adjust the GP offset of the bfd.
4023 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4024 unreferenced GOT entries of global symbols to the end.
4025 (mips_elf_record_global_got_symbol): Take input bfd as
4026 argument. Add entries to the master GOT hash table.
4027 (struct mips_elf_bfd2got_hash): New.
4028 (struct mips_elf_got_per_bfd_arg): New.
4029 (struct mips_elf_set_global_got_offset_arg): New.
4030 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4031 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4032 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4033 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4034 mips_elf_resolve_final_got_entry,
4035 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4036 mips_elf_got_for_ibfd): New functions.
4037 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4038 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4039 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4040 (mips_elf_got_entry_hash): Take new fields into account. Use
4041 mips_elf_hash_bfd_vma.
4042 (mips_elf_got_entry_eq): Take new fields into account.
4043 (mips_elf_create_got_section): Initialize new fields.
4044 (mips_elf_calculate_relocation): Pass input_bfd to functions
4045 that now take it. Adjust gp for the input_bfd.
4046 (mips_elf_allocate_dynamic_relocation,
4047 mips_elf_create_dynamic_relocation,
4048 _bfd_mips_elf_create_dynamic_sections): Use...
4049 (mips_elf_rel_dyn_section): New function. Borrow code from...
4050 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4051 now take it. Create the got section if needed, even if
4052 excluded, before recording a global got symbol. Move some
4053 code to...
4054 (mips_elf_record_local_got_symbol): New fn.
4055 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4056 Compute multi-got global entries offsets. Move GOT code to...
4057 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4058 if the GOT is too big.
4059 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4060 undefweak symbol to zero. Generate dynamic relocations for
4061 non-primary GOT entries for global symbols.
4062 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4063 case. Generate dynamic relocations for local got entries.
4064 Sort dynamic relocations on N64 too, using...
4065 (sort_dynamic_relocs_64): New fns.
4066 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4067 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4068
52b69c9e
AO
40692003-01-27 Alexandre Oliva <aoliva@redhat.com>
4070
4071 * bfd.c (struct _bfd): Added id field.
4072 * opncls.c (_bfd_id_counter): New static variable.
4073 (_bfd_new_bfd): Use it.
4074 * bfd-in2.h: Rebuilt.
4075
71e5db1c
AM
40762003-01-25 Alan Modra <amodra@bigpond.net.au>
4077
4078 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4079
b9734f35
JJ
40802003-01-25 Jakub Jelinek <jakub@redhat.com>
4081
4082 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4083 (elf32_sparc_rev32_howto): New variable.
4084 (sparc_reloc_map): Add TLS relocs.
4085 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4086 Handle REV32.
4087 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4088 New functions.
4089 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4090 struct elf32_sparc_link_hash_table):
4091 New structures.
4092 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4093 elf32_sparc_hash_table): Define.
4094 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4095 create_got_section, elf32_sparc_create_dynamic_sections,
4096 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4097 functions.
4098 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4099 reference counting.
4100 (elf32_sparc_gc_sweep_hook): Likewise.
4101 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4102 (elf32_sparc_size_dynamic_sections): Likewise.
4103 (elf32_sparc_relocate_section): Likewise.
4104 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4105 New functions.
4106 (elf32_sparc_object_p): Allocate backend private object data.
4107 (bfd_elf32_bfd_link_hash_table_create,
4108 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4109 elf_backend_can_refcount): Define.
4110 (elf_backend_create_dynamic_sections): Define to
4111 elf32_sparc_create_dynamic_sections.
4112 * reloc.c: Add SPARC TLS relocs.
4113 * bfd-in2.h, libbfd.h: Rebuilt.
4114 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4115 (sparc_reloc_map): Likewise.
4116
69fc87f1
MS
41172003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4118
4119 * bfd-in2.h: Regenerate.
4120 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4121 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4122 (elf_howto_table): Add TLS relocs.
4123 (elf_s390_reloc_type_lookup): Likewise.
4124 (elf_s390_link_hash_entry): Add tls_type.
4125 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4126 New macros.
4127 (elf_s390_link_hash_table): Add tls_ldm_got.
4128 (link_hash_newfunc): Initialize tls_type.
4129 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4130 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4131 (elf_s390_check_relocs): Support TLS relocs.
4132 (elf_s390_gc_sweep_hook): Likewise.
4133 (allocate_dynrelocs): Likewise.
4134 (elf_s390_size_dynamic_sections): Likewise.
4135 (elf_s390_relocate_section): Likewise.
4136 (elf_s390_finish_dynamic_symbol): Likewise.
4137 (bfd_elf32_mkobject): Define for TLS.
4138 * elf64-s390.c: Same changes as for elf32-s390.c.
4139 * libbfd.h: Regenerate.
4140 * reloc.c: Add s390 TLS relocations.
4141
c5d1701e 41422003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
4143
4144 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4145
5177500f
NC
41462003-01-23 Nick Clifton <nickc@redhat.com>
4147
4148 * Add sh2e support:
5177500f 4149 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
4150 * archures.c (bfd_mach_sh2e): Added.
4151 * bfd-in2.h: Rebuilt.
4152 * cpu-sh.c (arch_info_struct): Added SH2e.
4153 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 4154
f0abc2a1
AM
41552003-01-23 Alan Modra <amodra@bigpond.net.au>
4156
4157 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4158 dynindx to an int. Rearrange for better packing.
4159 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4160 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4161 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4162 (struct _sh64_elf_section_data): New struct.
4163 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4164 * elf32-sh64-com.c: Include elf32-sh64.h.
4165 * elf32-sh64.c: Likewise.
4166 (sh64_elf_new_section_hook): New function.
4167 (bfd_elf32_new_section_hook): Define.
4168 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4169 (sh64_bfd_elf_copy_private_section_data): Likewise.
4170 (sh64_elf_final_write_processing): Likewise.
4171 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4172 (elf32_sparc_new_section_hook): New function.
4173 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4174 (sec_do_relax): Define.
4175 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4176 (elf32_sparc_relocate_section): Likewise.
4177 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4178 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4179 (mmix_elf_section_data): Define. Use throughout file.
4180 (mmix_elf_new_section_hook): New function.
4181 (bfd_elf64_new_section_hook): Define.
4182 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4183 (ppc64_elf_section_data): Define. Use throughout.
4184 (ppc64_elf_new_section_hook): New function.
4185 (bfd_elf64_new_section_hook): Define.
4186 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4187 (sparc64_elf_new_section_hook): New function.
4188 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4189 (sec_do_relax): Define.
4190 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4191 (sparc64_elf_relocate_section): Likewise.
4192 (bfd_elf64_new_section_hook): Define.
4193 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4194 * elfxx-mips.c (struct _mips_elf_section_data): New.
4195 (mips_elf_section_data): Define. Use throughout.
4196 (_bfd_mips_elf_new_section_hook): New function.
4197 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4198 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4199 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4200 * Makefile.am: Run "make dep-am".
4201 * Makefile.in: Regenerate.
4202
cc03ec80
RH
42032003-01-21 Richard Henderson <rth@redhat.com>
4204
4205 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4206 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4207 (elf64_alpha_adjust_dynamic_symbol): Set them.
4208 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4209 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4210 symbol index when relaxing LDM to TPREL.
4211 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4212 relocs, even if the target isn't locally defined.
4213 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4214 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4215 relocs vs symndx 0 to the tp base.
4216
da896d3f
NC
42172003-01-21 Fabio Alemagna <falemagn@aros.org>
4218
4219 * config.bfd: Handle i[3456]86-*-aros*.
4220
7fce784e
AS
42212003-01-21 Andreas Schwab <schwab@suse.de>
4222
4223 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4224 (struct ppc_elf_link_hash_entry): Define.
4225 (ppc_elf_hash_entry): New function.
4226 (struct ppc_elf_link_hash_table): Define.
4227 (ppc_elf_hash_table): New function.
4228 (ppc_elf_link_hash_newfunc): New function.
4229 (ppc_elf_link_hash_table_create): New function.
4230 (ppc_elf_copy_indirect_symbol): New function.
4231 (allocate_dynrelocs): New function.
4232 (readonly_dynrelocs): New function.
4233 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4234 relocs and determine DT_TEXTREL.
4235 (ppc_elf_check_relocs): Don't do that here, just count the
4236 dynamic relocs.
4237 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4238 removed section.
4239 (bfd_elf32_bfd_link_hash_table_create): Define.
4240 (elf_backend_copy_indirect_symbol): Define.
4241
1bbc9cec
RH
42422003-01-21 Richard Henderson <rth@redhat.com>
4243
4244 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4245 TPREL also get a reloc if shared. Remove SREL support.
4246 (elf64_alpha_emit_dynrel): New.
acc990f2 4247 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
4248 and GOTTPREL relocs to local symbols against the tp base.
4249 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4250
4251 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4252 use count before clobbering r_type.
4253 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4254 ordering would mean dataflow inspection is necessary.
4255
0da35f8b
SS
42562003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4257
4258 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 4259
571fe01f
NC
42602003-01-20 Fabio Alemagna <falemagn@aros.org>
4261
4262 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4263 elfxx-target.h and #undef it before #define'ing it.
4264 * elf32-i386.c: Likewise.
acc990f2
AM
4265 * elf32-sh64.c: Likewise.
4266 * elf64-alpha.c: Likewise.
4267 * elf64-sh64.c: Likewise.
571fe01f 4268
5236c819
MS
42692003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4270
4271 * bfd-in2.h: Regenerate.
4272 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4273 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4274 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4275 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4276 R_390_PLTOFF32 and R_390_PLTOFF64.
4277 (elf_s390_reloc_type_lookup): Likewise.
4278 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4279 of GOTPLT references to a function.
4280 (link_hash_newfunc): Initialize gotplt_refcount.
4281 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4282 and creation of the got section out of the main switch. Add support
4283 for the gotoff, gotplt and pltoff relocations.
4284 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4285 and pltoff.
4286 (elf_s390_adjust_gotplt): New function.
4287 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4288 plt entries.
4289 (allocate_dynrelocs): Add comment.
4290 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4291 for gotoff, gotplt and pltoff relocations.
4292 * elf64-s390.c: Same changes as for elf32-s390.c.
4293 * libbfd.h: Regenerate.
4294 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4295 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4296 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4297 and BFD_RELOC_390_PLTOFF64.
4298
a823975a
JJ
42992003-01-18 Jakub Jelinek <jakub@redhat.com>
4300
4301 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4302 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4303
b3dfd7fe
JJ
43042003-01-16 Jakub Jelinek <jakub@redhat.com>
4305
4306 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4307 self_dtpmod_done and self_dtpmod_offset.
4308 (allocate_global_data_got): Only use one got entry for all
4309 dtpmod relocs against local symbols.
4310 (allocate_dynrel_entries): Only need .rela.got entry for
4311 dtpmod against global symbol.
4312 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4313 Reserve space in .rela.got for the local dtpmod entry.
4314 (set_got_entry): Initialize the common local dtpmod .got entry.
4315 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4316 and R_IA_64_DTPREL64MSB.
4317
04c9666a
AM
43182003-01-16 Alan Modra <amodra@bigpond.net.au>
4319
4320 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4321 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4322 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4323 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4324 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4325 relative relocs, not with absolute ones.
4326 * Makefile.am: Run "make dep-am".
4327 * Makefile.in: Regenerate.
4328 * po/SRC-POTFILES.in: Regenerate.
4329
c87f1ff7
AS
43302003-01-15 Andreas Schwab <schwab@suse.de>
4331
4332 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4333 relocation against a non-allocated readonly section.
4334
86bbe32f
AM
43352003-01-10 Alan Modra <amodra@bigpond.net.au>
4336
4337 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4338 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4339
32d95f29
KD
43402002-01-08 Klee Dienes <kdienes@apple.com>
4341
4342 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4343 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4344 * Makefile.in: Regenerate.
acc990f2 4345
ab7d0aa0
AO
43462003-01-08 Alexandre Oliva <aoliva@redhat.com>
4347
4348 * elfn32-mips.c (prev_reloc_section): New.
4349 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4350 (SET_RELOC_ADDEND): Parenthesize macro argument.
4351
95d0f04a
DA
43522003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4353
4354 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4355 adjust addil instructions if the symbol has no section.
4356
5c9e189c
DD
43572003-01-07 DJ Delorie <dj@redhat.com>
4358
4359 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4360 partial_inplace.
4361
3e829b4a
AS
43622003-01-07 Andreas Schwab <schwab@suse.de>
4363
4364 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4365 PC relative relocations.
4366 (elf_m68k_discard_copies): Set it here instead.
4367
a75473eb
SC
43682002-01-02 Ben Elliston <bje@redhat.com>
4369 Jeff Johnston <jjohnstn@redhat.com>
4370
4371 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4372 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4373 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4374 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4375 (cpu-iq2000.lo): New target.
4376 * Makefile.in: Regenerate.
4377 * config.bfd: Handle iq2000-*-elf.
4378 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4379 (bfd_archures_list): Add bfd_iq2000_arch.
4380 * configure.in: Handle bfd_elf32_iq2000_vec.
4381 * configure: Regenerate.
acc990f2 4382 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4383 and BFD_RELOC_IQ2000_UHI16.
4384 * targets.c (bfd_elf32_iq2000_vec): Declare.
4385 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4386 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4387 * cpu-iq2000.c: New file.
4388 * elf32-iq2000.c: Likewise.
4389 * libbfd.h: Regenerate.
4390 * bfd-in2.h: Likewise.
4391
64543e1a
RS
43922003-01-02 Richard Sandiford <rsandifo@redhat.com>
4393
4394 * elfxx-mips.c: Include libiberty.h.
4395 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4396 (mips_set_isa_flags): New function, split out from...
4397 (_bfd_mips_elf_final_write_processing): ...here. Only call
4398 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4399 (mips_mach_extensions): New array.
4400 (mips_32bit_flags_p): New function.
4401 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4402 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4403 other is 64-bit. When adopting IBFD's architecture, adopt the
4404 bfd_mach as well as the flags.
4405
4852a44e
NC
44062003-01-02 Nick Kelsey <nickk@ubicom.com>
4407
4408 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4409 fix internal errors, fix bad code generation, fix incorrect stabs
4410 information, and improve ability to eliminate redundant page
4411 instructions. Added code to ip2k_final_link_relocate to self-verify
4412 the linker relaxation. Fix formatting problems.
4413
af7ee8bf
CD
44142002-12-30 Chris Demetriou <cgd@broadcom.com>
4415
4416 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4417 * archures.c (bfd_mach_mipsisa32r2): New define.
4418 * bfd-in2.h: Regenerate.
4419 * cpu-mips.c (I_mipsisa32r2): New enum value.
4420 (arch_info_struct): Add entry for I_mipsisa32r2.
4421 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4422 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4423 (_bfd_mips_elf_final_write_processing): Add
4424 bfd_mach_mipsisa32r2 case.
4425 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4426 binaries marked as using MIPS32 Release 2.
4427
2469cfa2
NC
44282002-12-30 Dmitry Diky <diwil@mail.ru>
4429
4430 * Makefile.am: Add msp430 target.
4431 * configure.in: Likewise.
4432 * Makefile.in: Regenerate.
4433 * configure: Regenerate.
4434 * archures.c: Add msp430 architecture vector.
4435 * config.bfd: Likewise.
4436 * reloc.c: Add msp430 relocs.
4437 * targets.c: Add msp320 target.
4438 * cpu-msp430.c: New file: msp430 cpu detection.
4439 * elf32-msp430.c: New file: msp430 reloc processing.
4440 * bfd-in2.h: Regenerate.
4441 * libbfd.h: Regenerate.
4442
eecdbe52
JJ
44432002-12-28 Jakub Jelinek <jakub@redhat.com>
4444
4445 * elf.c (elf_sort_sections): Don't reorder .tbss.
4446 (assign_file_positions_for_segments): Only adjust off/voff
4447 for increased alignment in PT_LOAD or PT_NOTE segment,
4448 but adjust p_filesz for .tbss too. in PT_LOAD consider
4449 .tbss to have zero memory size.
4450 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4451 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4452 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4453 into PT_TLS segment. Never put SHF_TLS sections in
4454 segments other than PT_TLS or PT_LOAD.
4455
4456 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4457 sh_entsize.
4458
213e90f4
DD
44592002-12-23 DJ Delorie <dj@redhat.com>
4460
4461 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4462
75828352
AM
44632002-12-23 Alan Modra <amodra@bigpond.net.au>
4464
4465 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4466
312b768e
NC
44672002-12-23 Nick Clifton <nickc@redhat.com>
4468
4469 * archures.c (bfd_arch_get_compatible): Add third parameter
4470 'accept_unknowns'. Only accept unknown format BFDs if
4471 accept_unknowns is true, or if the format is "binary".
acc990f2 4472 * bfd-in2.h: Regenerate.
312b768e 4473
63222ec9
NC
44742002-12-21 Nick Clifton <nickc@redhat.com>
4475
4476 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4477 that subtracted 8 from pc relative relocations.
4478
19852a2a
KH
44792002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4480
4481 * coff-h8300.c: Fix comment typos.
4482 * coffcode.h: Likewise.
4483 * cpu-cris.c: Likewise.
4484 * elf32-vax.c: Likewise.
4485 * genlink.h: Likewise.
4486 * linker.c: Likewise.
4487 * som.c: Likewise.
4488 * tekhex.c: Likewise.
4489 * vms-misc.c: Likewise.
4490
5fd63999
DD
44912002-12-20 DJ Delorie <dj@redhat.com>
4492
4493 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4494 * libbfd.h: Regenerate.
4495 * bfd-in2.h: Regenerate.
4496 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4497 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4498
4ee79850
KH
44992002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4500
4501 * doc/bfdint.texi: Fix typos.
4502
66e25bab
AM
45032002-12-20 Paul Eggert <eggert@twinsun.com>
4504
4505 Port to POSIX 1003.1-2001.
4506 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4507 * configure.in (build-warnings): Likewise.
4508 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4509 * aclocal.m4: Regenerate.
4510 * config.in: Regenerate.
4511 * configure: Regenerate.
4512
7dc77aaa
AM
45132002-12-19 Alan Modra <amodra@bigpond.net.au>
4514
0171ee92
AM
4515 * coff-h8300.c: Include libiberty.h.
4516 (h8300_reloc16_extra_cases): Check the hash table creator before
4517 referencing h8300 specific fields. Stash the hash table pointer
4518 in a local var. Comment typo fixes.
4519 (h8300_bfd_link_add_symbols): Likewise.
4520
1049f94e 4521 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4522 dst_mask comments.
4523 * bfd-in2.h: Regenerate.
4524
47388f4c
AM
45252002-12-18 Alan Modra <amodra@bigpond.net.au>
4526
4527 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4528 code a little. Comment on dynamic relocs against section symbols.
4529
1b3e3744
AM
45302002-12-17 Roger Sayle <roger@eyesopen.com>
4531
4532 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4533 the HP compiler's "long long".
4534
46f2b541
DD
45352002-12-16 Andrew MacLeod <amacleod@redhat.com>
4536
4537 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4538 and R_XSTORMY16_HI16) howto entries.
4539 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4540 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4541 determine the start of the second reloc table.
4542
af738ea7
NC
45432002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4544
4545 * ecofflink.c: Fix the reading of the debugging information
4546 of Tru64/Alpha binaries that are produced by recent Compaq
4547 compilers.
4548 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4549 table.
4550 (lookup_line): Because of the strange information sometimes
4551 generated by Compaq's recent compilers, change how the FDR
4552 table is searched so that PDRs (procedure descriptors) are
4553 correctly found. Note that this change is really more of a hack;
4554 however, I have included extensive documentation as to why
4555 this is the best solution short of an extensive rewrite or
4556 another hack.
4557 (fdrtab_lookup): Add comments to explain the algorithm.
4558
5354b572
AO
45592002-12-12 Alexandre Oliva <aoliva@redhat.com>
4560
4561 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4562 initializers to match struct declaration.
4563
ab3acfbe
AM
45642002-12-12 Alan Modra <amodra@bigpond.net.au>
4565
4566 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4567 * elf.c (get_program_header_size): Likewise.
4568 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4569 (m32r_elf_generic_reloc): Likewise.
4570 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4571 * elflink.h (elf_bfd_discard_info): Likewise.
4572
6348e046
AM
45732002-12-12 Alan Modra <amodra@bigpond.net.au>
4574
4575 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4576 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4577 DT_RELSZ adjustment, not output section. Avoid writing tags when
4578 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4579 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4580 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4581 DT_RELASZ adjustment, not output section. Avoid writing tags when
4582 unchanged. Adjust DT_RELA.
4583 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4584 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4585
2e7a68a8
AO
45862002-12-12 Alexandre Oliva <aoliva@redhat.com>
4587
4588 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4589 addend by 4.
4590
b15e6682
AO
45912002-12-12 Alexandre Oliva <aoliva@redhat.com>
4592
4593 * elfxx-mips.c (struct mips_got_entry): New.
4594 (struct mips_got_info): Added got_entries field.
4595 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4596 (mips_elf_local_got_index, mips_elf_got_page,
4597 mips_elf_got16_entry): Re-implement in terms of new...
4598 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4599 Change return type.
4600 (mips_elf_highest): Warning clean-up.
4601 (mips_elf_create_got_section): Initialize got_entries.
4602 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4603 local got size.
4604 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4605 GOT_PAGE entries, since we now reuse GOT16 entries.
4606
e6af3a53
NC
46072002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4608
4609 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4610 read-only section that lies after .text and before .data to be
4611 written into the output file and included in a_text.
4612 (translate_to_native_sym_flags): If an otherwise unrepresentable
4613 section was merged with .text, convert its symbols to N_TEXT
4614 symbols.
4615 * libaout.h (aout_section_merge_with_text_p): New macro.
4616
cf3d882d
AM
46172002-12-08 Alan Modra <amodra@bigpond.net.au>
4618
4619 * bfd-in.h: Comment typo fix. Formatting.
4620 * bfd-in2.h: Regenerate.
4621 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4622 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4623 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4624
2f9bd3f6
RH
46252002-12-05 Richard Henderson <rth@redhat.com>
4626
4627 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4628 Only send PCREL21B though the plt. Fix installed reloc type.
4629 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4630 against PCREL22 or PCREL64I; clean up error messages for
4631 branch relocs.
4632
d0112f73
KB
46332002-12-04 Kevin Buettner <kevinb@redhat.com>
4634
4635 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4636 New functions.
4637 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4638
c10d9d8f
JW
46392002-12-04 David Mosberger <davidm@hpl.hp.com>
4640
4641 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4642
d48770d4
L
46432002-12-04 H.J. Lu <hjl@gnu.org>
4644
4645 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4646 BFD address when constructing local name.
4647
b6152c34
AS
46482002-12-04 Andreas Schwab <schwab@suse.de>
4649
4650 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4651 member.
4652 (elf_m68k_link_hash_table_create): Initialize it.
4653 (elf_m68k_check_relocs): Handle symbols that are forced to be
4654 local due to visibility changes.
4655 (elf_m68k_adjust_dynamic_symbol): Likewise.
4656 (elf_m68k_size_dynamic_sections): Likewise.
4657 (elf_m68k_discard_copies): Likewise.
4658 (elf_m68k_relocate_section): Likewise.
4659
73374ef1
AM
46602002-12-04 Alan Modra <amodra@bigpond.net.au>
4661
4662 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4663
c5c1944d
AM
46642002-12-04 Alan Modra <amodra@bigpond.net.au>
4665
4666 * srec.c (srec_write_symbols): Restore '$' prefix to address
4667 accidentally removed in 2002-04-04 change.
4668 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4669
e1a9cb8e
NC
46702002-12-03 Nick Clifton <nickc@redhat.com>
4671
4672 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4673 (apuinfo_list_add): New function: Add a value to the list.
4674 (apuinfo_list_length): New function: Return the number of
4675 values on the list.
4676 (apuinfo_list_element): New function: Return a value on the
4677 list.
4678 (apuinfo_list_finish): New function: Free the resources used
4679 by the list.
4680 (ppc_elf_begin_write_processing): New function. Scan the
4681 input bfds for apuinfo sections.
4682 (ppc_elf_write_section): New function: Delay the creation of
4683 the contents of an apuinfo section in an output bfd.
4684 (ppc_elf_final_write_processing): New function. Create the
4685 contents of an apuinfo section in an output bfd.
4686 (elf_backend_begin_write_processing): Define.
4687 (elf_backend_final_write_processing): Define.
4688 (elf_backend_write_section): Define.
e1a9cb8e 4689
a823923b
RH
46902002-12-03 Richard Henderson <rth@redhat.com>
4691
4692 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4693
30491647
SC
46942002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4695
4696 Fix PR savannah/1417:
4697 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4698 branch if it goes to the start of the deleted region.
4699
bc7c6a90
SC
47002002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4701
4702 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4703 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4704 bfd_mach_m6812s): Declare.
4705
4706 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4707 (_bfd_m68hc12_elf_set_private_flags): Call it.
4708 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4709 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4710 report microcontroller incompatibilities (HC12 vs HCS12).
4711 (elf_backend_object_p): Update.
4712
b34976b6
AM
47132002-11-30 Alan Modra <amodra@bigpond.net.au>
4714
4715 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4716 (enum bfd_boolean, boolean): Delete.
4717 (bfd_boolean): Typedef to an int.
4718 (FALSE, TRUE): Define.
4719 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4720 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4721 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4722 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4723 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4724 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4725 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4726 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4727 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4728 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4729 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4730 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4731 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4732 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4733 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4734 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4735 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4736 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4737 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4738 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4739 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4740 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4741 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4742 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4743 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4744 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4745 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4746 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4747 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4748 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4749 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4750 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4751 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4752 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4753 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4754 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4755 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4756 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4757 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4758 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4759 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4760 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4761 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4762 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4763 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4764 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4765 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4766 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4767 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4768 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4769 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4770 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4771 of bfd_boolean vars with TRUE/FALSE. Formatting.
4772 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4773
947216bf
AM
47742002-11-28 Alan Modra <amodra@bigpond.net.au>
4775
4776 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4777 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4778 with Elf_Internal_Rela.
4779 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4780 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4781 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4782 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4783 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4784 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4785 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4786 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4787 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4788 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4789 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4790 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4791 throughout instead.
4792 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4793 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4794 Remove INLINE keyword.
4795 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4796 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4797 as a bfd_byte *.
4798 (elf_write_relocs): Consolidate REL and RELA code.
4799 (elf_slurp_reloc_table_from_section): Simplify REL code.
4800 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4801 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4802 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4803 RELA code.
4804 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4805 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4806 (elf_link_output_relocs): Likewise.
4807 (elf_reloc_link_order): Likewise.
4808 (elf_finish_pointer_linker_section): Likewise.
4809 (struct elf_link_sort_rela): Remove union.
4810 (elf_link_sort_cmp1): Update to suit.
4811 (elf_link_sort_cmp2): Here too.
4812 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4813 over-allocation for int_rels_per_ext_rel != 1 case.
4814 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4815 * elf32-i386.c: Likewise.
4816 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4817 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4818 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4819 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4820 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4821 elf64-sparc.c, elf64-x86-64.c: Likewise.
4822 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4823 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4824 bfd_elf32_swap_reloc_in.
4825
4826 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4827 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4828 (mips_elf64_swap_reloc_in): Zero r_addend.
4829 (mips_elf64_be_swap_reloc_in): Likewise.
4830 (mips_elf64_slurp_one_reloc_table): Simplify.
4831
4832 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4833 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4834 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4835
1448fa32
KK
48362002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4837
4838 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4839 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4840 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4841
73722af0
AM
48422002-11-26 Alan Modra <amodra@bigpond.net.au>
4843
4844 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4845 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4846 on a relocatable link. Comment typos.
4847 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4848 in the order they are declared. Clear elf_hash_value too.
4849 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4850 eh_info and tls_segment.
4851 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4852 sorted when discarding relocs by turning them into R_*_NONE.
4853
4854 * libbfd.c (warn_deprecated): Comment spelling.
4855 * po/SRC-POTFILES.in: Regenerate.
4856
7c25b72c
RH
48572002-11-21 Richard Henderson <rth@redhat.com>
4858
4859 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4860 arch's st_other bits when merging visibilities.
4861 (elf_link_output_extsym): Tidy clearing of visibility field.
4862
dc12c51f
AM
48632002-11-21 Alan Modra <amodra@bigpond.net.au>
4864
4865 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4866 (SWAP_OUT_RELOC_OFFSET): Define.
4867
963f13ec
AO
48682002-11-20 Alexandre Oliva <aoliva@redhat.com>
4869
4870 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4871 can_refcount is properly extended to the type of
4872 init_refcount.
4873
ee6423ed
AO
48742002-11-19 Alexandre Oliva <aoliva@redhat.com>
4875
4ffba85c
AO
4876 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4877 (_bfd_mips_elf_relocate_section): Use it.
4878
ee6423ed
AO
4879 * elfxx-mips.c (MNAME): New macro.
4880 (_bfd_mips_elf_check_relocs): Use it.
4881 (_bfd_mips_elf_discard_info): Likewise.
4882 (_bfd_mips_elf_final_link): Likewise.
4883
cdcf6e38
AM
48842002-11-19 Alan Modra <amodra@bigpond.net.au>
4885
4886 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4887 rel_hdr.sh_size too.
4888
93509525
KD
48892002-11-18 Klee Dienes <kdienes@apple.com>
4890
4891 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4892 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4893 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4894 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4895 Add dependencies for bfdwin.c, bfdio.c.
4896 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4897 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4898 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4899 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4900 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4901 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4902 bfd_get_size (moved from libbfd.c and bfd.c).
4903 * bfdwin.c New file. Contains _bfd_window_internal,
4904 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4905 libbfd.c and bfd.c).
4906 * po/SRC-POTFILES.in: Regenerate.
4907 * po/bfd.pot: Regenerate.
4908 * libbfd.h: Regenerate.
4909 * bfd-in2.h: Regenerate.
4910 * aclocal.m4: Regenerate.
4911 * Makefile.in: Regenerate.
4912 * configure: Regenerate.
4913
3ae41454
AM
49142002-11-18 Klee Dienes <kdienes@apple.com>
4915
4916 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4917
e514ac71
NC
49182002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4919
4920 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4921 jsr after a short jump.
4922 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4923
eddc4f81
KD
49242002-11-15 Klee Dienes <kdienes@apple.com>
4925
4926 * pef.c (bfd_pef_convert_architecture): Move declaration of
4927 ARCH_POWERPC and ARCH_M68K to the start of the function.
4928
51908eee
SS
49292002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4930
4931 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4932
3416d2e7
HPN
49332002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4934
4935 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4936 For bpo_gregs_section->contents, allocate _raw_size, not
4937 _cooked_size.
4938
b1c58715
AM
49392002-11-13 Klee Dienes <kdienes@apple.com>
4940
4941 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4942
077ca68b
L
49432002-11-13 H.J. Lu <hjl@gnu.org>
4944
4945 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4946
e84d6fca
AM
49472002-11-13 Klee Dienes <kdienes@apple.com>
4948 Alan Modra <amodra@bigpond.net.au>
4949
4950 * bfd.c (struct bfd_preserve): New.
4951 (bfd_preserve_save): New function.
4952 (bfd_preserve_restore): Ditto.
4953 (bfd_preserve_finish): Ditto.
4954 * bfd-in2.h: Regenerate.
4955 * mach-o.c: Formatting.
4956 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4957 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4958 (bfd_mach_o_core_p): Ditto.
4959 (bfd_mach_o_scan): Pass in mdata.
4960 * mach-o.h (bfd_mach_o_scan): Update prototype.
4961 * pef.c: Formatting.
4962 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4963 (bfd_pef_xlib_object_p): Ditto.
4964 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4965 * pef.h (bfd_pef_scan): Update prototype.
4966 * xsym.c: Formatting, K&R fixes.
4967 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4968 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4969 * xsym.h (bfd_sym_scan): Declare.
4970 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4971 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4972 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4973
cd24c222
NC
49742002-11-12 Nick Clifton <nickc@redhat.com>
4975
4976 * po/da.po: Updated Danish translation.
4977
99eb2ac8
AM
49782002-11-12 Alan Modra <amodra@bigpond.net.au>
4979
d6fe2dc1
AM
4980 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4981 relocatable link too.
4982 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4983 eh_frame and stab sections. Zap deleted relocs.
4984 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4985 (elf_bfd_discard_info): Run for relocatable link too.
4986 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4987 Handle ld -r case.
4988 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4989 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4990
126495ed
AM
4991 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4992 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4993 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4994 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4995 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4996 (struct elf_link_hash_table): Add eh_info.
4997 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4998 (_bfd_elf_discard_section_eh_frame): Update prototype.
4999 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5000 (_bfd_elf_write_section_eh_frame): Likewise.
5001 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5002 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5003 param. Get "hdr_info" from link hash table.
5004 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5005 header section from link hash table. Save header section to elf_tdata.
5006 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5007 header section from link hash table. Don't alloc hdr_info. Clear
5008 hdr_sec instead of setting "strip".
5009 (_bfd_elf_eh_frame_section_offset): Formatting.
5010 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5011 Get header section from link hash table.
5012 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5013 Get header section from link hash table.
5014 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5015 (get_program_header_size): Likewise.
5016 (_bfd_elf_section_offset): Formatting.
5017 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5018 section pointer in link hash table.
5019 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5020 and _bfd_elf_write_section_eh_frame calls. Update comment about
5021 eh_frame entries.
5022 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5023 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5024
5025 * po/SRC-POTFILES.in: Regenerate.
5026
99eb2ac8
AM
5027 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5028 relocs for discarded FDEs. Remove dead code.
5029 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5030 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5031 Tidy conditions under which stabs are edited. Formatting.
5032 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5033 from discarded relocs.
5034 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5035 section adjustments after testing magic values.
5036
7c319a27
AM
50372002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5038
5039 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5040 references to large plt symbols.
5041
a95a4550
AM
50422002-11-12 Klee Dienes <kdienes@apple.com>
5043
5044 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5045 looking for an unused section name.
5046
bc7eab72
KH
50472002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5048
5049 * coff-h8300.c: Fix formatting.
5050 * elf32-h8300.c: Likewise.
5051 * reloc16.c: Likewise.
5052
52585bb8
AM
50532002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5054
5055 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5056 section when dynamic section unused; _bfd_strip_section_from_output
5057 instead.
5058
9f632188
AM
50592002-11-08 Alan Modra <amodra@bigpond.net.au>
5060
207b304b
AM
5061 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5062 and sym_vec.
3b029f65 5063
9f632188
AM
5064 * dwarf2.c: Revert last change.
5065
ec4530b5
NC
50662002-11-07 Michal Ludvig <mludvig@suse.cz>
5067
9b5ecbd0 5068 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
5069 _bfd_dwarf2_find_nearest_line): Use
5070 bfd_simple_get_relocated_section_contents() instead of
5071 bfd_get_section_contents().
5072 * reloc.c (bfd_perform_relocation): Add sanity check.
5073 * simple.c (simple_get_relocated_section_contents): If the section
5074 does not have any relocs associated with it, just return the
5075 unadjusted contents.
5076
205cfeb0
HPN
50772002-11-07 Hans-Peter Nilsson <hp@axis.com>
5078
5079 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5080 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5081 contents, enabling for a non-DSO, for symbols defined in the
5082 program with --export-dynamic.
5083
87e226ce
AM
50842002-11-07 Alan Modra <amodra@bigpond.net.au>
5085
5086 * elf64-ppc.c: Comment typo fixes.
5087 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5088
235c4794
NC
50892002-11-07 Nick Clifton <nickc@redhat.com>
5090
5091 * po/da.po: Updated Danish translation.
5092
49179469
AO
50932002-11-06 Alexandre Oliva <aoliva@redhat.com>
5094
5095 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5096 exactly three internal relocs per external reloc. Set reloc_count
5097 to the external reloc count.
5098
246178f2
NC
50992002-11-06 Klee Dienes <kdienes@apple.com>
5100
3ae41454 5101 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
5102 Fix comment formatting.
5103
3af9a47b
NC
51042002-11-06 Klee Dienes <kdienes@apple.com>
5105
3ae41454 5106 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
5107 xsym.lo.
5108 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5109 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5110 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5111 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5112 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5113 sym.
3ae41454 5114 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
5115 * Makefile.in: Regenerate.
5116 * doc/Makefile.in: Regenerate.
3ae41454 5117 * bfd-in2.h: Regenerate.
3af9a47b
NC
5118 * xsym.c: New file. Contains support for the Apple/Metrowerks
5119 xSYM debugging format.
5120 * xsym.h: New file.
5121 * pef.c: New file. Contains support for the Apple Code Fragment
5122 Manager Preferred Executable Format
5123 * pef.h: New file.
5124 * pef-traceback.h: New file. Contains support for parsing PowerPC
5125 traceback tables as used by PEF executables (and perhaps other
5126 systems as well).
3ae41454 5127 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
5128 format.
5129 * mach-o.h: New file.
5130 * mach-o-target.c: New file. Declares the mach-o targets
5131 themselves. Included three times by mach-o.c; each time with a
5132 different set of macros set.
3ae41454 5133
b6821651 51342002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
5135
5136 * Makefile.am: Remove entries for elf32-qnx.[ch].
5137 * Makefile.in: Regenerate.
5138 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5139 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5140 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5141 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5142 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5143 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5144 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5145 * configure: Regenerate.
5146 * elf32-qnx.c: Remove.
5147 * elf32-qnx.h: Remove.
5148 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5149 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
5150 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5151 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
5152 * elf32-i386.c: Remove QNX extended bfd support.
5153 * elf32-ppc.c: Remove QNX extended bfd support.
5154 * elf32-sh.c: Remove QNX extended bfd support.
5155 * elfarm-nabi.c: Remove QNX extended bfd support.
5156 * targets.c: Remove qnx vectors.
5157 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5158 (elf_backend_is_contained_by_filepos): Remove.
5159 (elf_backend_copy_private_bfd_data_p): Remove.
5160 * po/SRC-POTFILES.in: Regenerate.
5161
b6821651
AM
51622002-11-06 David O'Brien <obrien@FreeBSD.org>
5163 Alan Modra <amodra@bigpond.net.au>
5164
5165 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5166 dynamic relocs against section symbols for the output section vma.
5167
51682002-11-05 Alan Modra <amodra@bigpond.net.au>
5169
5170 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5171 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5172
08f74004
AM
51732002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5174 Alan Modra <amodra@bigpond.net.au>
5175
5176 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5177 vectors in target_selvecs.
5178 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5179 in target_selvecs.
5180 (sh-*-netbsdelf*): Likewise.
5181 * configure.in (assocvecs): New variable. Handle assocvecs like
5182 selvecs.
5183 * configure: Regenerate.
5184 * format.c (bfd_check_format_matches): Store bfd_target pointers
5185 in matching_vector instead of target names. Select first target
5186 from bfd_associated_vector that matches a list of ambiguous targets.
5187 * targets.c (_bfd_associated_vector): New array.
5188 (bfd_associated_vector): New variable.
5189 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5190 * libbfd-in.h (bfd_associated_vector): Declare.
5191 * libbfd.h: Regenerate.
5192
89117aab
AM
51932002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5194
5195 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5196 non-NULL before dereferencing.
5197
5e9aae3e
KK
51982002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5199
5200 * vms.c (vms_object_p): Restore the start address when returning
5201 NULL.
5202
c97e73dd
AM
52032002-11-04 Alan Modra <amodra@bigpond.net.au>
5204 Hans-Peter Nilsson <hp@axis.com>
5205
5206 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5207 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5208 Set up a larger symshndxbuf, and write it out. Free it on
5209 exit rather than freeing symbuf twice. Correct section index
5210 on output section symbol loop.
5211 (elf_link_output_sym): Accumulate symbol extension section
5212 indices, reallocating symshndxbuf rather than writing it out.
5213 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5214 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5215 Use bfd_zalloc to clear i_shdrp[0] too.
5216
3463048e
SC
52172002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5218
5219 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5220 _raw_size of cranges section if _cooked_size not yet set.
5221
63a23799
HPN
52222002-11-03 Hans-Peter Nilsson <hp@axis.com>
5223
5224 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5225 for bfd_elf32_swap_symbol_out.
5226
e68cc12e
DB
52272002-10-31 David O'Brien <obrien@FreeBSD.org>
5228
5229 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5230 signed and unsigned in comparison.
5231
db4b6d01
DJ
52322002-10-30 Daniel Jacobowitz <drow@mvista.com>
5233
5234 * coffcode.h: Remove extraneous '\'.
5235
840f0243
L
52362002-10-28 H.J. Lu <hjl@gnu.org>
5237
5238 * Makefile.am (targets.lo): Depend on Makefile instead of
5239 config.status.
5240 (archures.lo): Likewise.
5241 * Makefile.in: Regenerated.
5242
05a7e2db
JT
52432002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5244
5245 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5246 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5247 targ_selvecs.
5248
a0087177
JW
52492002-10-25 Jim Wilson <wilson@redhat.com>
5250
5251 * elf64-sh64.c (sh_elf64_relocate_section): Call
5252 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5253 of SHF_MERGE section.
5254
8718ac9c
HPN
52552002-10-25 Hans-Peter Nilsson <hp@axis.com>
5256
5257 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5258
d45913a0
DA
52592002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5260
5261 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5262 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5263 unsigned int.
5264 (NAME(aout,final_link)): Cast enum used in assignment.
5265 (aout_link_write_symbols): Cast enums in comparisons, int values to
5266 boolean, enums in assignments to int.
5267 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5268 (aout_link_input_section_ext): Likewise. Cast enums used in
5269 comparisons with unsigned ints.
d45913a0
DA
5270 (aout_link_reloc_link_order): Cast enum to int in assignment.
5271 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5272 calls to char *.
5273 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5274 assignment.
5275 * bfd-in2.h (bfd_set_section_vma): Likewise.
5276 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5277 * binary.c (bfd_alloc): Cast enum to long.
5278 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5279 * dwarf2.c (read_abbrevs): Add casts to enum types.
5280 (read_attribute_value): Likewise.
5281 (arange_add): Cast result of bfd_zalloc call.
5282 (comp_unit_contains_address): Return true and false.
5283 (comp_unit_find_nearest_line): Cast return to boolean.
5284 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5285 * gen-aout.c: define macro '_' if not defined.
5286 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5287 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5288 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5289 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5290 (bfd_generic_is_local_label_name): Cast return to boolean.
5291 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5292 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5293 struct bfd_hash_entry *.
5294 (_bfd_generic_link_hash_newfunc): likewise.
5295 (_bfd_generic_final_link): Cast enum to unsigned int.
5296 * merge.c (sec_merge_emit): Cast return to boolean.
5297 (merge_strings): Add casts to const unsigned char *.
5298 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5299 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5300 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5301 to struct bfd_hash_entry *.
d45913a0
DA
5302 (bfd_set_section_content): Add cast to PTR in comparison.
5303 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5304 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5305 simple_dummy_unattached_reloc,
5306 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5307 function definitions.
5308 * srec.c (S3Forced): Initialize to false.
5309 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5310 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5311 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5312 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5313 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5314 comparisons.
5315
475c2a7e
JJ
53162002-10-23 Jakub Jelinek <jakub@redhat.com>
5317
5318 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5319 relocs into shared lib non-allocated reloc sections.
5320
e82ce529
AM
53212002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5322
5323 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5324 sorted even when given an out-of-order line sequence.
5325 (lookup_address_in_line_info_table): When an exact VMA match is
5326 not found, return line information with the closest VMA.
5327
f2482cb2
NC
53282002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5329
5330 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5331 HPUX 11.00 patch PHSS_26559.
5332
c1fd6598
AO
53332002-10-22 Alexandre Oliva <aoliva@redhat.com>
5334
5335 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5336 the options section into a separate section unless IRIX 6
5337 compatibility is enabled.
5338
033fd5f9
AO
53392002-10-22 Alexandre Oliva <aoliva@redhat.com>
5340
5341 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5342 into arrays.
5343 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5344 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5345 into account.
5346 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5347 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5348
ef485c01
AM
53492002-10-21 Graeme Peterson <gp@qnx.com>
5350
5351 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5352
b50afec9
AM
53532002-10-21 Alan Modra <amodra@bigpond.net.au>
5354
5355 * targets.c (bfd_target_list): Don't return the default target twice.
5356
5fe39cae
AM
53572002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5358
5359 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5360 perror with bfd_perror.
5361
5d603aa9
L
53622002-10-19 H.J. Lu <hjl@gnu.org>
5363
5364 * elflink.h (elf_link_add_object_symbols): Correctly handle
5365 DT_RPATH and DT_RUNPATH.
5366
e377ab71
MK
53672002-10-19 Mark Kettenis <kettenis@gnu.org>
5368
5369 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5370
0d09fec6
DC
53712002-10-17 Denis Chertykov <denisc@overta.ru>
5372
5373 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5374 for ip2k port.
5375
acf8aed4
AM
53762002-10-17 Alan Modra <amodra@bigpond.net.au>
5377
5378 * elfxx-target.h (USE_REL): Don't define as 1.
5379 * elf32-arm.h (USE_REL): Provide a default define of 0.
5380 Use #if rather than #ifdef when testing USE_REL.
5381 * elf32-m32r.c: Likewise.
5382
5383 * elf32-arc.c (USE_REL): Define as 1.
5384 * elf32-d10v.c (USE_REL): Likewise.
5385 * elf32-m32r.c (USE_REL): Likewise.
5386 * elf32-m68hc11.c (USE_REL): Likewise.
5387 * elf32-m68hc12.c (USE_REL): Likewise.
5388 * elf32-or32.c (USE_REL): Likewise.
5389 * elfarm-nabi.c (USE_REL): Likewise.
5390
f52d1d64
JJ
53912002-10-16 Jakub Jelinek <jakub@redhat.com>
5392
5393 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5394 (s390x-*-linux*): Add targ_selvecs.
5395
2bc3c89a
AM
53962002-10-16 Alan Modra <amodra@bigpond.net.au>
5397
5398 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5399 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5400 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5401 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5402 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5403 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5404 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5405 (SOURCE_HFILES): Add elf32-qnx.h.
5406 (BUILD_HFILES): Add bfdver.h.
5407 Run "make dep-am".
5408 * Makefile.in: Regenerate.
5409 * configure.in Update bfd vector dependencies.
5410 * configure: Regenerate.
5411 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5412 * elf32-i386qnx.c: Likewise.
5413 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5414 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5415 * elf32-sh-lin.c: Likewise.
5416 * elf32-shqnx.c: Likewise.
5417 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5418 * elf32-sh64-nbsd.c: Likewise.
5419 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5420 * elf64-sh64-nbsd.c: Likewise.
5421 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5422 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5423 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5424 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5425 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5426 (elf_backend_is_contained_by_filepos): Likewise.
5427 (elf_backend_copy_private_bfd_data_p): Likewise.
5428 Globalize and move functions to..
5429 * elf32-qnx.c: ..here. New file.
5430 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5431 emit target vectors when INCLUDE_SHMEDIA.
5432 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5433 end of file.
5434 * elf64-sh64.c: Remove ELF_ARCH test.
5435 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5436 * po/BLD-POTFILES.in: Regenerate.
5437 * po/SRC-POTFILES.in: Regenerate.
5438
90c9df85
AM
54392002-10-16 Alan Modra <amodra@bigpond.net.au>
5440
366f2964
AM
5441 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5442 loaded with --just-symbols.
5443
90c9df85
AM
5444 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5445 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5446 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5447 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5448
2238051f
RH
54492002-10-15 Richard Henderson <rth@redhat.com>
5450
5451 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5452 (BFD64_BACKENDS_CFILES): Likewise.
5453 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5454 * elf64-alpha-fbsd.c: Remove file, move code ...
5455 * elf64-alpha.c: ... here.
5456 * Makefile.in, configure: Rebuild.
5457
64e04ecd
RH
54582002-10-14 Richard Henderson <rth@redhat.com>
5459
5460 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5461 VALUE, not ADDEND.
5462
396a6083
SC
54632002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5464
5465 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5466 datalabel_got_offset with union of datalabel_got
5467 offset and refcount.
5468 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5469 (allocate_dynrelocs): Delete unnecessary code for
5470 STT_DATALABEL type. Create entry in got for
5471 datalabel version of symbol if datalabel_got.refcount > 0.
5472 (sh_elf_relocate_section): Use datalabel_got union.
5473 (sh_elf_gc_sweep_hook): Pull common code to initialize
5474 h and eh out of switch statement. Declare seen_stt_datalabel.
5475 Initialize it. Decrement datalabel_got.refcount for
5476 got relocs when seen_stt_datalabel is true.
5477 Decrement local_got_refcounts entry for datalabel got relocs
5478 of local symbols.
5479 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5480 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5481 Initialize it. When seen_stt_datalabel is true, increment
5482 datalabel_got refcount rather than got.refcount.
5483 (sh_elf_finish_dynamic_symbol): Create relocs to
5484 initialize got entry for datalabel version of symbol.
5485
6a0735ef
AM
54862002-10-14 Alan Modra <amodra@bigpond.net.au>
5487
5488 * Makefile.am: Run "make dep-am".
5489 (BFD_H_FILES): Remove version.h.
5490 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5491 * version.h: ..to here.
5492 * configure.in (bfd_version_date): Remove.
5493 (AC_OUTPUT): Make bfdver.h from version.h.
5494 * bfd.c: #include "bfdver.h".
5495 * vms-hdr.c: Likewise.
5496 * Makefile.in: Regenerate.
5497 * bfd-in2.h: Regenerate.
5498 * configure: Regenerate.
5499 * po/SRC-POTFILES.in: Regenerate.
5500
686e4055
AM
55012002-10-14 Alan Modra <amodra@bigpond.net.au>
5502
5503 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5504 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5505 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5506 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5507 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5508 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5509 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5510 bfd_mach_ip2022, bfd_mach_ip2022ext,
5511 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5512 * bfd-in2.h: Regenerate.
5513
019dca2b
KK
55142002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5515
5516 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5517 endian vector to targ_selvecs.
5518
bce03d3d
AO
55192002-10-13 Alexandre Oliva <aoliva@redhat.com>
5520
5521 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5522 save_addend argument. Don't apply the 32-bit mask to a
5523 GPREL32 value if it's to be used in another relocation. Don't
5524 use forced-check computation of local_p to decide whether to
5525 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5526 of the addend of a non-in-place GPREL16 relocation.
5527 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5528 mips_elf_calculate_relocation().
5529
9b691193
SC
55302002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5531
5532 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5533 with symbols in other sections if we relaxed something; the sections
5534 output offsets must be re-computed before.
5535
1f4c5b47
SC
55362002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5537
5538 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5539 handling to use Elf_Internal_Sym.
5540 (m68hc11_elf_relax_delete_bytes): Likewise.
5541
5dc97655
KK
55422002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5543
5544 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5545 sh_elf_object_p, dtpoff_base): New functions.
5546 (sh_elf_howto_table): Add TLS relocs.
5547 (sh_reloc_map): Likewise.
5548 (sh_elf_info_to_howto): Support TLS relocs.
5549 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5550 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5551 New macros.
5552 (sh_elf_obj_tdata): New.
5553 (elf_sh_link_hash_table): Add tls_ldm_got.
5554 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5555 (allocate_dynrelocs): Support TLS relocs.
5556 (sh_elf_size_dynamic_sections): Likewise.
5557 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5558 .rela.got section when found already. Return false after printing
5559 error about unresolvable relocation.
5560 (sh_elf_gc_sweep_hook): Support TLS relocs.
5561 (sh_elf_check_relocs): Likewise.
5562 (sh_elf_finish_dynamic_symbol): Likewise.
5563 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5564 * reloc.c: Add SH TLS relocs.
5565 * bfd-in2.h, libbfd.h: Regenerate.
5566
6a0735ef
AM
55672002-10-11 Daniel Jacobowitz <drow@mvista.com>
5568
5569 * Makefile.in: Regenerated.
5570
af39267e
DJ
55712002-10-11 Daniel Jacobowitz <drow@mvista.com>
5572
5573 * Makefile.am: Run dep-am.
6a0735ef 5574 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5575 (BFD32_LIBS): Add simple.lo.
5576 (BFD32_LIBS_CFILES): Add simple.c.
5577 * Makefile.in: Regenerated.
5578 * bfd-in2.h: Regenerated.
5579 * simple.c: New file.
5580
0be617ce
AM
55812002-10-11 Alan Modra <amodra@bigpond.net.au>
5582
14a793b2
AM
5583 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5584 (record_thumb_to_arm_glue): Likewise.
5585 * ecoff.c (ecoff_link_add_externals): Likewise.
5586 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5587 (record_thumb_to_arm_glue): Likewise.
5588 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5589 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5590 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5591 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5592 * elf64-ppc.c (func_desc_adjust): Likewise.
5593 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5594 (sh64_elf64_create_dynamic_sections): Likewise.
5595 * elflink.c (_bfd_elf_create_got_section): Likewise.
5596 (_bfd_elf_create_dynamic_sections): Likewise.
5597 (_bfd_elf_create_linker_section): Likewise.
5598 * elflink.h (elf_add_default_symbol): Likewise.
5599 (elf_link_create_dynamic_sections): Likewise.
5600 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5601 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5602 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5603 (_bfd_mips_elf_add_symbol_hook): Likewise.
5604 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5605 * linker.c (generic_link_add_symbol_list): Likewise.
5606 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5607
5608 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5609
0be617ce 5610 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5611 completely removed. Correct local sym adjustment.
0be617ce 5612
0a4ef3f4
SC
56132002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5614
5615 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5616 Correct mistake in calculation of address of .got.
5617 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5618 elf_sh64_pic_plt_entry_le): Likewise.
5619
efacd36e
SC
56202002-10-09 Richard Shann <richard.shann@superh.com>
5621 Stephen Clarke <stephen.clarke@superh.com>
5622
5623 * Makefile.am: Add entries for elf32-sh64-lin.c and
5624 elf64-sh64-lin.c. Regenerate.
5625 * Makefile.in: Regenerate.
9b5ecbd0 5626 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5627 to use sh64 vectors rather than sh vectors.
5628 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5629 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5630 * configure: Regenerate.
5631 * elf32-sh64-lin.c: New file.
5632 * elf64-sh64-lin.c: New file.
5633 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5634 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5635
299bf759
L
56362002-10-08 H.J. Lu <hjl@gnu.org>
5637
5638 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5639 IE->LE transition for R_386_TLS_IE.
5640
51020317
AM
56412002-10-08 Alan Modra <amodra@bigpond.net.au>
5642
5643 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5644
a8fcf378
NC
56452002-10-07 Mark Elbrecht <snowball3@softhome.net>
5646
51020317
AM
5647 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5648 sections.
a8fcf378 5649
a16d5acb
AM
56502002-10-07 Alan Modra <amodra@bigpond.net.au>
5651
a6b511bd
AM
5652 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5653 code.
5654
a16d5acb
AM
5655 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5656
7c4a37eb
AM
56572002-10-06 Alan Modra <amodra@bigpond.net.au>
5658
5659 * opncls.c: Formatting.
5660 (_bfd_new_bfd): Use a smaller section hash table.
5661
7c4ca42d
AO
56622002-10-05 Alexandre Oliva <aoliva@redhat.com>
5663
5664 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5665 of the other two relocations packed with a REL32 to NONE.
5666
4989d792
SC
56672002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5668
5669 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5670 (sh_elf_link_hash_newfunc): Initialize it.
5671 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5672 to got.refcount for symbols that are forced local or when
5673 we have direct got refs.
5674 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5675 to correctly adjust got.refcount and plt.refcount.
5676 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5677 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5678
7c445aa3
JJ
56792002-10-01 Jakub Jelinek <jakub@redhat.com>
5680
5681 * elf32-i386.c (elf_i386_relocate_section): Fix
5682 movl foo@indntpoff, %eax IE->LE transition.
5683
abcf1d52
JJ
56842002-10-01 Jakub Jelinek <jakub@redhat.com>
5685
5686 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5687 sequence and its transitions.
5688
a45bb67d
JJ
56892002-10-01 Jakub Jelinek <jakub@redhat.com>
5690
5691 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5692 to st_value + addend in non-code sections.
5693 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5694 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5695
00707a0e 56962002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5697 Ken Raeburn <raeburn@cygnus.com>
5698 Aldy Hernandez <aldyh@redhat.com>
5699 Eric Christopher <echristo@redhat.com>
5700 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5701
5702 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5703 (bfd_mach_mips5500): New.
5704 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5705 (arch_info_struct): Add corresponding entries here.
5706 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5707 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5708 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5709 bfd_mach_mips5400 and bfd_mach_mips5500.
5710 (_bfd_mips_elf_mach_extends_p): New function.
5711 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5712 the EF_MIPS_MACH flags.
5713 * bfd-in2.h: Regenerate.
5714
624f0b25
JT
57152002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5716
5717 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5718 .got sections.
5719
b89fe0ee
AM
57202002-09-28 Alan Modra <amodra@bigpond.net.au>
5721
5722 * elf.c (map_sections_to_segments): Correct test for start of
5723 writable section in the same page as end of read-only section.
5724
b29635ba
JT
57252002-09-27 Matt Thomas <matt@3am-software.com>
5726
5727 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5728 local_got_refcounts usage. Remove allocation of got slot.
5729 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5730 Remove de-allocation of got slot.
5731 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5732 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5733 sections to be GC'ed.
5734 (elf_vax_instantiate_got_entries): New function.
5735 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5736 tests that are now handled by elf_vax_instantiate_got_entries.
5737 Assert GOT entry falls within .got section size. Remove redundant
5738 comparisions. Fix comments.
5739
bffbf940
JJ
57402002-09-27 Jakub Jelinek <jakub@redhat.com>
5741
5742 * reloc.c: Add x86-64 TLS relocs.
5743 * bfd-in2.h, libbfd.h: Rebuilt.
5744 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5745 relocs. Add TLS relocs.
5746 (x86_64_reloc_map): Add TLS relocs.
5747 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5748 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5749 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5750 (elf64_x86_64_hash_entry): Define.
5751 (struct elf64_x86_64_obj_tdata): New.
5752 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5753 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5754 (link_hash_newfunc): Initialize tls_type.
5755 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5756 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5757 (elf64_x86_64_mkobject): New.
5758 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5759 (elf64_x86_64_tls_transition): New.
5760 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5761 Handle TLS relocs.
5762 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5763 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5764 (elf64_x86_64_size_dynamic_sections): Likewise.
5765 (dtpoff_base, tpoff): New.
5766 (elf64_x86_64_relocate_section): Handle TLS relocs.
5767 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5768 entries.
5769 (bfd_elf64_mkobject): Define.
5770
5771 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5772 DF_STATIC_TLS if shared.
5773
14366460
TS
57742002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5775
5776 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5777 empty relocation sections.
5778
9f951329
AM
57792002-09-26 Alan Modra <amodra@bigpond.net.au>
5780
5781 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5782 (ppc64_elf_build_stubs): Build them here instead.
5783
6b3ac709
JJ
57842002-09-24 Jakub Jelinek <jakub@redhat.com>
5785
5786 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5787 addend into r_addend, not *r_offset.
5788 (elf32_sparc_finish_dynamic_symbol): Likewise.
5789 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5790 R_SPARC_RELATIVE's r_offset.
5791
e2f6d277
NC
57922002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5793
5794 * dwarf2.c (decode_line_info): Update to correctly decode
5795 the (non-standard DWARF2) out-of-order address sequences
5796 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5797
f3961b2b
DD
57982002-09-23 Mark Elbrecht <snowball3@softhome.net>
5799
5800 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5801
ad34bc37
AM
58022002-09-23 Alan Modra <amodra@bigpond.net.au>
5803
5804 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5805 for discarded FDEs. Remove redundant assignment.
5806 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5807
82988bff
L
58082002-09-22 H.J. Lu <hjl@gnu.org>
5809
5810 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5811 the relocation count between different .reloc sections.
5812
5ad8645c
AM
58132002-09-21 Alan Modra <amodra@bigpond.net.au>
5814
5f819128
AM
5815 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5816 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5817 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5818 R_PPC_EMB_RELSDA.
5819
5ad8645c
AM
5820 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5821 unsigned. Move "symcount" assignment out of loop.
5822 * Makefile.am: Run "make dep-am".
5823 * Makefile.in: Regenerate.
5824 * configure: Regenerate.
5825 * po/SRC-POTFILES.in: Regnerate.
5826
75936555
NC
58272002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5828
5829 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5830 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5831 (e.g. IRIX64).
5832
2243deae
L
58332002-09-19 Jakub Jelinek <jakub@redhat.com>
5834
5835 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5836 even if generating R_PPC_RELATIVE reloc.
5837 (ppc_elf_relocate_section): Make sure relocation is performed
5838 if skip == -2. Clear memory at r_offset when creating dynamic
5839 relocation.
5840
37e55690
JJ
58412002-09-19 Jakub Jelinek <jakub@redhat.com>
5842
5843 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5844 BFD_RELOC_386_TLS_GOTIE): Add.
5845 * bfd-in2.h, libbfd.h: Rebuilt.
5846 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5847 and R_386_TLS_GOTIE.
5848 (elf_i386_reloc_type_lookup): Handle it.
5849 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5850 char instead of enum, change GOT_* into defines.
5851 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5852 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5853 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5854 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5855 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5856 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5857 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5858 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5859 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5860 tls_type is GOT_TLS_IE_BOTH.
5861 (elf_i386_size_dynamic_sections): Likewise.
5862 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5863 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5864 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5865 all 4 GOT_TLS_* TLS types.
5866
8e67855b
NC
58672002-09-19 Nick Clifton <nickc@redhat.com>
5868
5869 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5870 follow indirect links.
5871
1c59ba3f
NC
58722002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5873
5874 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5875 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5876 on 64 bit machines.
5877 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5878 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5879 ECOFF information: 'ioptMax' refers to the actual *size*
5880 of the optimization symtab, not the number of entries.
1c59ba3f 5881
9d7404b7
NC
58822002-09-19 Daniel Jacobowitz <drow@mvista.com>
5883
5884 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5885 ELF_LINK_HASH_NEEDS_PLT logic.
5886
05a487dc
DJ
58872002-09-18 Daniel Jacobowitz <drow@mvista.com>
5888
5889 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5890 correct relocation count.
5891
1f70368c
DJ
58922002-09-17 Daniel Jacobowitz <drow@mvista.com>
5893
5894 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5895 * bfd.c (struct _bfd): Add dynsymcount.
5896 * bfd-in2.h: Regenerated.
5897 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5898 abfd->dynsymcount.
5899 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5900 for overflow.
5901
51020317 59022002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5903
5904 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5905 (mips_elf64_final_gp): Don't make up gp value.
5906 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5907 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5908 .MIPS.options/.options section.
5909
290062cc
DB
59102002-09-17 David O'Brien <obrien@FreeBSD.org>
5911
5912 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5913 It is benign for FreeBSD < 4.1. Minor reformatting.
5914 * elf64-alpha-fbsd.c: Likewise.
5915
c5c1f40c
JJ
59162002-09-17 Jakub Jelinek <jakub@redhat.com>
5917
ca1eb0ba
JJ
5918 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5919 addend.
c5c1f40c 5920
562ace6b
AM
59212002-09-17 Alan Modra <amodra@bigpond.net.au>
5922
5923 * elf64-alpha.c (alpha_elf_size_info): Make static.
5924
5af6ead6
AM
59252002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5926
5927 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5928 * cpu-tic4x.c: Ditto.
5929
cb9512fc
TS
59302002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5931
5932 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5933 duplicate define.
5934
4ada7262
DB
59352002-09-16 Bruno Haible <bruno@clisp.org>
5936
5937 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5938 by a target variant implementation.
5939 * elf64-alpha.c: Likewise.
5940 * elf32-i386-fbsd.c: New file.
5941 * elf64-alpha-fbsd.c: New file.
5942 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5943 bfd_elf64_alpha_freebsd_vec.
5944 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5945 bfd_elf64_alpha_freebsd_vec.
5946 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5947 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5948 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5949 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5950 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5951 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5952 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5953
6a30718d
JJ
59542002-09-12 Jakub Jelinek <jakub@redhat.com>
5955
5956 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5957 NULL.
5958 (elf_i386_relocate_section): Return false after printing error about
5959 unresolvable relocation.
5960
6cf9e9fe
NC
59612002-09-12 Nick Clifton <nickc@redhat.com>
5962
5963 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5964 R_ARM_THM_PC11.
5965
10f469bf
DJ
59662002-09-11 Jeffrey Law <law@redhat.com>
5967
5968 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5969
dc43ada5
NC
59702002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5971
5972 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5973 line_ptr before deciding we've found a symbol.
5974
e09f4395
NC
59752002-09-11 Nick Clifton <nickc@redhat.com>
5976
5977 * po/da.po: New Danish translation file.
5978 * configure.in (LINGUAS): Add 'da'.
5979 * configure: Regenerate.
5980
b3018b5f
NC
59812002-09-10 Michael Snyder <msnyder@redhat.com>
5982
5983 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5984 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5985 do_sections64, depending on corefile (32-bit or 64-bit).
5986
2f21f25e
RH
59872002-09-09 Richard Henderson <rth@redhat.com>
5988
5989 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5990 and PCREL21F like PCREL21B.
5991
28b94e7c
KB
59922002-09-04 Kevin Buettner <kevinb@redhat.com>
5993
51020317
AM
5994 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5995 vector.
28b94e7c 5996
5cec6941
NC
59972002-09-02 Nick Clifton <nickc@redhat.com>
5998
5999 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6000 names instead of cryptically overloaded bfd_reloc error
6001 codes.
6002 (v850_elf_relocate_section): Likewise.
6003 (v850_elf_relax_section): Replace caching of external symbols
6004 with caching of internal symbols obtained from calling
6005 bfd_elf_get_elf_syms().
51020317 6006 Fixup problems with freeing cached allocated memory blocks.
5cec6941 6007
3b77b1d5
AM
60082002-09-02 Alan Modra <amodra@bigpond.net.au>
6009
638524b5
AM
6010 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6011 (bfd_pj_arch): Use bfd_default_scan.
6012 * cpu-v850.c (scan): Remove.
6013 (N): Use bfd_default_scan.
6014 * cpu-z8k.c (scan_mach): Remove.
6015 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6016 first. Use bfd_default_scan.
6017
250d94fd
AM
6018 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6019 bfd_mach constants.
6020 (ecoff_get_magic): Likewise.
6021 * elf32-v850.c (v850_elf_object_p): Likewise.
6022 (v850_elf_final_write_processing): Likewise.
6023 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6024 (MY(write_object_contents)): Likewise.
6025 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6026 * coffcode.h (coff_write_object_contents): Likewise.
6027 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6028 Remove unnecessary "machine" assignments.
6029 (coff_write_relocs): Test for the absolute section sym by testing
6030 section and flags.
6031
3b77b1d5
AM
6032 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6033 and bfd_mach_i386_i386_intel_syntax.
250d94fd 6034 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 6035
e5b45b83
DA
60362002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6037
6038 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6039 * bfd-in2.h (align_power): Likewise.
6040
37f45cf8
AM
60412002-08-30 Alan Modra <amodra@bigpond.net.au>
6042
6043 * Makefile.am: Run "make dep-am".
6044 * Makefile.in: Regenerate.
6045
6046 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6047 * cpu-powerpc.c (powerpc_compatible): Likewise.
6048 * cpu-rs6000.c (rs6000_compatible): Likewise.
6049
86aba9db
NC
60502002-08-28 Catherine Moore <clm@redhat.com>
6051
9b5ecbd0 6052 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
6053 (v850-elf-reloc): Don't resolve pc relative relocs.
6054 (v850_elf_ignore_reloc): New routine.
6055 (v850_elf_final_link_relocate): Handle new relocs.
6056 (v850_elf_relax_delete_bytes ): New routine.
6057 (v850_elf_relax_section): New routine.
6058 (bfd_elf32_bfd_relax_section): Define.
6059 (HOWTO): New entries for new relocs.
6060 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6061 (BFD_RELOC_V850_LONGJUMP): New reloc.
6062 (BFD_RELOC_V850_ALIGN): New reloc.
6063 * archures.c: Remove redundant v850ea architecture.
6064 * cpu-v850.c: Remove redundant v850ea support.
6065 * libbfd.h: Regenerate.
6066 * bfd-in2.h: Regenerated.
6067
026df7c5
NC
60682002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6069
6070 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6071 * configure.in: Add tic4x_coff vector files.
6072 * configure: Regenerate.
6073 * Makefile.am: Add tic4x target.
6074 * Makefile.in: Regenerate.
6075
60762002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6077
6078 * archures.c: Add the BFD arch type tic4x.
6079 * bfd-in.h: Add BFD_IN_MEMORY flag.
6080 * coff-tic4x.c: New file.
6081 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6082 * cpu-tic4x.c: New file.
6083 * targets.c: Added tic4x- in list of xvecs.
6084 * ticoff.h: New file.
6085 * bfd-in2.h: Regenerate.
6086
88f7bcd5
NC
60872002-08-27 Adam Nemet <anemet@lnxw.com>
6088
6089 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6090 bit of DT_INIT and DT_FINI for Thumb functions.
6091
c8e48751
AM
60922002-08-26 Alan Modra <amodra@bigpond.net.au>
6093
6094 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6095
2846975a
AM
60962002-08-26 Alan Modra <amodra@bigpond.net.au>
6097
6098 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6099
067653c5
AM
61002002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6101
6102 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6103 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6104 Likewise.
6105 (struct elf_sh_pcrel_relocs_copied): Removed.
6106 (struct elf_sh_dyn_relocs): New.
6107 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6108 field with dyn_relocs.
6109 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6110 sections and sym_sec.
6111 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6112 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6113 (sh_elf_create_dynamic_sections): Use create_got_section instead
6114 of _bfd_elf_create_got_section.
6115 (sh_elf_check_relocs): Likewise.
6116 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6117 sections.
6118 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6119 sh_elf_relocate_section, sh_elf_check_relocs,
6120 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6121 Likewise.
6122 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6123 dynamic relocations and avoiding the copy relocation when we
6124 didn't find any dynamic relocations in the section which has
6125 contents or is read-only.
6126 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6127 (sh_elf_size_dynamic_sections): Don't reset the size of
6128 .rela.got section even if dynamic_sections_created flag is off.
6129 Don't use sh_elf_discard_copies. Scan all input bfd and use
6130 allocate_dynrelocs. Call readonly_dynrelocs to determine
6131 whether we need DT_TEXTREL.
6132 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6133 whether the symbol was never referred to.
6134 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6135 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6136 (sh_elf_check_relocs): Call create_got_section if the short-cut
6137 to .got is null. Increment reference counters only instead of
6138 allocating space on dynamic sections here. Don't conditionalize
6139 uninitialized got.offset value when marking the symbol as a
6140 global offset table entry. Keep relocations for symbols satisfied
6141 by a dynamic library to avoid copy relocations for the symbol.
6142 Set dynobj field of an elf hash table if needed.
6143 (sh_elf_finish_dynamic_sections): Handle null section pointer
6144 correctly.
6145 (elf_backend_copy_indirect_symbol): Defined.
6146 (elf_backend_can_refcount): Defined.
6147
7e326afc
NC
61482002-08-23 Nick Clifton <nickc@redhat.com>
6149
6150 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6151 previous change. Add comment explaining why.
6152
c8614e8e
AM
61532002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6154
6155 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6156 contents of .got.plt[2] to tr0, not address of .got.plt.
6157 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6158 patching absolute plt entry. For shmedia plt entry, set bottom bit
6159 of branch to plt0 as this is a branch to an shmedia instruction.
6160 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6161 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6162 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6163 branch to plt0.
6164 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6165 patching absolute plt entry. For shmedia plt entry, branch to
6166 plt0 is now ptrel, so use relative offset. Set bottom bit of
6167 branch target as it is a branch to an shmedia instruction.
6168
3b587c71
AM
61692002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6170 Richard Shann <richard.shann@superh.com>
6171
6172 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6173 value if .init is an SHmedia function. Similarly for DT_FINI.
6174 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 6175
957dcaa8
AM
61762002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6177
3b587c71 6178 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 6179 dynamic section.
3b587c71 6180 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 6181
a4263c47
NC
61822002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6183
6184 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 6185 byte read when reading the return address register column.
a4263c47 6186
db4ed121
NC
61872002-08-22 Nick Clifton <nickc@redhat.com>
6188
6189 * config.bfd: Add powepc64-*-*bsd* target.
6190
ed71e111
NC
61912002-08-22 Graeme Peterson <gp@qnx.com>
6192
6193 * Makefile.am: Add entries for elf32-shqnx.c
6194 * Makefile.in: Regenerate.
6195 * config.bfd: Add support sh-*-nto* target.
6196 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6197 * configure: Regenerate.
6198 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6199 * elf32-sh.c: Do not include elf32-target.h if
6200 ELF32_SH_C_INCLUDED is defined.
6201 * elf32-shqnx.c: New file: Support for QNX.
6202 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6203
0ab72ee2
NC
62042002-08-22 Nick Clifton <nickc@redhat.com>
6205
75c83283
NC
6206 * po/tr.po: Updated Turkish translation.
6207
0ab72ee2
NC
6208 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6209 symbols are not read.
6210
56780f18
AM
62112002-08-22 Alan Modra <amodra@bigpond.net.au>
6212
6213 * elf32-m68hc11.c: Formatting fixes.
6214 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6215 * elf32-m68hc12.c: Formatting fixes.
6216 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6217
b48fa14c
AM
62182002-08-22 Alan Modra <amodra@bigpond.net.au>
6219
a7c71b0c
AM
6220 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6221 SEC_DATA.
6222 (pmac_xcoff_vec): Likewise.
6223 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6224 (aix5coff64_vec): Likewise.
6225
56780f18
AM
62262002-08-22 Alan Modra <amodra@bigpond.net.au>
6227
b48fa14c
AM
6228 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6229 param to elf_backend_copy_indirect_symbol.
6230 (_bfd_elf_link_hash_copy_indirect): Likewise.
6231 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6232 calls to copy_indirect_symbol.
6233 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6234 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6235 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6236 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6237 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6238 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6239 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6240 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6241 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6242 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6243 test refcounts for "used" values.
6244
8c2ab17d
AM
62452002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6246
6247 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6248 argument declaration.
6249
d62b1198 62502002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
6251
6252 * archures.c (bfd_mach_ppc_e500): Added.
6253 * bfd-in2.h: Rebuilt.
d62b1198
EZ
6254 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6255
9f88ba09
AM
62562002-08-19 Alan Modra <amodra@bigpond.net.au>
6257
6258 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6259
df622259
AC
62602002-08-17 Andrew Cagney <ac131313@redhat.com>
6261
6262 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6263 `bfd_byte'.
df622259 6264
44c410de
SC
62652002-08-17 Stan Cox <scox@redhat.com>
6266
6267 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6268 IRIX 6 segment layout for NEWABI.
6269
4972a8e9
SC
62702002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6271
1049f94e 6272 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6273 symbols when looking for section referred to by a relocation.
1049f94e 6274 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6275
c5cd6d62
AM
62762002-08-15 Alan Modra <amodra@bigpond.net.au>
6277
6278 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6279
0741c7be
HPN
62802002-08-15 Hans-Peter Nilsson <hp@axis.com>
6281
6282 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6283 missing check for whether the symbol is referenced by DSO before
6284 unexporting it as an unneeded dynamic symbol.
6285
e8d5d179
L
62862002-08-14 H.J. Lu <hjl@gnu.org>
6287
6288 * libbfd.h: Regenerate.
6289
e9229007
L
62902002-08-14 H.J. Lu <hjl@gnu.org>
6291
6292 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6293
1fd03b5a
SC
62942002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6295
6296 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6297 instructions.
6298 (m68hc11_direct_relax): New to define table of relaxable instructions.
6299 (find_relaxable_insn): New, find a relaxable insn.
6300 (compare_reloc): New to compare two relocs.
6301 (m68hc11_elf_relax_section): New, relax text sections.
6302 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6303 (elf32_m68hc11_check_relocs): New function for GC support.
6304 (elf32_m68hc11_relocate_section): New function for GC support.
6305 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6306 (elf_backend_check_relocs): Likewise.
6307 (elf_backend_relocate_section): Likewise.
6308
c828c771
L
63092002-08-13 H.J. Lu <hjl@gnu.org>
6310
6311 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6312 definitions in shared objects when checking symbol with
6313 undefined version.
6314
9b701e44
SC
63152002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6316
6317 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6318 (elf32_m68hc11_gc_sweep_hook): Likewise.
6319 (elf_backend_gc_mark_hook): Define for GC section support.
6320 (elf_backend_gc_sweep_hook): Likewise.
6321 (elf_backend_can_gc_sections): Likewise.
6322
6323 * elf32-m68hc12.c: Likewise.
6324
96405e3c
SC
63252002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6326
6327 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6328 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6329 (_bfd_m68hc11_elf_set_private_flags): New function.
6330 Use them to set/check/print ELF flags specific to 68HC11.
6331
6332 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6333 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6334 (_bfd_m68hc12_elf_set_private_flags): New function.
6335 Use them to set/check/print ELF flags specific to 68HC12.
6336
dae78fb0
SC
63372002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6338
6339 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6340 fix masks for PC-rel relocs.
6341 (m68hc11_elf_ignore_reloc): New function.
6342
6343 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6344 68HC12 banked addressing relocs.
6345 (m68hc12_phys_addr): New to compute physical address of banked memory.
6346 (m68hc12_phys_page): Likewise for page.
6347 (m68hc12_addr_is_banked): New to see if address is in banked area.
6348 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6349
3dbfec86
SC
63502002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6351
6352 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6353 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6354 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6355 * bfd-in2.h: Regenerate.
6356
871da94f
L
63572002-08-12 H.J. Lu <hjl@gnu.org>
6358
6359 * elflink.h (elf_add_default_symbol): Preserve section across
6360 elf_merge_symbol.
6361
59bc061d
NC
63622002-08-09 Graeme Peterson <gp@qnx.com>
6363
51020317 6364 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6365 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6366 * Makefile.in: Regenerate.
6367 * config.bfd: Add support for powerpc{le}-*-nto targets.
6368 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6369 * configure: Regenerate.
6370 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6371 common file "elf32-qnx.h", and now include that file.
6372 * elf32-qnx.h: New file: QNX specific common elf backend.
6373 * elf32-ppc.c: Do not include elf32-target.h if
6374 ELF32_PPC_C_INCLUDED is defined.
6375 * elf32-ppcqnx.c: New file: Support for QNX.
6376 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6377 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6378
2b692c59
NC
63792002-08-09 Nick Clifton <nickc@redhat.com>
6380
6381 * po/sv.po: Updated Swedish translation.
6382
d0c7ff07
TS
63832002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6384
6385 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6386 g->global_gotsym is NULL.
6387
d8bbe778
L
63882002-08-08 H.J. Lu <hjl@gnu.org>
6389
c5cd6d62 6390 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6391 overrides an indirect versioned symbol.
6392
c366c25e
JJ
63932002-08-08 Jakub Jelinek <jakub@redhat.com>
6394
6395 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6396 for R_386_TLS_TPOFF32 relocs against symndx 0.
6397
31941635
L
63982002-08-07 H.J. Lu <hjl@gnu.org>
6399
6400 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6401 with undefined version if needed.
6402 (elf_link_assign_sym_version): Match a default symbol with a
6403 version without definition. No need to hide the default
6404 definition separately.
6405
0f3bd64f
AM
64062002-08-08 Alan Modra <amodra@bigpond.net.au>
6407
7330fb86
AM
6408 * elflink.h (elf_link_output_extsym): Don't output symbols from
6409 SEC_EXCLUDE sections.
6410
0f3bd64f
AM
6411 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6412
a4aa0fb7
AM
64132002-08-07 Alan Modra <amodra@bigpond.net.au>
6414
6415 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6416 entries.
6417
34ea4a36
TS
64182002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6419
6420 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6421 mismatch.
6422
141ff970
TS
64232002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6424
6425 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6426
28458e7e
TS
64272002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6428
6429 * elf32-mips.c (mips_reloc_map): Fix typo.
6430
0121a3da
AM
64312002-08-06 Alan Modra <amodra@bigpond.net.au>
6432
6433 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6434
d006db6c
AM
64352002-08-06 Alan Modra <amodra@bigpond.net.au>
6436
6437 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6438
8ea80f08
AM
64392002-08-06 Alan Modra <amodra@bigpond.net.au>
6440
2a52da53
AM
6441 * libxcoff.h: Use PARAMS on function declarations.
6442 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6443 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6444
8ea80f08
AM
6445 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6446 addend.
6447 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6448
cf9ab45b
AM
64492002-08-06 Alan Modra <amodra@bigpond.net.au>
6450
6451 * coff-rs6000.c: Formatting fixes.
6452 (xcoff_calculate_relocation): Use PARAMS in declaration.
6453 (xcoff_complain_overflow): Likewise.
6454 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6455 (bfd_xcoff_backend_data): Remove useless comments.
6456 (rs6000coff_vec): Likewise.
6457 (bfd_pmac_xcoff_backend_data): Likewise.
6458 (pmac_xcoff_vec): Likewise.
8ea80f08 6459
cf9ab45b
AM
6460 * coff64-rs6000.c: Formatting fixes.
6461 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6462 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6463 (bfd_xcoff_backend_data): Remove useless comments.
6464 (rs6000coff64_vec): Likewise.
6465 (bfd_xcoff_aix5_backend_data): Likewise.
6466 (aix5coff64_vec): Likewise.
6467
48bfecdd
AM
64682002-08-06 Alan Modra <amodra@bigpond.net.au>
6469
a78eab4e
AM
6470 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6471 mask entries. Use complain_overflow_dont for R_REF.
6472 (xcoff_reloc_type_ba): Revert last change.
6473 (xcoff_reloc_type_br): Likewise.
6474 (xcoff_reloc_type_crel): Likewise.
6475 (xcoff_ppc_relocate_section): Likewise.
6476 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6477 (xcoff64_ppc_relocate_section): Likewise.
6478 (xcoff64_howto_table): Revert some of last change to mask entries.
6479 Use complain_overflow_dont for R_REF.
6480
48bfecdd
AM
6481 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6482 relocs with bitsize == 16 have size = 1.
6483 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6484 (xcoff_reloc_type_br): Likewise.
6485 (xcoff_reloc_type_crel): Likewise.
6486 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6487 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6488 dst_mask adjustment.
6489 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6490 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6491 bitsize == 16 have size = 1.
6492
fd13ed0c
DC
64932002-08-01 Denis Chertykov <denisc@overta.ru>
6494
6495 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6496 (struct misc): New field isymbuf. All free_* fields removed.
6497 (symbol_value): Pass in internal syms. No need to swap syms in.
6498 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6499 possibly cached info.
6500 (tidyup_after_error): Removed.
6501 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6502 misc. Use new field.
6503 (adjust_all_relocations): Use internal syms. No need to swap syms
6504 in and out.
6505 (add_page_insn): Don't use removed fields of struct misc.
6506
24a1ba0f
NC
65072002-08-01 Nick Clifton <nickc@redhat.com>
6508
6509 * elf32-arm.h: Revert previous delta.
6510
a6903459
NC
65112002-08-01 Nick Clifton <nickc@redhat.com>
6512
6513 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6514 * configure: Regenerate.
6515
39a2a3eb
L
65162002-07-31 H.J. Lu <hjl@gnu.org>
6517
6518 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6519 selected.
6520
a0dfa6a8
L
65212002-07-31 H.J. Lu <hjl@gnu.org>
6522
6523 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6524 is selected.
6525
cd67d266
JJ
65262002-07-31 Jakub Jelinek <jakub@redhat.com>
6527
6528 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6529 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6530
4eb6b71c
NC
65312002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6532
6533 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6534 There is no 8 byte relocation type for this architecture.
6535 (do_ns32k_reloc): Use bfd_vma instead of native types.
6536 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6537 returns void.
6538 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6539 rely on generic code to do that.
6540 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6541 to all table entries.
6542 (_bfd_ns32k_relocate_contents): put_data returns void.
6543 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6544 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6545 return void.
6546
f7c33884
NC
65472002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6548
6549 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6550 archive object is target dependant.
6551
8f64befb
NC
65522002-07-31 Adam Nemet <anemet@lnxw.com>
6553
6554 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6555 (THUMB_PLT_ENTRY_SIZE): New macro.
6556 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6557 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6558 ARM_PLT_ENTRY_SIZE.
6559 (elf32_arm_plt_entry): Likewise.
6560 (elf_backend_plt_header_size): Likewise.
6561 (elf32_thumb_plt0_entry): New global.
6562 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6563 into .plt.thumb.
6564 (elf32_thumb_plt_entry): New global.
6565 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6566 Thumb entries. Set the bottom bit of the corresponding GOT entry
6567 for a Thumb PLT entry.
6568 (struct elf32_arm_plt_entry_info): New structure.
6569 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6570 type.
6571 (elf32_arm_link_hash_newfunc): Initialize new member.
6572 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6573 relocations against the PLT.
6574 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6575 first_rel_type if this is the first time we encounter the symbol.
6576 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6577 Determine if relocation needs a PLT entry. Set first_rel_type if
6578 this is the first time we encounter the symbol
6579 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6580 functions as well.
6581 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6582 (elf32_arm_create_dynamic_sections): New function. Create the
6583 .plt.thumb section.
6584 (elf_backend_create_dynamic_sections): Call it.
6585
47badb7b
NC
65862002-07-31 Nick Clifton <nickc@redhat.com>
6587
6588 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6589 'alternative' in order to avoid shadowing global symbol of the
6590 same name.
6591 * bfd-in2.h: Regenerate.
6592 * libbfd.h: Regenerate.
6593 * libcoff.h: Regenerate.
6594
8a397dad
TS
65952002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6596
6597 * Makefile.am: Add n32 ABI support.
6598 * Makefile.in: Regenerate.
6599 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6600 bit vectors for mips*-*-linux targets as optional.
6601 * configure.in: Add n32 ABI vectors.
6602 * configure: Regenerate.
6603 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6604 * elfn32-mips.c: New file, n32 ABI support.
6605 * targets.c: Add n32 ABI vectors.
6606
7e392df6 66072002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6608
7e392df6
NC
6609 * elfarmqnx-nabi.c: New file: Support for QNX.
6610 * config.bfd: Add support for arm-*-nto target.
6611 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6612 * configure: Regenerate.
6613 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6614 * Makefile.in: Regenerate.
6615 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6616 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6617 * elfarm-nabi.c: Do not include elf32-arm.h if
6618 ELFARM_NABI_C_INCLUDED is defined.
6619 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6620
7e392df6 66212002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6622
83e1617e
NC
6623 * po/sv.po: Updated Swedish translation.
6624
704afa60
JJ
66252002-07-30 Jakub Jelinek <jakub@redhat.com>
6626
6627 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6628
487e54f2
AM
66292002-07-30 Alan Modra <amodra@bigpond.net.au>
6630
6631 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6632 * archive.c (bfd_generic_archive_p): Likewise.
6633 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6634 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6635 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6636 (xcoff64_archive_p): Likewise.
6637 (xcoff64_openr_next_archived_file): Likewise.
6638 (xcoff64_archive_p): Clean up tdata properly on error.
6639 * coffgen.c (coff_real_object_p): Likewise.
6640 (coff_object_p): Release filehdr and opthdr.
6641 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6642 * ieee.c (ieee_archive_p): Likewise.
6643 * ihex.c (ihex_object_p): Likewise.
6644 (ihex_mkobject): Always allocate tdata.
6645 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6646 * srec.c (srec_mkobject): Always allocate tdata.
6647 (srec_object_p): Clean up tdata properly on error.
6648 (symbolsrec_object_p): Likewise.
6649 * versados.c (versados_object_p): Likewise.
6650 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6651 and bfd_realloc instead of realloc.
6652 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6653 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6654 place of bfd_malloc, simplifying error freeing. Free hash table too.
6655 (vms_object_p): Clean up tdata on error.
6656 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6657 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6658
9d46020e
AM
66592002-07-30 Alan Modra <amodra@bigpond.net.au>
6660
6661 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6662
fb39dac1
RS
66632002-07-26 Chris Demetriou <cgd@broadcom.com>
6664
6665 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6666 flags into resulting BFD.
6667
7a624474
AM
66682002-07-26 Alan Modra <amodra@bigpond.net.au>
6669
6670 From John Reiser <jreiser@BitWagon.com>
6671 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6672 tls_ldm_got.refcount.
6673
a4382ec6
TS
66742002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6675
6676 * elf64-mips.c: Update TODO comment.
6677 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6678 mips_elf64_gprel16_reloca): Remove prototypes.
6679 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6680 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6681 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6682 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6683 R_MIPS_HIGHEST.
6684 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6685 R_MIPS_GOT16. Remove wrong comments.
6686 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6687 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6688 from elf32-mips.c.
6689 (mips_elf64_hi16_reloc): Fix formatting.
6690 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6691 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6692 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6693 (mips_elf64_gprel16_reloc): Make static. Add check for
6694 partial_inplace.
6695 (mips_elf64_gprel16_reloca): Remove.
6696 (mips_elf64_literal_reloc): New function.
6697 (mips_elf64_gprel32_reloc): Fix formatting.
6698 (mips_elf64_shift6_reloc): Fix comment. Make static.
6699 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6700 elf32-mips.c.
6701 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6702 elf32-mips.c
6703 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6704 specific relocations.
6705 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6706 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6707 (ELF_MAXPAGESIZE): Add comment.
6708
219576a4
NC
67092002-07-25 Nick Clifton <nickc@redhat.com>
6710
6711 * po/sv.po: Updated Swedish translation.
6712 * po/es.po: Updated Spanish translation.
6713 * po/fr.po: Updated French translation.
6714
8c58d23b
AM
67152002-07-25 Alan Modra <amodra@bigpond.net.au>
6716
6717 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6718 as elf_link_record_local_dynamic_symbol.
6719 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6720 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6721 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6722 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6723 attempt is made to record a symbol in a discarded section, and
6724 return `2' in that case.
6725
ff3063f5
NC
67262002-07-24 Nick Clifton <nickc@redhat.com>
6727
6728 * po/sv.po: Updated Swedish translation.
6729 * po/es.po: Updated Spanish translation.
6730
f0fe0e16
AM
67312002-07-23 Alan Modra <amodra@bigpond.net.au>
6732
c1fb5f8a
AM
6733 * po/SRC-POTFILES.in: Regenerate.
6734
f0fe0e16
AM
6735 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6736 immediately. Remove code handling relocatable linking.
6737 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6738 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6739 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6740 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6741 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6742 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6743 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6744 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6745 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6746 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6747 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6748 * elf32-avr.c (elf_backend_rela_normal): Define.
6749 * elf32-cris.c: Likewise.
6750 * elf32-fr30.c: Likewise.
de2d743e 6751 * elf32-frv.c: Likewise.
f0fe0e16
AM
6752 * elf32-h8300.c: Likewise.
6753 * elf32-hppa.c: Likewise.
6754 * elf32-ip2k.c: Likewise.
6755 * elf32-sparc.c: Likewise.
6756 * elf32-v850.c: Likewise.
6757 * elf32-vax.c: Likewise.
6758 * elf64-hppa.c: Likewise.
6759 * elf64-sparc.c: Likewise.
6760 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6761 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6762 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6763 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6764 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6765 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6766 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6767 * elf-m10200.c (USE_RELA): Don't define.
6768 * elf-m10300.c: Likewise.
de2d743e 6769 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6770 * elf32-i370.c: Likewise.
6771 * elf32-ip2k.c: Likewise.
6772 * elf32-m68k.c: Likewise.
6773 * elf32-mcore.c: Likewise.
6774 * elf32-ppc.c: Likewise.
6775 * elf32-s390.c: Likewise.
6776 * elf32-vax.c: Likewise.
6777 * elf64-ppc.c: Likewise.
6778 * elf64-s390.c: Likewise.
6779 * elf64-x86-64.c: Likewise.
6780 * elfxx-ia64.c: Likewise.
6781 * elf32-avr.c (USE_REL): Don't undef.
6782 * elf32-ip2k.c: Likewise.
6783
5e8d7549
NC
67842002-07-23 Nick Clifton <nickc@redhat.com>
6785
6786 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6787 'want_p_paddr_set_to_zero'.
6788 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6789 to false;
6790 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6791 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6792
9e12c7db
NC
67932002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6794
6795 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6796 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6797 show the Copyright string.
6798 Minor formatting tidy ups.
6799
0461a601
NC
68002002-07-23 Nick Clifton <nickc@redhat.com>
6801
ff3063f5
NC
6802 * po/fr.po: Updated French translation.
6803 * po/sv.po: Updated Swedish translation.
0461a601 6804
fad2542d
AM
68052002-07-23 Alan Modra <amodra@bigpond.net.au>
6806
6807 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6808 when outputting relocs.
6809
c0647bfc
JT
68102002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6811
6812 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6813 DT_PLTGOT into the dynamic section if there is a PLT.
6814
d01414a5
TS
68152002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6816
6817 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6818 elf32-mips.c.
6819 (_bfd_mips_elf_write_section): Likewise.
6820 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6821 (_bfd_mips_elf_write_section): Likewise.
6822 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6823 (elf32_mips_write_section): Likewise.
6824 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6825 (_bfd_mips_elf_write_section): Likewise.
6826
40c97fc6
AM
68272002-07-19 Alan Modra <amodra@bigpond.net.au>
6828
6829 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6830 PT_IA_64_UNWIND segments for a given section.
6831
58378160
L
68322002-07-17 H.J. Lu <hjl@gnu.org>
6833
6834 * Makefile.am: Fix a typo.
6835 * Makefile.in: Regenerate.
6836
cf88bb9f
NC
68372002-07-15 Denis Chertykov <denisc@overta.ru>
6838 Frank Ch. Eigler <fche@redhat.com>
6839 Ben Elliston <bje@redhat.com>
6840 Alan Lehotsky <alehotsky@cygnus.com>
6841 John Healy <jhealy@redhat.com>
6842 Graham Stott <grahams@redhat.com>
6843 Jeff Johnston <jjohnstn@redhat.com>
6844
6845 * Makefile.am: Add support for ip2k.
6846 * Makefile.in: Regenerate.
6847 * doc/Makefile.in: Regenerate.
6848 * archures.c: Add support for ip2k.
6849 * config.bfd: Add support for ip2k.
6850 * configure.in: Add support for ip2k.
6851 * configure: Regenerate.
6852 * reloc.c: Add support for ip2k.
6853 * targets.c: Add support for ip2k.
6854 * bfd-in2.h: Regenerate.
6855 * libbfd.h: Regenerate.
6856 * cpu-ip2k.c: New file.
6857 * elf32-ip2k.c: New file.
6858
0dafd5f6
RE
68592002-07-17 Ian Rickards <irickard@arm.com>
6860
40c97fc6 6861 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6862 just return the filename.
6863
36b08f12
AM
68642002-07-16 Moritz Jodeit <moritz@jodeit.org>
6865
6866 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6867
58821868
AM
68682002-07-16 Alan Modra <amodra@bigpond.net.au>
6869
6870 * elflink.h: Formatting fixes, tidy prototypes.
6871 (elf_link_assign_sym_version): Move common code out of loop.
6872
c89583f8
AM
68732002-07-16 Alan Modra <amodra@bigpond.net.au>
6874
6875 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6876 reloc section size is zero. Correct reloc output location.
6877
ba94744e
AM
68782002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6879
6880 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6881 the final type for the e_fsel selector when generating PA2.0W code.
6882 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6883 relocations.
6884
96a94295
L
68852002-07-14 H.J. Lu <hjl@gnu.org>
6886
6887 * elflink.h (elf_link_assign_sym_version): Hide the default
6888 definition if there is a hidden versioned definition.
6889
6849c52f
HPN
68902002-07-12 Hans-Peter Nilsson <hp@axis.com>
6891
6892 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6893 dynamic reference test in assertion when initializing GOT with
6894 static contents. Just assert that there are either no dynamic
6895 sections, the symbol is defined in the regular objects or that the
6896 symbol is undef weak. Tweak comment.
6897 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6898 only if the symbol isn't defined in the program and isn't undef
6899 weak.
6900 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6901 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6902 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6903 (elf_cris_discard_excess_program_dynamics): Don't consider
6904 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6905
239e1f3a
AM
69062002-07-11 Alan Modra <amodra@bigpond.net.au>
6907
6908 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6909 unresolved debugging relocs in dynamic applications.
6910 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6911 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6912 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6913 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6914 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6915 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6916
2f6d9989
AM
69172002-07-10 Alan Modra <amodra@bigpond.net.au>
6918
f5e87a1d
AM
6919 * elf64-ppc.c (ONES): Define.
6920 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6921 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6922 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6923
2f6d9989
AM
6924 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6925 (ppc64_elf_set_private_flags): Delete.
6926 (ppc64_elf_section_from_shdr): Delete.
6927 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6928 (ppc64_elf_fake_sections): Delete.
6929 (bfd_elf64_bfd_set_private_flags): Don't define.
6930 (bfd_elf64_get_symbol_info): Likewise.
6931 (elf_backend_section_from_shdr): Likewise.
6932 (elf_backend_fake_sections): Likewise.
6933
0594c12d
AM
69342002-07-10 Marco Walther <Marco.Walther@sun.com>
6935
6936 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6937 when not already set.
6938 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6939 (elf_backend_fake_sections): Define.
6940
699cb9b8
AM
69412002-07-10 Alan Modra <amodra@bigpond.net.au>
6942
6943 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6944 Formatting.
6945 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6946
0a4787a0
HPN
69472002-07-09 Hans-Peter Nilsson <hp@axis.com>
6948
6949 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6950 NULL sym_hashes to just before use.
6951 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6952 symbol with non-default visibility.
6953 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6954 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6955 Ditto.
6956 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6957 symbol with non-default visibility.
6958 (cris_elf_check_relocs): At tests for local symbol before
6959 increasing h->plt.refcount, also check for non-default
6960 visibility. Ditto when checking for local symbol to eliminate
6961 pc-relative runtime relocs.
6962
aecc8f8a
AM
69632002-07-08 Alan Modra <amodra@bigpond.net.au>
6964
6965 * elf.c: Formatting.
6966 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6967 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6968 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6969 segments.
6970
e9168c1e
MM
69712002-07-07 Mark Mitchell <mark@codesourcery.com>
6972 Alan Modra <amodra@bigpond.net.au>
6973
6974 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6975 account the impact of relocation count overflow when computing
6976 section offsets.
6977 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6978 or not to apply the PE COFF reloc overflow handling. Fix a
6979 fencepost error in deciding whether or not to use that technique.
6980
6cdc0ccc
AM
69812002-07-07 Alan Modra <amodra@bigpond.net.au>
6982
6983 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6984 change type of locsyms.
6985 (bfd_elf_get_elf_syms): Declare.
6986 * elf.c (bfd_elf_get_elf_syms): New function.
6987 (group_signature): Use bfd_elf_get_elf_syms.
6988 (bfd_section_from_r_symndx): Likewise.
6989 * elfcode.h (elf_slurp_symbol_table): Likewise.
6990 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6991 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6992 locality of various data structures. Properly free internal relocs.
6993 (elf_bfd_final_link): Properly free internal relocs.
6994 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6995 (elf_link_input_bfd): Likewise.
6996 (elf_gc_mark): Likewise. Properly free internal relocs.
6997 (elf_gc_sweep): Properly free internal relocs.
6998 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6999 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7000 internal relocs.
7001 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7002 Properly free possibly cached info.
7003 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7004 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7005 symbol swapping code.
7006 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7007 Properly free possibly cached info.
7008 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7009 (mn10300_elf_relax_delete_bytes): Likewise.
7010 (mn10300_elf_symbol_address_p): Likewise.
7011 (mn10300_elf_get_relocated_section_contents): Likewise.
7012 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7013 (elf32_h8_relax_delete_bytes): Likewise.
7014 (elf32_h8_symbol_address_p): Likewise.
7015 (elf32_h8_get_relocated_section_contents): Likewise.
7016 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7017 (m32r_elf_relax_delete_bytes): Likewise.
7018 (m32r_elf_get_relocated_section_contents): Likewise.
7019 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7020 elf_section_data to determine whether cached.
7021 (sh_elf_relax_section): As above for elf-m10200.c.
7022 (sh_elf_relax_delete_bytes): Likewise.
7023 (sh_elf_get_relocated_section_contents): Likewise.
7024 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7025 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7026 reading of local syms.
7027 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7028 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7029 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7030 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7031 relocs.
7032 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7033 free internal relocs and section contents. Don't read symbols.
7034 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7035 (elf32_hppa_size_stubs): Don't free local syms.
7036 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7037 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7038 possibly cached info.
7039 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7040 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7041 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7042 all_local_syms.
7043 (get_local_syms): Delete function.
7044 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7045 on exit.
7046 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7047
b3212001
JW
70482002-07-05 Jim Wilson <wilson@redhat.com>
7049
7050 * syms.c (decode_section_type): New.
7051 (bfd_decode_symclass): Call decode_section_type.
7052
894bb1ee
JJ
70532002-07-04 Jakub Jelinek <jakub@redhat.com>
7054
7055 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7056 section content start.
7057 Reported by Michael Schumacher <mike@hightec-rt.com>.
7058
bc0ba537
AM
70592002-07-04 Alan Modra <amodra@bigpond.net.au>
7060
9b5ecbd0 7061 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
7062 link order code. Don't actually remove the output section here;
7063 Just set a flag for the linker to do so.
7064 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7065 sections when setting up output section dynsyms.
7066
797fc050
AM
70672002-07-04 Alan Modra <amodra@bigpond.net.au>
7068
7069 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7070 fudge.
7071 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7072 libs here instead.
7073
99881371
MS
70742002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7075
7076 * elf64-s390.c (create_got_section): Set .got section alignment to
7077 8 bytes.
7078 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7079
47d9a591
AM
70802002-07-02 Alan Modra <amodra@bigpond.net.au>
7081
7082 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7083
179d3252
JT
70842002-07-01 Matt Thomas <matt@3am-software.com>
7085
7086 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7087 to EF_VAX_*.
7088
4a14403c
TS
70892002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7090
7091 * elfxx-mips.c (ABI_64_P): Fix comment.
7092 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7093 new section names for N64 ABI.
7094 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7095 (mips_elf_calculate_relocation): Code formatting.
7096 (mips_elf_create_dynamic_relocation): Likewise.
7097 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7098 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7099 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7100 in any NewABI.
7101 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7102 for NewABI.
7103 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7104 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7105 here, too.
7106
607c0e09
AS
71072002-07-01 Andreas Schwab <schwab@suse.de>
7108
7109 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7110 R_X86_64_64 to R_X86_64_RELATIVE.
7111
ba26fd96
AM
71122002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7113
7114 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7115 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7116 Run "make dep-am".
7117 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7118 host_aout_vec.
7119 * configure.in (vaxbsd_vec): Add.
7120 * targets.c (vaxbsd_vec): Add.
7121 * Makefile.in: Rebuild.
7122 * configure: Rebuild.
7123 * po/SRC-POTFILES.in: Rebuild.
7124
1e2f5b6e
AM
71252002-07-01 Alan Modra <amodra@bigpond.net.au>
7126
7127 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7128 examining to gc_mark_hook, rather than the bfd.
7129 (elf_gc_sections): Adjust.
7130 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7131 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7132 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7133 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7134 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7135 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7136 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7137 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7138 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7139 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7140 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7141 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7142 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7143 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7144 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7145 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7146 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7147 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7148 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7149 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7150 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7151 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7152 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7153 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7154 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7155 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7156 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7157 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7158 redundant local sym tests.
7159 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7160 (link_hash_newfunc): Init is_entry.
7161 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7162 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7163 (create_linkage_sections): Use bfd_make_section_anyway rather than
7164 bfd_make_section.
7165 (ppc64_elf_mark_entry_syms): New function.
7166 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7167 up opd entry to function section map.
7168 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7169 relocs that reference the opd section.
7170 (edit_opd): New function.
7171 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7172 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7173 (get_local_syms): Do so here. Exit if we already have local syms.
7174 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7175 read local syms on non-ELF input.
7176 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7177 than duplicating it's function here. Adjust free of internal
7178 relocs to suit.
7179 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7180 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7181 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7182 _bfd_elf32_link_read_relocs rather than duplicating it's function
7183 here. Adjust free of internal relocs to suit.
7184
1b71fb54
AJ
71852002-07-01 Andreas Jaeger <aj@suse.de>
7186
7187 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7188 are not allowed in shared libs code, enforce -fPIC.
7189
8d28f606
HPN
71902002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7191
7192 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7193 trailing zero-sequences when there's previous left-over data.
7194
5ac81c74
JL
71952002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7196
7197 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7198 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7199 and opd_rel_sec in order for starting rela section. Check _raw_size.
7200 (elf_backend_reloc_type_class): Define.
7201
91a4d569
AM
72022002-06-27 Kevin Buettner <kevinb@redhat.com>
7203
7204 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7205 DWARF2 formats.
7206
feee612b
AM
72072002-06-27 Alan Modra <amodra@bigpond.net.au>
7208
7209 * cpu-powerpc.c: Comment on ordering of arch_info.
7210 * elf32-ppc.c (ppc_elf_object_p): New function.
7211 (elf_backend_object_p): Define.
7212 * elf64-ppc.c (ppc64_elf_object_p): New function.
7213 (elf_backend_object_p): Define.
7214
a4e6cefc
JT
72152002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7216
7217 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7218 * configure: Regenerate.
7219
dae2dd0d
NC
72202002-06-25 Jason Eckhardt <jle@rice.edu>
7221
7222 * dwarf2.c (decode_line_info): Check unit->addr_size
7223 to read in the proper number of prologue bytes.
7224
680f9d5c
NC
72252002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7226
7227 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7228 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
7229 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7230 been enabled.
dae2dd0d 7231
680f9d5c
NC
7232 * targets.c (_bfd_target_vector[]): Only include
7233 aix5coff64_vec if 64-bit bfd support has been enabled.
7234
d4c88bbb
AM
72352002-06-25 Alan Modra <amodra@bigpond.net.au>
7236
7237 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7238 * elf32-hppa.c (hppa_add_stub): Likewise.
7239 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7240 * elflink.h (elf_add_default_symbol): Fix comment typo.
7241 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7242 (elf_link_add_object_symbols): Likewise.
7243 (elf_link_assign_sym_version): Likewise.
7244 * hash.c (bfd_hash_lookup): Likewise.
7245 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7246 * section.c (bfd_get_unique_section_name): Likewise.
7247 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7248 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7249 (assign_section_numbers): Likewise.
7250 (_bfd_elfcore_make_pseudosection): Likewise.
7251 (elfcore_grok_lwpstatus): Likewise.
7252 (elfcore_grok_win32pstatus): Likewise.
7253 (elfcore_write_note): Constify input params. Use PTR instead of
7254 void *. Include terminating NUL in namesz. Correct padding.
7255 Support NULL "name" param. Use memcpy instead of strcpy.
7256 (elfcore_write_prpsinfo): Constify input params.
7257 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7258 (elfcore_write_lwpstatus): Likewise.
7259 (elfcore_write_pstatus): Likewise.
7260 (elfcore_write_prfpreg): Likewise.
7261 (elfcore_write_prxfpreg): Likewise.
7262 * elf-bfd.h (elfcore_write_note): Update declaration.
7263 (elfcore_write_prpsinfo): Likewise.
7264 (elfcore_write_prstatus): Likewise.
7265 (elfcore_write_pstatus): Likewise.
7266 (elfcore_write_prfpreg): Likewise.
7267 (elfcore_write_prxfpreg): Likewise.
7268 (elfcore_write_lwpstatus): Likewise.
7269
b0ac09d2
NC
72702002-06-25 Jason Eckhardt <jle@rice.edu>
7271
7272 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7273 symbols of type stProc and stStaticProc.
7274
72752002-06-25 Nick Clifton <nickc@redhat.com>
7276
7277 * ecoff.c: VArious formatting fixes.
7278
021d6096
AM
72792002-06-25 Alan Modra <amodra@bigpond.net.au>
7280
7281 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7282
82e51918
AM
72832002-06-25 Alan Modra <amodra@bigpond.net.au>
7284
7285 * aout-adobe.c: Don't compare against "true" or "false.
7286 * aout-target.h: Likewise.
7287 * aoutx.h: Likewise.
7288 * archive.c: Likewise.
7289 * bout.c: Likewise.
7290 * cache.c: Likewise.
7291 * coff-a29k.c: Likewise.
7292 * coff-alpha.c: Likewise.
7293 * coff-i386.c: Likewise.
7294 * coff-mips.c: Likewise.
7295 * coff-or32.c: Likewise.
7296 * coff64-rs6000.c: Likewise.
7297 * coffcode.h: Likewise.
7298 * coffgen.c: Likewise.
7299 * cpu-ns32k.c: Likewise.
7300 * ecoff.c: Likewise.
7301 * ecofflink.c: Likewise.
7302 * elf.c: Likewise.
7303 * elf32-arm.h: Likewise.
7304 * elf32-cris.c: Likewise.
7305 * elf32-d30v.c: Likewise.
7306 * elf32-i386.c: Likewise.
7307 * elf32-mcore.c: Likewise.
7308 * elf32-ppc.c: Likewise.
7309 * elf32-sh.c: Likewise.
7310 * elf32-sh64.c: Likewise.
7311 * elf32-v850.c: Likewise.
7312 * elf64-alpha.c: Likewise.
7313 * elf64-sh64.c: Likewise.
7314 * elfcode.h: Likewise.
7315 * elfcore.h: Likewise.
7316 * elflink.h: Likewise.
7317 * elfxx-mips.c: Likewise.
7318 * i386os9k.c: Likewise.
7319 * ieee.c: Likewise.
7320 * libbfd.c: Likewise.
7321 * linker.c: Likewise.
7322 * mmo.c: Likewise.
7323 * nlm32-alpha.c: Likewise.
7324 * nlm32-i386.c: Likewise.
7325 * nlm32-ppc.c: Likewise.
7326 * nlm32-sparc.c: Likewise.
7327 * nlmcode.h: Likewise.
7328 * oasys.c: Likewise.
7329 * pdp11.c: Likewise.
7330 * peicode.h: Likewise.
7331 * reloc.c: Likewise.
7332 * som.c: Likewise.
7333 * srec.c: Likewise.
7334 * tekhex.c: Likewise.
7335 * vms.c: Likewise.
7336 * xcofflink.c: Likewise.
7337 * elf64-sparc.c: Edit comment to not use "== false".
7338
7339 * aoutf1.h: Don't use "? true : false".
7340 * ecoff.c: Likewise.
7341 * format.c: Likewise.
7342 * ieee.c: Likewise.
7343 * linker.c: Likewise.
7344 * mmo.c: Likewise.
7345 * oasys.c: Likewise.
7346
48fc70a2
AM
73472002-06-23 H.J. Lu <hjl@gnu.org>
7348
7349 * elflink.h (elf_link_add_archive_symbols): For the default
7350 version, check references with only one `@' first.
7351
47b7c2db
AM
73522002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7353
7354 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7355 function.
9b5ecbd0 7356 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7357 symbol table.
7358 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7359 (elf64_hppa_size_dynamic_sections): Revise to use
7360 elf64_hppa_mark_milli_and_exported_functions.
7361 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7362 symbols out of dynamic symbol table.
7363
f5d44ba0
AM
73642002-06-23 Alan Modra <amodra@bigpond.net.au>
7365
bb3fff1e
AM
7366 * Makefile.in: Regenerate.
7367 * libbfd.h: Regenerate.
7368 * bfd-in2.h: Regenerate.
7369 * configure: Regenerate.
7370 * po/SRC-POTFILES.in: Regenerate.
7371
f5d44ba0
AM
7372 * elflink.h: Comment typo fixes.
7373
73742002-06-23 H.J. Lu <hjl@gnu.org>
7375
7376 * elf-bfd.h (elf_link_loaded_list): New structure.
7377 (elf_link_hash_table): Add "loaded".
7378 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7379 * elflink.h (elf_link_check_versioned_symbol): New function.
7380 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7381
cc36acdf
NC
73822002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7383
7384 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7385 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7386 nothing needed to be done, rather than false, indicating that the
7387 section's size could not be computed.
7388
4e5ba5b7
DB
73892002-06-18 Dave Brolley <brolley@redhat.com>
7390
7391 From Catherine Moore, Michael Meissner, Dave Brolley:
7392 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7393 * targets.c: Support bfd_elf32_frv_vec.
7394 * reloc.c: Add FRV relocs.
7395 * configure.in: Add support for bfd-elf32-frv-vec.
7396 * config.bfd (targ_cpu): Add support for frv-*-elf.
7397 * archures.c: Add frv arch and machines.
7398 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7399 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7400 (BFD32_BACKENDS): Add elf32-frv.lo.
7401 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7402 (cpu-frv.lo): New target.
7403 (elf32-frv.lo): New target.
7404 * cpu-frv.c: New file.
7405 * elf32-frv.c: New file.
7406
7ece0d85
JJ
74072002-06-18 Jakub Jelinek <jakub@redhat.com>
7408
7409 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7410 e_shnum == 0.
7411 Only read the first section header if e_shoff is non-zero.
7412 Don't consider e_shstrndx if there are no sections.
7413
57fb03ac
TR
74142002-06-17 Tom Rix <trix@redhat.com>
7415
7416 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7417 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7418 complain_overflow_bitfield.
7419
341ca622
AM
74202002-06-17 Alan Modra <amodra@bigpond.net.au>
7421
767e34d1
AM
7422 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7423 (bfd_fdopenr): Likewise.
7424 (bfd_openstreamr): Likewise.
7425 (bfd_openw): Likewise.
7426
341ca622
AM
7427 * targets.c: Sort target vecs.
7428 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7429 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7430 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7431 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7432 * configure.in: Sort target vecs. Add m88kmach3_vec.
7433 * configure: Regenerate.
7434
dfbbae4c
HPN
74352002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7436
7437 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7438 bpo_reloc_no to break sort order ties, not address of items.
7439
d663e1cd
JL
74402002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7441
7442 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7443 Skip excluded sections in determing __gp value.
7444 (elf_hppa_final_link_relocate): Use the symbol's address in
7445 R_PARISC_FPTR64 relocations that don't need an opd entry.
7446 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7447 (elf64_hppa_finalize_dynreloc): Likewise.
7448 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7449 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7450
a8295218
NC
74512002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7452
7453 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7454 alignment for .bss, .data and .text sections so that sse and sse2
7455 code will work.
7456 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7457
74582002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7459
7460 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7461 sh[1234]*-elf*.
7462
3db4b612
JL
74632002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7464
2cb69dd3
JL
7465 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7466 dynamic sections.
7467
3db4b612
JL
7468 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7469 for a symbol that has no output section.
7470 (allocate_dynrel_entries): Correct comment.
7471 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7472 unless we want one.
7473 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7474 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7475 with no section. Remove unnecessary parentheses.
7476
f3813499
TR
74772002-06-11 Tom Rix <trix@redhat.com>
7478
7479 * coffcode.h (coff_compute_section_file_positions): Add data
7480 section to AIX loader alignment check.
7481
f5d44ba0 7482 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7483 alignment to 4 bytes.
7484 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7485 power accessor macro.
7486 (do_shared_object_padding): Remove invalid assertion.
7487
0ebaf185
RS
74882002-06-10 Richard Sandiford <rsandifo@redhat.com>
7489
7490 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7491 for removed output sections.
7492
ebe3e2d1
NC
74932002-06-10 Geoffrey Keating <geoffk@redhat.com>
7494
7495 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7496 htab_alloc.
7497 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7498
0b14c2aa
L
74992002-06-08 H.J. Lu <hjl@gnu.org>
7500
7501 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7502 work around a long long bug in gcc 2.96 on mips.
7503
3c2bfad6
JT
75042002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7505
7506 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7507 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7508 Regenerate dependency lists.
7509 * Makefile.in: Regenerate.
7510 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7511 vax1knetbsd_vec to targ_selvecs.
7512 * configure.in: Add vax1knetbsd_vec.
7513 * configure: Regenerate.
7514 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7515 * vax1knetbsd.c: New file.
7516 * vaxnetbsd.c: Update copyright years.
7517 (TARGET_PAGE_SIZE): Set to 0x1000.
7518 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7519
91149be3
JT
75202002-06-08 Matt Thomas <matt@3am-software.com>
7521
7522 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7523
21e15248
AM
75242002-06-08 Alan Modra <amodra@bigpond.net.au>
7525
7526 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7527
986b7daa
AM
75282002-06-08 Alan Modra <amodra@bigpond.net.au>
7529
e90b95f6
AM
7530 * Makefile.am: Run "make dep-am".
7531 * Makefile.in: Regenerate.
7532
3f9c735e
AM
7533 * armnetbsd.c: Replace CONST with const.
7534 * corefile.c: Likewise.
7535 * elf32-dlx.c: Likewise.
7536 * elf64-mips.c: Likewise.
7537 * mmo.c: Likewise.
7538 * ns32knetbsd.c: Likewise.
7539
986b7daa
AM
7540 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7541 table is elf64-sparc.
7542
5a659663
TS
75432002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7544
7545 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7546 Fix RELA addends to get not shifted in the result. Don't do special
7547 handling of R_MIPS_64 for NewABI.
7548
9bab7074
AM
75492002-06-07 Alan Modra <amodra@bigpond.net.au>
7550
7551 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7552 (NAME(aout,slurp_reloc_table)): Likewise.
7553 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7554 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7555 (xcoff_write_archive_contents_big): Likewise.
7556 (xcoff_generate_rtinit): Likewise.
7557 (xcoff_generate_rtinit): Likewise, and check error return.
7558 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7559 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7560 (coff_get_normalized_symtab): Likewise.
7561 (coff_make_empty_symbol): Likewise.
7562 (bfd_coff_set_symbol_class): Likewise.
7563 * cofflink.c (coff_link_add_symbols): Likewise.
7564 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7565 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7566 (bfd_ecoff_write_accumulated_debug): Likewise.
7567 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7568 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7569 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7570 * ieee.c (do_with_relocs): Use bfd_zalloc.
7571 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7572 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7573 (NAME(aout,slurp_reloc_table)): Likewise.
7574 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7575 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7576 * som.c (som_build_and_write_symbol_table): Likewise.
7577 (som_slurp_string_table): Likewise.
7578 (som_slurp_symbol_table): Likewise.
7579 (som_bfd_ar_write_symbol_stuff): Likewise.
7580 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7581 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7582 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7583 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7584 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7585
1126897b
AM
75862002-06-07 Alan Modra <amodra@bigpond.net.au>
7587
7588 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7589 "group" union.
7590 (elf_group_name): Update.
7591 (elf_group_id): Define.
7592 (bfd_elf_set_group_contents): Declare.
7593 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7594 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7595 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7596 that sym for the signature.
7597 (_bfd_elf_compute_section_file_positions): Don't call
7598 set_group_contents for "ld -r" case.
7599 (swap_out_syms): Use bfd_zalloc.
7600 * elflink.h (elf_link_add_archive_symbols): Likewise.
7601 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7602 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7603
3fad3c7c
AM
76042002-06-07 Alan Modra <amodra@bigpond.net.au>
7605
7606 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7607 relocs in opd for non-shared too.
7608
10f469bf 76092002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7610
7611 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7612 relocations.
7613
7217313c
NC
76142002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7615
7616 * merge.c: Include libiberty.h.
7617 * elf-strtab.c: Include libiberty.h.
7618
6cb22815
AM
76192002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7620
7621 * peXXigen.c (pe_print_idata): Remove unused variable.
7622
1ed89aa9
NC
76232002-06-06 David Heine <dlheine@tensilica.com>
7624
7625 * elf.c (assign_file_positions_for_segments): Remove unallocated
7626 sections from the section to segment mapping for PT_LOAD segments.
7627 Update comment about empty loadable segments.
7628
644c4c80
RS
76292002-06-06 Richard Sandiford <rsandifo@redhat.com>
7630
7631 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7632 is within the .stabstr section.
7633
f8ecb12b
AM
76342002-06-06 Alan Modra <amodra@bigpond.net.au>
7635
7636 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7637 are "const PTR", not "const PTR *".
7638 (bfd_elf32_swap_symbol_in): Likewise.
7639 (bfd_elf64_swap_symbol_in): Likewise.
7640 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7641 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7642 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7643 (elf_link_add_object_symbols): Likewise.
7644 (elf_link_record_local_dynamic_symbol): Likewise.
7645 (elf_link_input_bfd): Likewise.
7646 (elf_gc_mark): Likewise.
7647 (elf_reloc_symbol_deleted_p): Likewise.
7648 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7649 (mn10200_elf_relax_delete_bytes): Likewise.
7650 (mn10200_elf_symbol_address_p): Likewise.
7651 (mn10200_elf_get_relocated_section_contents): Likewise.
7652 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7653 (mn10300_elf_relax_section): Likewise.
7654 (mn10300_elf_relax_delete_bytes): Likewise.
7655 (mn10300_elf_symbol_address_p): Likewise.
7656 (mn10300_elf_get_relocated_section_contents): Likewise.
7657 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7658 (elf32_h8_relax_delete_bytes): Likewise.
7659 (elf32_h8_symbol_address_p): Likewise.
7660 (elf32_h8_get_relocated_section_contents): Likewise.
7661 * elf32-hppa.c (get_local_syms): Likewise.
7662 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7663 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7664 * elf32-sh.c (sh_elf_relax_section): Likewise.
7665 (sh_elf_relax_delete_bytes): Likewise.
7666 (sh_elf_get_relocated_section_contents): Likewise.
7667 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7668 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7669 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7670 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7671 * elf64-ppc.c (get_local_syms): Likewise.
7672 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7673 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7674
1ed89aa9 76752002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7676
7677 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7678
73ff0d56
AM
76792002-06-05 Alan Modra <amodra@bigpond.net.au>
7680
9dce4196
AM
7681 * elf.c (group_signature): Swap in the whole symbol, and handle
7682 extracting section symbol names.
7683 (setup_group): Add comment.
7684 (set_group_contents): When called from objcopy or ld, arrange for
7685 section contents to be written. Write group member output section
7686 indices to allow objcopy to reorganize sections.
7687 (_bfd_elf_copy_private_section_data): Copy group info.
7688
73ff0d56
AM
7689 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7690 (bfd_elf32_swap_symbol_in): Update prototype.
7691 (bfd_elf64_swap_symbol_in): Likewise.
7692 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7693 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7694 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7695 (elf_link_add_object_symbols): Likewise.
7696 (elf_link_record_local_dynamic_symbol): Likewise.
7697 (elf_link_input_bfd): Likewise.
7698 (elf_gc_mark): Likewise.
7699 (elf_reloc_symbol_deleted_p): Likewise.
7700 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7701 (mn10200_elf_relax_delete_bytes): Likewise.
7702 (mn10200_elf_symbol_address_p): Likewise.
7703 (mn10200_elf_get_relocated_section_contents): Likewise.
7704 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7705 (mn10300_elf_relax_section): Likewise.
7706 (mn10300_elf_relax_delete_bytes): Likewise.
7707 (mn10300_elf_symbol_address_p): Likewise.
7708 (mn10300_elf_get_relocated_section_contents): Likewise.
7709 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7710 (elf32_h8_relax_delete_bytes): Likewise.
7711 (elf32_h8_symbol_address_p): Likewise.
7712 (elf32_h8_get_relocated_section_contents): Likewise.
7713 * elf32-hppa.c (get_local_syms): Likewise.
7714 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7715 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7716 * elf32-sh.c (sh_elf_relax_section): Likewise.
7717 (sh_elf_relax_delete_bytes): Likewise.
7718 (sh_elf_get_relocated_section_contents): Likewise.
7719 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7720 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7721 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7722 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7723 * elf64-ppc.c (get_local_syms): Likewise.
7724 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7725 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7726 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7727 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7728 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7729 * elf64-mips.c (mips_elf64_size_info): Likewise.
7730 * elf64-s390.c (s390_elf64_size_info): Likewise.
7731 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7732
53bfd6b4
MR
77332002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7734
7735 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7736 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7737 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7738 _bfd_mips_elf_ignore_discarded_relocs.
7739 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7740
d4df96e6
L
77412002-06-05 H.J. Lu <hjl@gnu.org>
7742
7743 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7744 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7745 the SEC_MERGE section.
7746
e61463e1
AM
77472002-06-05 Alan Modra <amodra@bigpond.net.au>
7748
3cac74d0
AM
7749 * coff-alpha.c: Update copyright date.
7750 * coff-mips.c: Likewise.
7751 * xcoff-target.h: Likewise.
7752
e61463e1
AM
7753 * bfd-in.h: Remove "taken from the source" comment.
7754 * libbfd-in.h: Likewise.
7755 * libcoff-in.h: Likewise.
7756 * bfd-in2.h: Regenerate.
7757 * libbfd.h: Regenerate.
7758 * libcoff.h: Regenerate.
7759
7760 * elf.c (bfd_elf_discard_group): Return true.
7761 * elf-bfd.h (bfd_elf_discard_group): Declare.
7762 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7763 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7764 * bfd.c (bfd_discard_group): Define.
7765 * targets.c (struct bfd_target): Add _bfd_discard_group.
7766 (BFD_JUMP_TABLE_LINK): Here too.
7767 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7768 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7769 * aout-target.h (MY_bfd_discard_group): Define.
7770 * aout-tic30.c (MY_bfd_discard_group): Define.
7771 * binary.c (binary_bfd_discard_group): Define.
7772 * bout.c (b_out_bfd_discard_group): Define.
7773 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7774 * coffcode.h (coff_bfd_discard_group): Define.
7775 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7776 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7777 * i386msdos.c (msdos_bfd_discard_group): Define.
7778 * i386os9k.c (os9k_bfd_discard_group): Define.
7779 * ieee.c (ieee_bfd_discard_group): Define.
7780 * ihex.c (ihex_bfd_discard_group): Define.
7781 * mmo.c (mmo_bfd_discard_group): Define.
7782 * nlm-target.h (nlm_bfd_discard_group): Define.
7783 * oasys.c (oasys_bfd_discard_group): Define.
7784 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7785 * som.c (som_bfd_discard_group): Define.
7786 * srec.c (srec_bfd_discard_group): Define.
7787 * tekhex.c (tekhex_bfd_discard_group): Define.
7788 * versados.c (versados_bfd_discard_group): Define.
7789 * vms.c (vms_bfd_discard_group): Define.
7790 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7791 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7792 (aix5coff64_vec): Likewise.
7793 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7794
9cba27b2
JT
77952002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7796
7797 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7798 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7799 (elf32-sh64-com.lo): New dependency list.
7800 * Makefile.in: Regenerate.
7801 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7802 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7803 elf32-sh64-com.lo.
7804 * configure: Regenerate.
7805 * elf32-sh64.c (sh64_address_in_cranges)
7806 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7807 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7808 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7809 * elf32-sh64-com.c: ...here. New file.
7810
8d2c33be
AM
78112002-06-04 Alan Modra <amodra@bigpond.net.au>
7812
7813 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7814 ATTRIBUTE_UNUSED on used params.
7815 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7816 before calling bfd_section_from_elf_index on local syms.
7817 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7818
5b0e55b6
JT
78192002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7820
7821 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7822 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7823 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7824 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7825 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7826 * Makefile.in: Regenerate.
7827 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7828 (sh64-*-netbsd*): New targets.
7829 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7830 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7831 * configure: Regenerate.
7832 * elf32-sh64-nbsd.c: New file.
7833 * elf64-sh64-nbsd.c: New file.
7834 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7835 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7836 bfd_elf64_sh64lnbsd_vec.
7837
b885599b
AM
78382002-06-04 Alan Modra <amodra@bigpond.net.au>
7839
7840 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7841 (bfd_section_from_shdr): Likewise. Set section name of group
7842 sections from signature.
7843 (group_signature): Split out from setup_group. Ensure symbol table
7844 is available.
7845 (bfd_elf_discard_group): New function.
7846 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7847 .gnu.linkonce* sections if they are members of a group.
7848 (set_group_contents): Set GRP_COMDAT flag.
7849 * section.c (bfd_discard_group): New function.
7850 * bfd-in.h (bfd_elf_discard_group): Declare.
7851 * bfd-in2.h: Regenerate.
7852 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7853 (elf_linkonce_p): Define.
7854
90937f86
AM
78552002-06-04 Alan Modra <amodra@bigpond.net.au>
7856
7857 * elf.c (bfd_section_from_shdr): Make "name" const.
7858 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7859 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7860 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7861 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7862 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7863 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7864 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7865 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7866 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7867 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7868 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7869
cf6fb9ce
MR
78702002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7871
7872 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7873 ABI.
7874
cedb70c5
KH
78752002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7876
7877 * elf32-arc.c: Fix formatting.
7878 * elf32-arm.h: Likewise.
7879 * elf32-cris.c: Likewise.
7880 * elf32-dlx.c: Likewise.
7881 * elf32-hppa.c: Likewise.
7882 * elf32-i386.c: Likewise.
7883 * elf32-i386qnx.c: Likewise.
7884 * elf32-or32.c: Likewise.
7885 * elf32-s390.c: Likewise.
7886 * elf32-sh64.c: Likewise.
7887 * elf32-vax.c: Likewise.
7888 * elf32-xstormy16.c: Likewise.
7889 * elf64-alpha.c: Likewise.
7890 * elf64-mmix.c: Likewise.
7891 * elf64-ppc.c: Likewise.
7892 * elf64-s390.c: Likewise.
7893 * elf64-sh64.c: Likewise.
7894 * elf64-x86-64.c: Likewise.
7895
048d873d
RH
78962002-06-02 Richard Henderson <rth@redhat.com>
7897
7898 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7899 null when there are no got entries for a symbol.
7900 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7901 uninitialized variable warning.
7902
4a67a098
RH
79032002-06-01 Richard Henderson <rth@redhat.com>
7904
7905 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7906 undefined symbols here.
7907 (elf64_alpha_relax_section): Do it here. Also test for not
7908 defined in the current module.
7909 (elf64_alpha_relocate_section_r): Split out of ...
7910 (elf64_alpha_relocate_section): ... here. Don't dereference
7911 NULL when looking up local got entries.
7912
f44f99a5
RH
79132002-06-01 Richard Henderson <rth@redhat.com>
7914
7915 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7916 symbols from JSR relaxation.
7917 (elf64_alpha_size_plt_section_1): New.
7918 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7919 (elf64_alpha_size_rela_got_1): ... here.
7920 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7921 (elf64_alpha_size_rela_got_section): ... here.
7922 (elf64_alpha_size_plt_section): New.
7923 (elf64_alpha_relax_section): Call them.
7924 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7925 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7926
9e756d64
RH
79272002-06-01 Richard Henderson <rth@redhat.com>
7928
7929 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7930 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7931 in shared libraries. Fix DTPRELHI and TPRELHI value.
7932 (INSN_ADDQ, INSN_RDUNIQ): New.
7933 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7934 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7935 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7936 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7937 Handle GOTDTPREL and GOTTPREL relocations.
7938 (elf64_alpha_relax_gprelhilo): New.
7939 (elf64_alpha_relax_tls_get_addr): New.
7940 (elf64_alpha_relax_find_tls_segment): New.
7941 (elf64_alpha_relax_section): Handle TLS relocations.
7942 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7943 (elf64_alpha_check_relocs): Set it.
7944
c853d7f6
RH
79452002-06-01 Richard Henderson <rth@redhat.com>
7946
b646261c
RH
7947 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7948
c853d7f6
RH
7949 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7950 check; don't suppress dynamic relocs for non-allocated sections.
7951
d7e41a96
RH
7952 * elf64-alpha.c: Remove dead code.
7953
5f333394
AM
79542002-05-31 Alan Modra <amodra@bigpond.net.au>
7955
08e0ee05
AM
7956 * bfd-in2.h: Regenerate.
7957 * libbfd.h: Regenerate.
7958 * po/SRC-POTFILES.in: Regenerate.
7959
5f333394
AM
7960 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7961 space for bss .plt.
7962
caf47ea6
AM
79632002-05-31 Graeme Peterson <gp@qnx.com>
7964
7965 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7966 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7967 Run "make dep-am".
7968 * Makefile.in: Regenerate.
7969 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7970 * configure.in: Add bfd_elf32_i386qnx_vec support.
7971 * configure: Regenerate.
7972 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7973 is_contained_by_filepos, and copy_private_bfd_data_p.
7974 * elf.c (assign_file_positions_for_segments): Call backend
7975 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7976 (IS_CONTAINED_BY_FILEPOS): Define.
7977 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7978 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7979 Fix non-K&R call to _bfd_error_handler.
7980 (_bfd_elf_copy_private_section_data): Use backend
7981 copy_private_bfd_data_p.
7982 * elf32-i386.c: Don't include elfxx-target.h when
7983 ELF32_I386_C_INCLUDED is defined.
7984 * elf32-i386qnx.c: New QNX elf backend file.
7985 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7986 elf_backend_is_contained_by_filepos, and
7987 elf_backend_do_copy_private_bfd_data.
7988 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7989
5bc56484
AM
79902002-05-31 Alan Modra <amodra@bigpond.net.au>
7991
7992 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7993 Move other similar defines to start of file.
7994
1b164155
TR
79952002-05-30 Tom Rix <trix@redhat.com>
7996
7997 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7998 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7999
3765b1be
RH
80002002-05-30 Richard Henderson <rth@redhat.com>
8001
8002 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8003 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8004 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8005 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8006 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8007 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8008 n_local_got_entries to total_got_size and local_got_size.
8009 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8010 (alpha_got_entry_size): New.
8011 (elf64_alpha_relax_with_lituse): Use it.
8012 (elf64_alpha_relax_without_lituse): Likewise.
8013 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8014 (get_got_entry): New.
8015 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8016 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8017 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8018 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8019 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8020 (elf64_alpha_calc_got_offsets): Likewise.
8021 (alpha_dynamic_entries_for_reloc): New.
8022 (elf64_alpha_calc_dynrel_sizes): Use it.
8023 (elf64_alpha_size_dynamic_sections): Likewise.
8024 (elf64_alpha_relocate_section): Handle TLS relocations.
8025 * reloc.c: Add Alpha TLS relocations.
8026 * bfd-in2.h, libbfd.h: Rebuild.
8027
5e226794
NC
80282002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8029
8030 * peXXigen.c (pe_print_idata): Remove double printed
8031 import table lines; add Bound-To comment.
8032
90ace9e9
JT
80332002-05-29 Matt Thomas <matt@3am-software.com>
8034
8035 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8036 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8037 (elf32-vax.lo): New rule.
8038 * Makefile.in: Regenerate.
8039 * configure.in (bfd_elf32_vax_vec)
8040 (vaxnetbsd_vec): New vectors.
8041 * configure: Regenerate.
8042 * config.bfd (vax-*-netbsdelf*)
8043 (vax-*-netbsdaout*)
8044 (vax-*-netbsd*): New targets.
8045 * elf32-vax.c: New file.
8046 * reloc.c: Add VAX relocations.
8047 * bfd-in2.h: Regenerate.
8048 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8049
4a253e81
JT
80502002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8051
8052 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8053 and bfd_elf32_bigarm_vec to targ_selvecs.
8054
6e7c73dd
CF
80552002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8056
8057 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8058 with auto-imported symbols.
8059
8afb0e02
NC
80602002-05-29 Adam Nemet <anemet@lnxw.com>
8061
8062 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8063 sections only record bfd.
9bab7074 8064 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 8065 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 8066 * bfd-in2.h: Regenerate.
8afb0e02 8067
a95653f5
NC
80682002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8069
8070 * syms.c (_bfd_stab_section_find_nearest_line): Move
8071 declaration and initialisation of saw_line and saw_func out of
8072 for loop.
8073
7cdc5bba
AM
80742002-05-29 Alan Modra <amodra@bigpond.net.au>
8075
8076 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8077 (bfd_elf64_get_symbol_info): Define.
8078 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8079
4c7aad1c
AM
80802002-05-29 Andrey Volkov <avolkov@transas.com>
8081
8082 * cpu-h8300.c: Make default h8300 machine first in machine list.
8083
d172d4ba
NC
80842002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8085
8086 * config.bfd: Added DLX configuraton.
8087 * Makefile.am: Added DLX configuraton.
8088 * configure.in: Added DLX configuraton.
8089 * archures.c: Add DLX architecure.
8090 * reloc.c: Add DLX relocs.
8091 * targets.c: Added DLX target vector.
8092 * configure: Regenerate.
8093 * Makefile.in: Regenreate.
8094 * bfd-in2.h: Regenreate.
8095 * elf32-dlx.c: New file: Support DLX target.
8096 * cpu-dlx.c: New file: Support DLX target.
8097
d1329ca3
AM
80982002-05-25 Alan Modra <amodra@bigpond.net.au>
8099
428d0de3
AM
8100 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8101
d1329ca3
AM
8102 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8103 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8104 strings to point inside function code sym string.
8105 (func_desc_adjust): Likewise.
8106 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8107
3bab7989
ML
81082002-05-24 Michal Ludvig <mludvig@suse.cz>
8109
8110 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8111 (elf64_x86_64_grok_psinfo): Added.
8112
436e8db0
NC
81132002-05-24 TAMURA Kent <kent@netbsd.org>
8114
8115 * config.bfd: Add a target for i386-netbsdpe.
8116
ea1e4b0d
AM
81172002-05-24 Alan Modra <amodra@bigpond.net.au>
8118
8119 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8120 and is_func_descriptor.
8121 (func_desc_adjust): Hide function code sym in shared libs unless
8122 there is a matching exported function descriptor sym.
8123
13ae64f3
JJ
81242002-05-23 Jakub Jelinek <jakub@redhat.com>
8125
8126 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8127 for symbols from SHF_TLS section.
8128 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8129 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8130 (map_sections_to_segments): Build PT_TLS segment if necessary.
8131 (assign_file_positions_for_segments): Likewise.
8132 (get_program_header_size): Account for PT_TLS segment.
8133 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8134 SEC_THREAD_LOCAL sections to STT_TLS.
8135 * reloc.c: Add 386 and IA-64 TLS relocs.
8136 * section.c (SEC_THREAD_LOCAL): Define.
8137 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8138 Remove.
8139 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8140 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8141 unconditionally.
8142 (struct elf_final_link_info): Add first_tls_sec.
8143 (elf_bfd_final_link): Set first_tls_sec.
8144 Compute elf_hash_table (info)->tls_segment.
8145 (elf_link_output_extsym): Handle STT_TLS symbols.
8146 (elf_link_input_bfd): Likewise.
8147 * syms.c (BSF_THREAD_LOCAL): Define.
8148 * bfd-in2.h: Rebuilt.
8149 * libbfd.h: Rebuilt.
8150 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8151 elf_i386_mkobject, elf_i386_object_p): New functions.
8152 (elf_howto_table): Add TLS relocs.
8153 (elf_i386_reloc_type_lookup): Support TLS relocs.
8154 (elf_i386_info_to_howto_rel): Likewise.
8155 (struct elf_i386_link_hash_entry): Add tls_type.
8156 (struct elf_i386_obj_tdata): New.
8157 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8158 New macros.
8159 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8160 (link_hash_newfunc): Clear tls_type.
8161 (elf_i386_check_relocs): Support TLS relocs.
8162 (elf_i386_gc_sweep_hook): Likewise.
8163 (allocate_dynrelocs): Likewise.
8164 (elf_i386_size_dynamic_sections): Likewise.
8165 (elf_i386_relocate_section): Likewise.
8166 (elf_i386_finish_dynamic_symbol): Likewise.
8167 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8168 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8169 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8170 want_tprel, want_dtpmod, want_dtprel.
8171 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8172 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8173 R_IA64_LTOFF_TPREL22.
8174 (elf_code_to_howto_index): Add TLS relocs.
8175 (elfNN_ia64_check_relocs): Support TLS relocs.
8176 (allocate_global_data_got): Account for TLS .got data.
8177 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8178 (elfNN_ia64_install_value): Supprt TLS relocs.
8179 (set_got_entry): Support TLS relocs.
8180 (elfNN_ia64_relocate_section): Likewise.
8181
c62e1cc3
NC
81822002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8183
8184 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8185 BLX reloc round the relocation up rather than down.
8186 * coff-arm.c (coff_arm_relocate_section): Likewise.
8187
c5a43a5d
L
81882002-05-21 H.J. Lu (hjl@gnu.org)
8189
8190 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8191 definition.
8192
afbe61cf
AM
81932002-05-22 Alan Modra <amodra@bigpond.net.au>
8194
8195 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8196 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8197
9c07fe7c
AM
81982002-05-22 Alan Modra <amodra@bigpond.net.au>
8199
8200 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8201 unresolved relocs.
8202 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8203
21611032
TS
82042002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8205
c5cd6d62 8206 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
8207 non-ELF targets.
8208
41241523
TS
82092002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8210
8211 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8212 an error value.
8213 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8214 return with false on error.
8215 (elf_link_input_bfd): Check reloc_emitter return value.
8216
658f2588
JT
82172002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8218
8219 * config.bfd (armeb-*-netbsdelf*): New target.
8220
c862ae31
AM
82212002-05-20 Alan Modra <amodra@bigpond.net.au>
8222
8223 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8224 at the plt call stub.
8225
6dd14845
TS
82262002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8227
8228 * cpu-mips.c (mips_compatible): Don't try to check machine
8229 compatibility.
8230
a58d9c34
TR
82312002-05-18 Tom Rix <trix@redhat.com>
8232
9b5ecbd0 8233 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 8234
ef60b7ff
AM
82352002-05-17 Alan Modra <amodra@bigpond.net.au>
8236
8237 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8238 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8239 we've already warned about an undefined symbol. Report more
8240 detail on reloc errors.
8241
a703a6ea
AM
82422002-05-17 Alan Modra <amodra@bigpond.net.au>
8243
8244 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8245 * configure.in: Invoke AM_INSTALL_LIBBFD.
8246 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8247 (install_libbfd): .. New target.
8248 (uninstall_libbfd): Likewise.
8249 (install-bfdlibLTLIBRARIES): Likewise.
8250 (uninstall-bfdlibLTLIBRARIES): Likewise.
8251 (bfdlibdir): New.
8252 (bfdincludedir): New.
8253 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8254 * aclocal.m4: Regenerate.
8255 * configure: Regenerate.
8256 * Makefile.in: Regenerate.
8257
2c13d98b
NC
82582002-05-17 Stuart Balfour <sbalfour@cisco.com>
8259
8260 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8261 hash loop.
8262
629936c5
NC
82632002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8264
8265 * config.bfd: Add targets for sh64-linux (little endian and
8266 big endian).
8267
e4cf60a8
NC
82682002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8269
8270 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8271 is located in the same section as the import table. Instead
8272 check, and if necessary load the section containing the thunk.
8273
d1e66cd4
NC
82742002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8275
8276 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8277 bfd_bread.
8278 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8279 with bfd_bread.
d1e66cd4 8280
2d653fc7
AM
82812002-05-15 Alan Modra <amodra@bigpond.net.au>
8282
8283 * aix5ppc-core.c: Warning fixes.
8284 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8285 * aout-target.h (MY_bfd_link_just_syms): Define.
8286 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8287 * bfd.c (bfd_link_just_syms): Define.
8288 * binary.c (binary_bfd_link_just_syms): Define.
8289 * bout.c (b_out_bfd_link_just_syms): Define.
8290 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8291 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8292 * coffcode.h (coff_bfd_link_just_syms): Define.
8293 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8294 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8295 (_bfd_elf_link_just_syms): Declare.
8296 * elf.c (_bfd_elf_link_just_syms): New function.
8297 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8298 sections haven't already been discarded by the linker.
8299 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8300 sections and SEC_MERGE sections.
8301 (elf_bfd_discard_info): Similarly here.
8302 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8303 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8304 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8305 * ieee.c (ieee_bfd_link_just_syms): Define.
8306 * ihex.c (ihex_bfd_link_just_syms): Define.
8307 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8308 (_bfd_generic_link_just_syms): Declare.
8309 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8310 * linker.c (_bfd_generic_link_just_syms): New function.
8311 * mmo.c (mmo_bfd_link_just_syms): Define.
8312 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8313 * oasys.c (oasys_bfd_link_just_syms): Define.
8314 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8315 * som.c (som_bfd_link_just_syms): Define.
8316 * srec.c (srec_bfd_link_just_syms): Define.
8317 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8318 (BFD_JUMP_TABLE_LINK): And here.
8319 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8320 * versados.c (versados_bfd_link_just_syms): Define.
8321 * vms.c (vms_bfd_link_just_syms): Define.
8322 * libbfd.h: Regenerate.
8323 * bfd-in2.h: Regenerate.
8324
cb7394f2
TS
83252002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8326
8327 * elf32-mips.c: Remove superfluous definitions copied from
8328 elfxx-mips.c.
8329 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8330 SGIish vectors to check the special case.
8331 (mips_elf_hi16_reloc): Fix comment.
8332 (mips_elf_got16_reloc): Likewise.
8333 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8334 (elf_reloc_map): Code cleanup.
8335 (mips_reloc_map): Add comment.
8336 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8337 (mips_elf32_rtype_to_howto): Likewise.
8338 (mips_elf32_discard_info): Likewise.
8339 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8340 lead to IRIX compatibility now.
8341
8dc1a139
TS
83422002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8343
8344 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8345
2051e1b5
JT
83462002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8347
8348 * config.bfd (shle-*-netbsdelf*): Add target which includes
8349 sh64 support.
8350
83954261
AM
83512002-05-13 David Edelsohn <edelsohn@gnu.org>
8352
8353 * configure.in: Revert 2002-04-07. Instead, auto-configure
8354 HAVE_ST_C_IMPL.
8355 * configure: Regenerate.
8356 * config.in: Regenerate.
8357 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8358 or AIX_5_CORE.
8359
a9bf1154
NC
83602002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8361
8362 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8363 corefiles as well.2
8364 * configure: Regenerate.
8365
3129eb7a
AM
83662002-05-13 Alan Modra <amodra@bigpond.net.au>
8367
8368 * Makefile.am (install-data-local): Install headers to
8369 $(exec_prefix)/include.
8370 * Makefile.in: Regenerate.
8371
a9a32010
DJ
83722002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8373 Daniel Jacobowitz <drow@mvista.com>
8374
8375 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8376 map BFD_RELOC_RVA.
8377
83782002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8379
8380 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8381 hppa*-*-openbsd*): New targets.
8382 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8383 * configure: Regenerate.
8384
f1f0d9ab
TR
83852002-05-10 Tom Rix <trix@redhat.com>
8386
ea1e4b0d 8387 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8388 xcoff64_ppc_relocate_section.
8389 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8390 * libxcoff.h: Common xcoff_reloc_type function declaration.
8391
c432ba1a
AM
83922002-05-10 Alan Modra <amodra@bigpond.net.au>
8393
16a10388 8394 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8395 added in 2002-05-09 commit.
16a10388 8396
c432ba1a
AM
8397 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8398 don't look for stubs on all undefined syms.
8399
4a335f3d
AM
84002002-05-09 Alan Modra <amodra@bigpond.net.au>
8401
8fc39d5d
AM
8402 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8403 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8404 pcrel_offset.
8405
4a335f3d
AM
8406 * elf32-i386.c (elf_howto_table): Comments.
8407 (elf_i386_relocate_section): Handle more relocs for relocatable
8408 linking and against SEC_MERGE sections.
8409
41fcb14e
AM
84102002-05-08 Alan Modra <amodra@bigpond.net.au>
8411
8412 * elf32-ppc.c (ppc_elf_create_got): New function.
8413 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8414 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8415 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8416 _bfd_elf_create_got_section.
8417
b491616a
AM
84182002-05-07 Alan Modra <amodra@bigpond.net.au>
8419
8420 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8421 * elfxx-target.h (elf_backend_rela_normal): Define.
8422 (elfNN_bed): Init rela_normal.
8423 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8424 for section symbols here if rela_normal. Simplify abs section test.
8425 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8426 return immediately. Remove code handling relocatable linking.
8427 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8428 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8429 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8430 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8431 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8432 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8433 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8434 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8435 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8436 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8437 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8438 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8439 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8440 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8441 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8442 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8443 * elf-m10200.c (elf_backend_rela_normal): Define.
8444 * elf-m10300.c (elf_backend_rela_normal): Define.
8445 * elf32-fr30.c (elf_backend_rela_normal): Define.
8446 * elf32-i370.c (elf_backend_rela_normal): Define.
8447 * elf32-i860.c (elf_backend_rela_normal): Define.
8448 * elf32-m68k.c (elf_backend_rela_normal): Define.
8449 * elf32-mcore.c (elf_backend_rela_normal): Define.
8450 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8451 * elf32-ppc.c (elf_backend_rela_normal): Define.
8452 * elf32-s390.c (elf_backend_rela_normal): Define.
8453 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8454 * elf64-ppc.c (elf_backend_rela_normal): Define.
8455 * elf64-s390.c (elf_backend_rela_normal): Define.
8456 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8457 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8458 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8459 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8460
df212a7e
NC
84612002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8462
8463 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8464 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8465
3decf53c
AM
84662002-05-06 Alan Modra <amodra@bigpond.net.au>
8467
8468 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8469 when not relocatable. Fix reloc_emitter call for K&R.
8470
f46c2da6
AM
84712002-05-04 Alan Modra <amodra@bigpond.net.au>
8472
8473 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8474 reloading local sym addend mistakenly removed in 2002-05-01 change.
8475
8476 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8477 (read_abbrevs): Change "offset" param to bfd_vma.
8478 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8479 Change "abbrev_offset" to bfd_vma.
8480 (read_indirect_string): Use correct conversion chars in error
8481 message format string, cast bfd_vma's to unsigned long.
8482 (read_abbrevs): Likewise.
8483 (read_attribute_value): Likewise.
8484 (decode_line_info): Likewise.
8485 (scan_unit_for_functions): Likewise.
8486 (parse_comp_unit): Likewise.
8487
59862849
TR
84882002-05-04 Tom Rix <trix@redhat.com>
8489
8490 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8491 (coff_swap_reloc_out): Same.
8492 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8493 (xcoff_swap_reloc_out): Same.
8494 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8495 case some 16 bit relocs. Add reloc value to output.
8496 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8497 R_RBR. Improve names.
59862849
TR
8498 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8499 (bfd_xcoff_backend_data): Update with new reloc swap names.
8500 (bfd_pmac_xcoff_backend_data) : Same.
8501 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8502 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8503 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8504 R_POS. Add reloc value to output.
ea1e4b0d
AM
8505 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8506 bit R_RBR. Improve names, masks.
59862849
TR
8507 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8508 (bfd_xcoff_backend_data): Update with new reloc swap names.
8509 (bfd_xcoff_aix5_backend_data) : Same.
8510
b4655ea9
AM
85112002-05-04 Alan Modra <amodra@bigpond.net.au>
8512
8513 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8514 bfd_count top_index, input_list, all_local_syms.
8515 (elf32_hppa_setup_section_lists): New function, split from
8516 elf32_hppa_size_stubs.
8517 (elf32_hppa_next_input_section): Likewise.
8518 (group_sections): Likewise.
8519 (get_local_syms): Likewise.
8520 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8521 stubs on undefined syms too.
8522 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8523 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8524 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8525 (elf32_hppa_next_input_section): Declare.
8526
301e3139
AM
85272002-05-04 Bob Byrnes <byrnes@curl.com>
8528
8529 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8530 _bfd_new_bfd.
8531
7c5fcef7
L
85322002-05-03 H.J. Lu (hjl@gnu.org)
8533
8534 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8535 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8536 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8537 to hide a global symbol.
8538 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8539 forced_local to true.
7c5fcef7 8540
84de6048
RH
85412002-05-02 Richard Henderson <rth@redhat.com>
8542
8543 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8544 vs SHN_UNDEF to zero.
8545
805fc799
AM
85462002-05-02 Alan Modra <amodra@bigpond.net.au>
8547
c061c2d8
AM
8548 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8549 16 bit reloc.
8550 <R_PPC64_SECTOFF_DS>: Likewise.
8551 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8552 SECTOFF reloc.
8553 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8554 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8555 SECTOFF reloc.
8556
805fc799
AM
8557 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8558 (ppc64_elf_ha_reloc): New function.
8559 (ppc64_elf_brtaken_reloc): New function.
8560 (ppc64_elf_sectoff_reloc): New function.
8561 (ppc64_elf_sectoff_ha_reloc): New function.
8562 (ppc64_elf_toc_reloc): New function.
8563 (ppc64_elf_toc_ha_reloc): New function.
8564 (ppc64_elf_toc64_reloc): New function.
8565 (ppc64_elf_unhandled_reloc): New function.
8566 (ppc64_elf_howto_raw): Use the above.
8567 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8568 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8569 <R_PPC64_SECTOFF_DS>: Likewise.
8570 (IS_ABSOLUTE_RELOC): Update.
8571 (struct ppc_link_hash_table): Add have_undefweak.
8572 (ppc64_elf_link_hash_table_create): Init.
8573 (func_desc_adjust): Set have_undefweak.
8574 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8575 add the .sfpr blr when have_undefweak.
8576 (ppc64_elf_setup_section_lists): Check hash table flavour.
8577 (ppc64_elf_next_input_section): Move output_section->owner test to
8578 ppc64elf.em.
8579 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8580 and relocatable test. Return TOCstart and don't set elf_gp.
8581 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8582 offset calculation. Add assert on weak sym branch tweaks.
8583 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8584 (ppc64_elf_toc): Declare.
8585 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8586
818c39a3
AM
85872002-05-01 Alan Modra <amodra@bigpond.net.au>
8588
8589 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8590 file_name.
8591
721956f4
AM
85922002-05-01 Alan Modra <amodra@bigpond.net.au>
8593
8594 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8595 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8596 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8597 call branches. Correct undefined weak destination.
8598 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8599 .sfpr, and correct case where either only savef* or restf* is
8600 needed.
8601
8602 Long branch stubs, multiple stub sections.
8603 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8604 (ppc64_elf_next_input_section): Declare.
8605 * elf64-ppc.c: Move linker-only prototypes.
8606 (STUB_SUFFIX): Define.
8607 (enum ppc_stub_type): New.
8608 (struct ppc_stub_hash_entry): New.
8609 (struct ppc_branch_hash_entry): New.
8610 (struct ppc_link_hash_entry): Add stub_cache, oh.
8611 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8612 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8613 Rename plt_overflow to stub_error.
8614 (ppc_stub_hash_lookup): Define.
8615 (ppc_branch_hash_lookup): Define.
8616 (stub_hash_newfunc): New function.
8617 (branch_hash_newfunc): New function.
8618 (link_hash_newfunc): Init new fields.
8619 (ppc64_elf_link_hash_table_create): Likewise.
8620 (ppc64_elf_link_hash_table_free): New function.
8621 (ppc_stub_name): New function.
8622 (ppc_get_stub_entry): New function.
8623 (ppc_add_stub): New function.
8624 (create_linkage_sections): Use bfd_make_section_anyway. Create
8625 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8626 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8627 and set up for plt call stubs. Link func and func desc syms.
8628 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8629 (func_desc_adjust): Avoid hash lookup when func desc sym available
8630 via shortcut, and set links when processing.
8631 (ppc64_elf_hide_symbol): Likewise.
8632 (allocate_dynrelocs): Don't allocate stub section here.
8633 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8634 Remove sstub code.
8635 (ppc_type_of_stub): New function.
8636 (build_one_stub): Delete.
8637 (ppc_build_one_stub): New function.
8638 (ppc_size_one_stub): New function.
8639 (ppc64_elf_setup_section_lists): New function.
8640 (ppc64_elf_next_input_section): New function.
8641 (group_sections): New function.
8642 (get_local_syms): New function.
8643 (ppc64_elf_size_stubs): Rewrite.
8644 (ppc64_elf_build_stubs): Rewrite.
8645 (ppc64_elf_relocate_section): Look up stub entry for REL24
8646 relocs. Don't propagate REL14* to dynamic objects. Look for long
8647 branch stubs if REL14* or REL24 relocs won't reach.
8648 (bfd_elf64_bfd_link_hash_table_free): Define.
8649
09c2219b
MM
86502002-04-30 Mark Mitchell <mark@codesourcery.com>
8651
c5cd6d62 8652 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8653
07b678c0
TR
86542002-04-30 Tom Rix <trix@redhat.com>
8655
8656 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8657 symbol names into the hash table.
8658
dbe341c6
TR
86592002-04-28 Tom Rix <trix@redhat.com>
8660
8661 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8662 calulating relocations.
dbe341c6 8663 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8664 (xcoff_ppc_relocate_section): Use relocation and complain function
8665 tables.
8666 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8667 (xcoff_complain_overflow_signed_func): Same.
8668 (xcoff_complain_overflow_bitfield_func): Same.
8669 (xcoff_complain_overflow_dont_func): Same.
8670 (xcoff_reloc_type_crel): New recot function.
8671 (xcoff_reloc_type_br): Same.
8672 (xcoff_reloc_type_ba): Same.
8673 (xcoff_reloc_type_toc): Same.
8674 (xcoff_reloc_type_rel): Same.
8675 (xcoff_reloc_type_neg): Same.
8676 (xcoff_reloc_type_pos): Same.
8677 (xcoff_reloc_type_fail): Same.
8678 (xcoff_reloc_type_noop): Same.
8679 * libxcoff.h : Declare common parts for xcoff64.
8680 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8681 and complain function tables.
dbe341c6 8682
985142a4
AM
86832002-04-28 Alan Modra <amodra@bigpond.net.au>
8684
8685 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8686 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8687
eba91044
AM
86882002-04-26 Alan Modra <amodra@bigpond.net.au>
8689
e54fdaa5
AM
8690 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8691 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8692
a50c1845
AM
8693 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8694 same as the output before calling elf_link_input_bfd.
8695
eba91044
AM
8696 * coffcode.h (coff_compute_section_file_positions): Set
8697 section_tail after shuffling section list.
8698
3c25c5f6
NC
86992002-04-24 Christian Groessler <chris@groessler.org>
8700
8701 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8702 addresses are 23bit with a special layout, not plain 32bit
8703 values. Prevent relocation of immediate values.
8704
40d32fc6
CD
87052002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8706
8707 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8708 MIPS-16 ASE flags are set, print something to indicate that.
8709
067fa4a6
AM
87102002-04-23 Alan Modra <amodra@bigpond.net.au>
8711
8712 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8713 under which a plt call stub is used.
8714 (final_link_relocate): Similarly.
8715 (allocate_plt_static): Clear h-plabel except when plt entry is
8716 exclusively used for a plabel.
8717 (allocate_dynrelocs): Use the above to simplify plt sizing.
8718 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8719 (elf32_hppa_link_hash_table_create): Init.
8720 (BL22_RP): Define.
8721 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8722 (elf32_hppa_check_relocs): Set has_22bit_branch.
8723
8724 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8725 (final_link_relocate): Likewise.
8726
af40ce3c
JJ
87272002-04-22 Jakub Jelinek <jakub@redhat.com>
8728
8729 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8730 search table if some FDE is DW_EH_PE_aligned encoded either.
8731 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8732
09ae86c2
JJ
87332002-04-22 Richard Smith <richard@ex-parrot.com>
8734 Jakub Jelinek <jakub@redhat.com>
8735
8736 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8737 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8738 encoded personality.
8739 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8740 for CIE/FDE removal.
8741
deeb2cd7
TR
87422002-04-20 Tom Rix <trix@redhat.com>
8743
8744 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8745
99dc0092
AM
87462002-04-20 Alan Modra <amodra@bigpond.net.au>
8747
aa3d5824
AM
8748 * archures.c (bfd_lookup_arch): Move the list order comment..
8749 (struct bfd_arch_info): ..to where it belongs.
8750 * bfd-in2.h: Regenerate.
8751
99dc0092
AM
8752 * archures.c (bfd_lookup_arch): Add comment on list order.
8753 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8754 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8755 is always at head of list.
8756
7831a775
NC
87572002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8758
8759 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8760 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8761 definition of these functions for ARM_WINCE builds as they are
8762 not used.
ea1e4b0d 8763 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8764 for ARM_WINCE builds.
8765
87662002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8767
ea1e4b0d 8768 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8769
87702002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8771
8772 * cpu-sh.c (scan_mach): Delete.
8773 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8774 (bfd_sh_arch): Likewise.
8775
3d8dbe36
NC
87762002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8777
8778 * ihex.c (ihex_write_object_contents): Fix check for records
8779 crossing 64K boundaries.
8780
4ab82700
AM
87812002-04-16 Alan Modra <amodra@bigpond.net.au>
8782
8783 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8784 type rather than just assuming entries are ELF.
8785 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8786 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8787 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8788 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8789 rather than elf_link_hash_entry.
8790
036fe0fe
RH
87912002-04-15 Richard Henderson <rth@redhat.com>
8792
8793 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8794 n32 binaries.
8795
c4f3d130
NC
87962002-04-15 Michael Snyder <msnyder@redhat.com>
8797
8798 * opncls.c (bfd_close): Write contents if writeable.
8799 Minor formatting tidy-ups.
8800
4ab82700 88012002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8802
8803 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8804
0c04d169
MS
88052002-04-12 Michael Snyder <msnyder@redhat.com>
8806
8807 * bfd-in.h (bfd_get_section_lma): New access macro.
8808 Minor white-space fix-up.
8809
89d4966f
AM
88102002-04-12 Alan Modra <amodra@bigpond.net.au>
8811
8812 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8813 header pad.
8814
8d0da3c2
DD
88152002-04-09 DJ Delorie <dj@redhat.com>
8816
8817 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8818
05793179
NC
88192002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8820
8821 * coffcode.h (coff_read_word): New.
8822 (coff_compute_checksum): New.
8823 (coff_apply_checksum): New.
8824 (coff_write_object_contents): Call coff_apply_checksum () to
8825 apply checksum to PE image.
8826
46fe4e66
AM
88272002-04-08 Randolph Chung <tausq@debian.org>
8828
8829 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8830 (elf32_hppa_final_link): Split out sorting logic to..
8831 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8832 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8833
3b5b409c
AC
88342002-04-07 Andrew Cagney <ac131313@redhat.com>
8835
8836 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8837 pattern.
8838 * configure: Re-generate.
8839
ac7b6ceb
AC
88402002-04-07 Andrew Cagney <ac131313@redhat.com>
8841
8842 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8843 is greater or equal to 4.3.3.
8844 * configure: Regenerate.
8845 Fix PR gdb/344.
8846
44aa49bb
HPN
88472002-04-05 Hans-Peter Nilsson <hp@axis.com>
8848
8849 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8850 R_CRIS_32_PCREL>: Fix typo in name.
8851 (cris_elf_check_relocs): Always create .rela.got here when
8852 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8853 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8854 assume it's created.
8855
e2d34d7d
DJ
88562002-04-04 Daniel Jacobowitz <drow@mvista.com>
8857
8858 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8859 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8860 define.
8861 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8862 * bfd.c (bfd_link_hash_table_free): Define.
8863 * binary.c (binary_bfd_link_hash_table_free): Define.
8864 * bout.c (b_out_bfd_link_hash_table_free): Define.
8865 * coff-rs6000.c (rs6000coff_vec): Include
8866 _bfd_generic_link_hash_table_free.
8867 (pmac_xcoff_vec): Likewise.
8868 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8869 (aix5coff64_vec): Likewise.
8870 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8871 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8872 (bfd_elf32_bfd_link_hash_table_free): Define.
8873 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8874 (bfd_elf32_bfd_link_hash_table_free): Define.
8875 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8876 define.
8877 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8878 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8879 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8880 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8881 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8882 (_bfd_generic_link_hash_table_free): Add prototype.
8883 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8884 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8885 * linker.c (_bfd_generic_link_hash_table_free): New function.
8886 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8887 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8888 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8889 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8890 * som.c (som_bfd_link_hash_table_free): Define.
8891 * srec.c (srec_bfd_link_hash_table_free): Define.
8892 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8893 * versados.c (versados_bfd_link_hash_table_free): Define.
8894 * vms.c (vms_bfd_link_hash_table_free): New function.
8895 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8896
8897 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8898 instead of bfd_alloc.
8899 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8900 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8901 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8902 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8903 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8904 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8905 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8906 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8907 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8908 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8909 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8910 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8911 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8912 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8913 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8914 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8915 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8916 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8917 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8918 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8919 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8920 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8921 * m68klinux.c (linux_link_hash_table_create): Likewise.
8922 * sparclinux.c (linux_link_hash_table_create): Likewise.
8923 * sunos.c (sunos_link_hash_table_create): Likewise.
8924 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8925
8926 * targets.c: Add _bfd_link_hash_table_free to xvec.
8927
8928 * bfd-in2.h: Regenerate.
8929 * libbfd.h: Regenerate.
8930 * libcoff.h: Regenerate.
8931
830629ab
AM
89322002-04-04 Alan Modra <amodra@bigpond.net.au>
8933
8934 * dep-in.sed: Cope with absolute paths.
8935 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8936 Run "make dep-am".
8937 * Makefile.in: Regenerate.
8938 * coff-arm.c: Fix copyright date.
8939 * cpu-h8300.c: Likewise.
8940 * cpu-i370.c: Likewise.
8941 * cpu-s390.c: Likewise.
8942 * cpu-mips.c: Likewise.
8943 * po/SRC-POTFILES.in: Regenerate.
8944
c6e90b02
TS
89452002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8946
8947 * Makefile.am: Add elfxx-mips.c to the known backends.
8948 (elf32-mips.lo): remove dependency to coff/external.h.
8949 * Makefile.in: Regenerate.
8950 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8951 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8952 accordingly.
8953 * configure: Regenerate.
8954 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8955 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8956 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8957 MIPS specific backend functions.
8958 * elf32-mips.c: Moved most code to elfxx-mips.c.
8959 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8960 static.
8961 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8962 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8963 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8964 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8965 interface to allow selection of the right REL or RELA howto table.
8966 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8967 static. Let it refuse n32 objects.
8968 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8969 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8970 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8971 (elf32_mips_ignore_discarded_relocs): Rename from
8972 _bfd_elf32_mips_ignore_discarded_relocs.
8973 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8974 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8975 (elf_mips_howto_table_rela): Remove.
8976 * elf64-mips.c: Moved most code to elfxx-mips.c.
8977 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8978 (mips_elf64_rtype_to_howto): New function.
8979 (mips_elf64_object_p): Likewise.
8980 (elf64_mips_irix_compat): Likewise.
8981 * elfxx-mips.c: New file containing common code merged together from
8982 elf32-mips.c and elf64-mips.c.
8983 * elfxx-mips.h: New file containing MIPS specific prototypes from
8984 elf-bfd.h.
8985 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8986 elf_backend_mips_rtype_to_howto.
8987
d8dce692
AM
89882002-04-04 Alan Modra <amodra@bigpond.net.au>
8989
8990 * srec.c (MAXCHUNK, Chunk): Revise comments.
8991 (srec_write_record): Correct buffer size.
8992 (srec_write_header): Do without intermediate buffer.
8993 (srec_write_section): Validate Chunk.
8994 (srec_write_terminator): Pass NULL instead of dummy buffer.
8995 (srec_write_symbols): Pass file and symbol names directly to
8996 bfd_bwrite so sprintf won't overflow buffer.
8997
b88a866a
JJ
89982002-04-03 Jakub Jelinek <jakub@redhat.com>
8999
9000 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9001 PC relative relocs against hidden symbols.
9002 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9003
d7866f04
AM
90042002-04-03 Alan Modra <amodra@bigpond.net.au>
9005
9006 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9007 LMAs, loop over segments until p_vaddr and p_memsz specify an
9008 extent enclosing the section.
9009
9e81ee67
NC
90102002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9011
9012 * ihex.c (ihex_write_object_contents): Do not allow records to
9013 cross a 64K boundary - wrap if necessary.
9014
d2b64500
JT
90152002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9016
9017 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9018 which caused the returned LWP ID to always be 0.
9019
e36f7d53
RH
90202002-04-01 Richard Henderson <rth@redhat.com>
9021
9022 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9023 (elf32_sparc_relocate_section): Use it to figure out when to
9024 initialize .got entries.
9025 * elf64-sparc.c: Similarly.
9026
e92d460e
AM
90272002-03-28 Alan Modra <amodra@bigpond.net.au>
9028
9029 * linker.c (link_action): Ignore duplicate warning syms.
9030 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9031 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9032 (elf_adjust_dynamic_symbol): Likewise.
9033 (elf_export_symbol): Likewise.
9034 (elf_link_find_version_dependencies): Likewise.
9035 (elf_link_assign_sym_version): Likewise.
9036 (elf_link_sec_merge_syms): Likewise.
9037 (elf_link_output_extsym): Likewise.
9038 (elf_gc_sweep_symbol): Likewise.
9039 (elf_gc_propagate_vtable_entries_used): Likewise.
9040 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9041 (elf_gc_allocate_got_offsets): Likewise.
9042 (elf_collect_hash_codes): Likewise.
9043 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9044 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9045 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9046 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9047 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9048 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9049 (elf_cris_discard_excess_dso_dynamics): Likewise.
9050 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9051 (mark_PIC_calls): Likewise.
9052 (allocate_plt_static): Likewise.
9053 (allocate_dynrelocs): Likewise.
9054 (readonly_dynrelocs): Likewise.
9055 * elf32-i386.c (allocate_dynrelocs): Likewise.
9056 (readonly_dynrelocs): Likewise.
9057 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9058 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9059 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9060 (mips_elf_sort_hash_table_f): Likewise.
9061 (mips_elf_check_mips16_stubs): Likewise.
9062 * elf32-s390.c (allocate_dynrelocs): Likewise.
9063 (readonly_dynrelocs): Likewise.
9064 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9065 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9066 (xstormy16_relax_plt_realloc): Likewise.
9067 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9068 (elf64_alpha_output_extsym): Likewise.
9069 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9070 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9071 (mips_elf64_check_mips16_stubs): Likewise.
9072 (mips_elf64_output_extsym): Likewise.
9073 * elf64-ppc.c (func_desc_adjust): Likewise.
9074 (allocate_dynrelocs): Likewise.
9075 (readonly_dynrelocs): Likewise.
9076 * elf64-s390.c (allocate_dynrelocs): Likewise.
9077 (readonly_dynrelocs): Likewise.
9078 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9079 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9080 (readonly_dynrelocs): Likewise.
9081 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9082 * aoutx.h (aout_link_write_other_symbol): Likewise.
9083 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9084 (_bfd_coff_write_global_sym): Likewise.
9085 * i386linux.c (linux_tally_symbols): Likewise.
9086 * m68klinux.c (linux_tally_symbols): Likewise.
9087 * sparclinux.c (linux_tally_symbols): Likewise.
9088 * pdp11.c (aout_link_write_other_symbol): Likewise.
9089 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9090 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9091 (xcoff_write_global_symbol): Likewise.
9092
9093 * cofflink.c (_bfd_coff_final_link): Formatting.
9094 * cpu-mips.c (mips_compatible): Make static, prototype.
9095 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9096 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9097 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9098 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9099 (mips_elf64_final_link): Likewise.
9100 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9101 prototype.
9102
2106126f
NC
91032002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9104
9105 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9106 (SWAP_OUT_RELOC_OFFSET): Define.
9107
b99d1833
AM
91082002-03-27 Gregory Steuck <greg@nest.cx>
9109
9110 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9111 terminating NULL if empty symbol table.
9112 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9113
ad43ed4c
L
91142002-03-26 H.J. Lu (hjl@gnu.org)
9115
9116 * elflink.h (elf_link_input_bfd): Revert the last change since
9117 the gcc exception handling isn't fixed yet.
9118
3851fca4
L
91192002-03-26 H.J. Lu (hjl@gnu.org)
9120
9121 * elflink.h (elf_link_input_bfd): Complain about relocations
9122 against local symbols in discarded sections.
9123
b91afed7
AM
91242002-03-26 Alan Modra <amodra@bigpond.net.au>
9125
9126 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9127
dba143ef
AM
91282002-03-23 Alan Modra <amodra@bigpond.net.au>
9129
9130 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9131 section file offset for !SEC_LOAD sections.
9132
ee29b9fb
RE
91332002-03-21 Richard Earnshaw <rearnsha@arm.com>
9134
830629ab
AM
9135 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9136 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 9137
54327882
AM
91382002-03-21 Alan Modra <amodra@bigpond.net.au>
9139
9140 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9141 Whitespace changes.
9142 * archive.c: Update copyright date.
9143 * bfd-in2.h: Regenerate.
9144 * libbfd.h: Regenerate.
9145 * Makefile.am: Run "make dep-am"
9146 * Makefile.in: Regenerate.
9147 * po/SRC-POTFILES.in: Regenerate.
9148
1ee24f27
DJ
91492002-03-20 Daniel Jacobowitz <drow@mvista.com>
9150
9151 * dwarf2.c (struct funcinfo): Move up.
9152 (lookup_address_in_function_table): New argument function_ptr.
9153 Set it.
9154 (lookup_address_in_line_table): New argument function. If function
9155 is non-NULL, use it to handle ``addr'' before the first line note of
9156 the function.
9157 (comp_unit_find_nearest_line): Update and swap calls to
9158 lookup_address_in_function_table and lookup_address_in_line_table.
9159 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9160 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9161
51b9608c
TR
91622002-03-20 Tom Rix <trix@redhat.com>
9163
ea1e4b0d 9164 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 9165 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 9166 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 9167
789c90aa
TR
91682002-03-19 Tom Rix <trix@redhat.com>
9169
ea1e4b0d 9170 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
9171 dynamic objects in archives.
9172
1da54d81
HPN
91732002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9174
9175 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9176 STT_NOTYPE symbols to STT_OBJECT.
9177
7831a775 91782002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
9179
9180 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9181
eb1e0e80
NC
91822002-03-18 Tom Rix <trix@redhat.com>
9183
9184 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9185 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9186 * coff-rs6000 (do_pad) : New function for archive padding.
9187 (do_copy) : New function for object file copying in archives.
9188 (do_shared_object_padding) : New function for padding shared
9189 objects to their text section alignment in archives.
9190 (bfd_xcoff_ar_achive_set_magic) : Stub.
9191 (xcoff_write_armap_big) : Use do_copy and do_pad.
9192 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9193 do_copy and do_pad.
9194 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 9195 bfd_xcoff_magic_number.
eb1e0e80
NC
9196 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9197 fop.
9198 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9199 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9200 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9201 * rs6000-core.c : Update copyright date.
ea1e4b0d 9202 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
9203 csectpp.
9204 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9205 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9206 (coff_set_flags) : Use bfd_xcoff_magic_number.
9207 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9208 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9209 * Makefile.am : Same.
9210 * config.bfd : Same.
9211 * targets.c : Same.
9212 * configure : Regnerate.
9213 * Makefile.in : Same.
9214 * bfd-in2.h : Same.
9215
a1c259a1
NC
92162002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9217
9218 * po/fr.po: Updated version.
9219
4dae1ae7
AM
92202002-03-18 Alan Modra <amodra@bigpond.net.au>
9221
9222 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9223 * libbfd.h: Regenerate.
9224 * archive.c (coff_write_armap): Pass on failures from
9225 bfd_write_bigendian_4byte_int.
9226
36b4f6e7
L
92272002-03-14 H.J. Lu <hjl@gnu.org>
9228
9229 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9230 error to bfd_error_nonrepresentable_section for reinit_array
9231 section in DSO.
9232
a1aefc76
NC
92332002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9234
a181be0a
NC
9235 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9236 OR it in rather than replacing previously selected flags.
9237
a1aefc76
NC
9238 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9239 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9240
c119f9b8
AM
92412002-03-14 Alan Modra <amodra@bigpond.net.au>
9242
9243 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9244 (N): Use the above.
9245 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9246 ensure reloc size matches before calling elf_link_input_bfd.
9247 Add an assert to check reloc size when counting output relocs.
9248
c295a511
NC
92492002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9250
9251 * mmo.c (mmo_get_loc): Return NULL rather than false.
9252
9ce88e60
NC
92532002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9254
9255 * po/fr.po: Updated version.
9256
4ddafab0
AM
92572002-03-13 Alan Modra <amodra@bigpond.net.au>
9258
b74fa2cd
AM
9259 * archures.c (bfd_default_compatible): Test bits_per_word.
9260 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9261 bfd_default_compatible.
9262 * cpu-i370.c (i370_compatible): Likewise.
9263 * cpu-sparc.c (sparc_compatible): Likewise.
9264 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9265
40b829d4
AM
9266 * elflink.h: Formatting fixes.
9267 (elf_link_output_extsym): Merge undefined and undef weak cases.
9268
4ddafab0
AM
9269 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9270 when word size of input matches output word size.
9271
dd53c801
AJ
92722002-03-12 Andreas Jaeger <aj@suse.de>
9273
9274 * cpu-i386.c (i386_compatible): New. Use it instead of
9275 bfd_default_compatible.
9276
aa066ac8
L
92772002-03-07 H.J. Lu (hjl@gnu.org)
9278
9279 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9280 as the type for bfd_reloc_val.
9281
1bf42538
JL
92822002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9283
9284 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9285 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9286 (elf_hppa_final_link_relocate): Correct relocations for indirect
9287 references to local data through the DLT. Fix .opd creation for
9288 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9289 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9290 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9291 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9292 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9293 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9294 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9295
86eaf01e
JJ
92962002-03-05 Jakub Jelinek <jakub@redhat.com>
9297
9298 * merge.c (_bfd_merge_sections): Don't segfault if there
9299 is nothing to merge due to GC.
9300
c44233aa
AM
93012002-03-05 Alan Modra <amodra@bigpond.net.au>
9302
039cc25f
AM
9303 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9304 symbols that have been forced local.
9305
c44233aa
AM
9306 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9307 to output forced local syms for non-shared link.
9308 (elf_link_output_extsym): Tweak condition for calling backend
9309 adjust_dynamic_symbol so that previous behaviour is kept.
9310 Whitespace changes throughout file.
9311
25e27870
L
93122002-03-04 H.J. Lu <hjl@gnu.org>
9313
9314 * elf.c (bfd_section_from_shdr): Handle special sections,
9315 .init_array, .fini_array and .preinit_array.
9316 (elf_fake_sections): Likewise.
9317
9318 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9319 DT entry only if the section is in output for .init_array,
9320 .fini_array and .preinit_array. Complain about .preinit_array
9321 section in DSO.
9322 (elf_bfd_final_link): Warn zero size for .init_array,
9323 .fini_array and .preinit_array sections.
9324
9325 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9326 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9327 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9328 .preinit_array.
9329
bb2a49f2
AM
93302002-03-04 Alan Modra <amodra@bigpond.net.au>
9331
9332 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9333 * configure: Regenerate.
9334
38487e5e
TR
93352002-03-02 Tom Rix <trix@redhat.com>
9336
c44233aa
AM
9337 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9338 symbolic equiv.
38487e5e
TR
9339 * coff-rs6000.c (xcoff_howto_table): Same.
9340
30831527
RH
93412002-03-01 David Mosberger <davidm@hpl.hp.com>
9342
9343 * elflink.h (size_dynamic_sections): If section named
9344 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9345 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9346 ".init_array" and ".fini_array".
9347 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9348 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9349 DT_FINI_ARRAY.
9350
c8e5ddc8
AM
93512002-02-26 Andrew Macleod <amacleod@cygnus.com>
9352
9353 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9354 dynsyms.
9355
96e0dda4
AM
93562002-02-25 Alan Modra <amodra@bigpond.net.au>
9357
1c5b6bf8
AM
9358 * elf64-hppa.h: Update copyright date.
9359
96e0dda4
AM
9360 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9361 (ppc64_elf_relocate_section): Don't generate power4 style branch
9362 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9363
0fb19cbc
JJ
93642002-02-22 Jakub Jelinek <jakub@redhat.com>
9365
9366 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9367 last patch.
9368 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9369
c434dee6
AJ
93702002-02-21 Andreas Jaeger <aj@suse.de>
9371
9372 * elf64-x86-64.c: Major rework that introduces all recent changes
9373 to the x86-64 backend. Get a closer match to elf32-i386.
9374 (struct elf64_x86_64_dyn_relocs): Rename from
9375 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9376 all users.
9377 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9378 sections.
9379 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9380 remove casts, initialize new hash members.
9381 (create_got_section): New.
9382 (elf64_x86_64_create_dynamic_sections): New.
9383 (elf64_x86_64_copy_indirect_symbol): New.
9384 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9385 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9386 Reference count possible .plt and .got entries. Don't test input
9387 section SEC_READONLY here to try to avoid copy relocs, and keep
9388 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9389 DF_TEXTREL here. Delay setting of variables until needed. Cache
9390 pointer to "sreloc" section in elf_section_data. Tweak condition
9391 under which .got created. Report files with bad relocation
9392 section names.
9393 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9394 Reference count possible .plt entries. Don't deallocate .got and
9395 .relgot space here.
9396 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9397 do copy reloc processing for weakdefs. Remove redundant casts and
9398 aborts. Delay setting of vars until needed. Move creation of
9399 dynamic symbols and allocation of .plt and .rela.plt to
9400 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9401 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9402 (allocate_dynrelocs): New.
9403 (readonly_dynrelocs): New.
9404 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9405 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9406 Zero out the dynamic allocated content space.
9407 (elf64_x86_64_discard_copies): Removed.
9408 (elf64_x86_64_relocate_section): Make use of dynamic section
9409 short-cuts. Localise vars, and delay setting. Better error
9410 reporting, replace BFD_ASSERT with abort. Check
9411 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9412 regular object file and tread the weak definition as the normal
9413 one. Don't discard relocs for undefweak or undefined symbols and
9414 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9415 relocs.
9416 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9417 symbols that have been forced local. Use same test to decide if
9418 we can use a relative reloc for got as relocate_section. Expand
9419 SHN_UNDEF comment. Move expressions out of function calls.
9420 Replace BFD_ASSERT with abort.
9421 (bfd_elf64_bfd_final_link): Removed.
9422 (elf_backend_copy_indirect_symbol): Define.
9423
ff3a6ee3
TR
94242002-02-20 Tom Rix <trix@redhat.com>
9425
9426 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9427 (_bfd_xcoff_reloc_type_lookup): Use it.
9428 * coff64-rs6000.c (xcoff64_howto_table): Same.
9429 (xcoff64_reloc_type_lookup): Same.
c434dee6 9430
a68d41fb
AM
94312002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9432
9b5ecbd0 9433 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9434 little endian.
9435
befc3abb
MS
94362002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9437
9438 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9439 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9440 * bfd-in2.h: Regenerate.
9441 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9442 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9443 with "s390:64-bit".
9444 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9445 (elf_s390_reloc_type_lookup): Likewise.
9446 (elf_s390_check_relocs): Likewise.
9447 (elf_s390_gc_sweep_hook): Likewise.
9448 (elf_s390_relocate_section): Likewise.
9449 (elf_s390_object_p): Use renamed architecture define.
9450 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9451
6eeeec9b
FCE
94522002-02-19 Frank Ch. Eigler <fche@redhat.com>
9453
9454 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9455
0bb2d96a
JJ
94562002-02-19 Jakub Jelinek <jakub@redhat.com>
9457
9458 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9459 absptr -> pcrel optimization for shared libs.
9460 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9461 library cannot be converted to pcrel.
9462 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9463 relative.
9464 * elf32-i386.c (elf_i386_relocate_section): If
9465 _bfd_elf_section_offset returned -2, skip, but make sure the
9466 relocation is installed.
9467 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9468 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9469 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9470 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9471 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9472 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9473 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9474 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9475 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9476 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9477 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9478 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9479 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9480 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9481 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9482 _bfd_elf_section_offset returning -2 the same way as -1.
9483 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9484 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9485 and BFD_ASSERT.
9486 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9487
69f284c7
TR
94882002-02-18 Tom Rix <trix@redhat.com>
9489
9490 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9491 (bfd_xcoff_size_dynamic_sections): Same.
9492 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9493 (bfd_xcoff_size_dynamic_sections): Same.
9494 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9495 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9496 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9497 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9498 * bfd-in2.h: Regenerate.
9499
82bd7b59
AM
95002002-02-18 Alan Modra <amodra@bigpond.net.au>
9501
9502 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9503 (struct ppc_link_hash_table): Add sfpr.
9504 (ppc64_elf_link_hash_table_create): Init it.
9505 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9506 .glink out to..
9507 (create_linkage_sections): ..here. Make .sfpr too.
9508 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9509 dynobj early.
9510 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9511 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9512 ._restf* functions, and create as needed.
9513 (func_desc_adjust): Only force_local for shared libs.
9514
ef1355e8
NC
95152002-02-18 David O'Brien <obrien@FreeBSD.org>
9516
9517 * configure.in: Bump version number post 2.12 branching.
9518 * configure: Regenerate.
9519
dfa36a69
HPN
95202002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9521
9522 * mmo.c: Correct and improve comments.
9523 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9524 zero-pad. Use input to fill up non-empty bfd buffer.
9525 (mmo_flush_chunk): New function.
9526 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9527 changed. Don't emit location specifier if VMA is same as
9528 *LAST_VMAP after omitting leading zero contents. Call
9529 mmo_flush_chunk before emitting location specifier.
9530 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9531 with mmo_write_loc_chunk calls.
9532 (mmo_internal_write_section): Call mmo_flush_chunk after
9533 mmo_write_chunk.
9534 (mmo_write_symbols_and_terminator): Move :Main to first position
9535 in symbol array. Add faked one if it does not exist if there are
9536 other symbols. Don't add it if there are no symbols at all. Move
9537 out test for value of :Main from symbol loop. Rename table
9538 fakemain to maintable and variable mainsym to fakemain.
9539
ccf00ab6
RH
95402002-02-15 Richard Henderson <rth@redhat.com>
9541
9542 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9543 section with no got matches any got. Simplify error generaion.
9544
88eaccc2
AM
95452002-02-15 Alan Modra <amodra@bigpond.net.au>
9546
fd96f80f
AM
9547 Support arbitrary length fill patterns.
9548 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9549 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9550 Call default_data_link_order.
9551 (default_fill_link_order): Delete.
9552 (default_data_link_order): New function.
9553 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9554 of bfd_fill_link_order with bfd_data_link_order.
9555 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9556 * elf64-mips.c (mips_elf64_final_link): Likewise.
9557
88eaccc2
AM
9558 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9559 Correct value returned in "end" for "0x<non-hex>".
9560
e2fd756b
NC
95612002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9562
9563 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9564 (scan): Test against 'mach' field in info structure.
9565
edd29cf9
AM
95662002-02-14 Alan Modra <amodra@bigpond.net.au>
9567
9568 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9569
1e30956e 95702002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9571
9572 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9573 EF_M68000.
9574
bf36db18
NC
95752002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9576
9577 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9578 non-zero physical addresses when adjusting the LMAs of new
9579 sections.
bf36db18 9580
189c6563
AM
95812002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9582
9583 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9584 from _bfd_elf_hppa_gen_reloc_type.
9585 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9586 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9587 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9588 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9589
e948afaf
AO
95902002-02-12 Alexandre Oliva <aoliva@redhat.com>
9591
9592 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9593 loading its contents if there's nothing to do in it.
9594
19397422
AM
95952002-02-12 Alan Modra <amodra@bigpond.net.au>
9596
0ad3a73b
AM
9597 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9598 64k boundary.
9599
19397422
AM
9600 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9601 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9602 (ppc64_elf_finish_dynamic_sections): Set values for them.
9603
51316059
MS
96042002-02-11 Michael Snyder <msnyder@redhat.com>
9605
9606 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9607 * elf.c (elfcore_grok_pstatus): Add prototype.
9608 (elfcore_grok_lwpstatus): Add prototype.
9609 (elfcore_write_lwpstatus): New function.
9610 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9611
518313c3
AO
96122002-02-11 Alexandre Oliva <aoliva@redhat.com>
9613
9614 * elf32-sh.c: Added missing prototypes.
9615 * elf32-sh64.c: Likewise.
9616 (sh_elf_align_loads): Mark unused args as such.
9617 * elf64-sh64.c: Added missing prototypes.
9618 (struct elf_sh64_link_hash_entry): Fix typo.
9619 (sh_elf64_relocate_section): Fix info argument passed to
9620 _bfd_elf_section_offset.
9621
2c73f9d8
AM
96222002-02-11 Alan Modra <amodra@bigpond.net.au>
9623
9624 * Makefile.am: "make dep-am".
9625 * Makefile.in: Regenerate.
9626 * aclocal.m4: Regenerate.
9627 * config.in: Regenerate.
9628 * configure: Regenerate.
9629
d426c6b0
DJ
96302002-02-10 Daniel Jacobowitz <drow@mvista.com>
9631
9632 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9633 variable warnings.
9634 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9635 comparison warning.
9636 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9637 cast warnings for the common case.
9638
e58ee0cd
HPN
96392002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9640
9641 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9642 vectors.
9643 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9644 vectors.
9645
7793f4d0
RH
96462002-02-09 Richard Henderson <rth@redhat.com>
9647
9648 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9649 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9650 (elf64_alpha_relocate_section): Likewise.
9651 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9652 * bfd-in2.h, libbfd.h: Rebuild.
9653
7e799044
HPN
96542002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9655
9656 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9657 that base-plus-offset reloc accounting is consistent.
9658 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9659 up to date for undefined symbols.
9660
027d73eb
EC
96612002-02-08 Eric Christopher <echristo@redhat.com>
9662
9663 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9664
9665 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9666 sections for the O32 ABI.
9667
517662d4
CD
96682002-02-08 Chris Demetriou <cgd@broadcom.com>
9669
9670 * elf32-arm.h: Fix formatting of _("...").
9671 * elf32-d10v.c: Likewise.
9672 * elf32-m68k.c: Likewise.
9673 * elf32-mips.c: Likewise.
9674
5e37cc46
NC
96752002-02-08 Ivan Guzvinec <ivang@opencores.org>
9676
9677 * coff-or32.c: Fix compile time warning messages.
9678
fbca6ad9
AO
96792002-02-08 Alexandre Oliva <aoliva@redhat.com>
9680
9681 Contribute sh64-elf.
9682 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9683 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9684 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9685 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9686 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9687 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9688 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9689 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9690 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9691 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9692 New relocs.
9693 * libbfd.h, bfd-in2.h: Rebuilt.
9694 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9695 (sh_reloc_map): Map them.
9696 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9697 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9698 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9699 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9700 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9701 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9702 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9703 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9704 datalabel_got_offset.
9705 (sh_elf_link_hash_newfunc): Initialize it.
9706 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9707 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9708 GOT and GOTOFF handling to new SHmedia relocation types. Support
9709 GOT_BIAS.
9710 (sh_elf_check_relocs): Likewise.
9711 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9712 PLT entries using movi_shori_putval. Support GOT_BIAS.
9713 (sh_elf_finish_dynamic_sections): Likewise.
9714 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9715 relocation, it's now done by the caller.
9716 (GOT_BIAS): New.
9717 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9718 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9719 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9720 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9721 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9722 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9723 sh64_elf64_hash_table): New.
9724 (sh_elf64_howto_table): Introduce new relocs.
9725 (sh_elf64_info_to_howto): Accept new PIC relocs.
9726 (sh_elf64_relocate_section): Augment the scope of
9727 seen_stt_datalabel. Support new PIC relocs.
9728 (sh_elf64_check_relocs): Support new PIC relocs.
9729 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9730 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9731 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9732 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9733 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9734 movi_shori_putval, movi_3shori_putval,
9735 sh64_elf64_create_dynamic_sections,
9736 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9737 sh64_elf64_size_dynamic_sections,
9738 sh64_elf64_finish_dynamic_symbol,
9739 sh64_elf64_finish_dynamic_sections): New.
9740 (elf_backend_create_dynamic-sections,
9741 bfd_elf64_bfd_link_hash_table_create,
9742 elf_backend_adjust_dynamic_symbol,
9743 elf_backend_size_dynamic_sections,
9744 elf_backend_finish_dynamic_symbol,
9745 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9746 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9747 elf_backend_got_header_size, elf_backend_plt_header_size):
9748 Define.
9749 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9750 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9751 match official numbers and names; moved unmaching ones to the
9752 range 0xf2-0xff.
9753 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9754 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9755 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9756 sections.
9b5ecbd0 9757 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9758 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9759 be aligned.
9760 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9761 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9762 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9763 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9764 .cranges section with SEC_SORT_ENTRIES set.
9765 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9766 incoming sorted .cranges section.
9767 (sh64_bfd_elf_copy_private_section_data): New.
9768 (sh64_elf_final_write_processing): Only sort .cranges and modify
9769 start address if called by linker.
9770 2001-01-08 Ben Elliston <bje@redhat.com>
9771 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9772 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9773 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9774 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9775 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9776 line. Add comments before all entries.
9777 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9778 comment.
9779 (sh_elf64_reloc): Correct head comment.
9780 (sh_elf64_relocate_section): Correct spacing.
9781 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9782 instead call reloc_dangerous callback.
9783 <case R_SH_SHMEDIA_CODE>: New case.
9784 (sh_elf64_gc_mark_hook): Correct spacing.
9785 (sh_elf64_check_relocs): Ditto.
9786 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9787 New case.
9788 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9789 functions.
9790 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9791 clarify describing comment. Add comments before all entries.
9792 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9793 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9794 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9795 Sort .cranges section in final link. Prepare to set bit 0 on
9796 entry address.
9797 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9798 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9799 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9800 .cranges section.
9801 (sh64_backend_section_from_shdr): New, to recognize
9802 SHT_SH5_CR_SORTED on incoming .cranges section.
9803 (elf_backend_section_from_shdr): Define.
9804 (sh64_elf_final_write_processing): Sort outgoing .cranges
9805 section. (New, temporarily disabled:) Set bit 0 on entry address
9806 according to ISA type.
9807 (sh64_find_section_for_address): New.
9808 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9809 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9810 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9811 bfd_malloc, not xmalloc.
9812 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9813 global.
9814 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9815 temporarily disabled) setting bit 0 on entry address.
9816 (elf_backend_final_write_processing): Define.
9b5ecbd0 9817 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9818 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9819 be a proper relocation for PTA and PTB rather than a marker.
9820 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9821 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9822 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9823 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9824 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9825 Zero src_mask.
9826 * elf64-sh64.c: Ditto.
9827 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9828 * elf32-sh64.c: Include opcodes/sh64-opc.h
9829 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9830 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9831 parameters. No unused parameters. Caller changed.
9832 <case R_SH_PT_16>: New case.
9833 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9834 * Makefile.in: Regenerate.
9b5ecbd0 9835 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9836 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9837 all code sections.
9838 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9839 (sh64_elf_merge_private_data): Ditto.
9840 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9841 to access stored section flags.
9842 (sh64_elf_final_write_processing): Return immediately unless
9843 called by linker. Use sh64_elf_section_data (cranges) to get size
9844 of linker-generated cranges entries.
9845 (sh64_elf_copy_private_data): Add missing "return true".
9846 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9847 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9848 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9849 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9850 elf64-sh64.c:sh64_elf_fake_sections.
9851 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9852 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9853 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9854 (sh64_elf_final_write_processing): New.
9855 (elf_backend_final_write_processing): Define.
9856 (sh64_elf_fake_sections): Get header flags from tdata field.
9857 (sh64_elf_copy_private_data): Do not call
9858 sh64_elf_copy_private_data_internal, just copy e_flags field.
9859 (sh64_elf_merge_private_data): Do not call
9860 sh64_elf_copy_private_data_internal.
9b5ecbd0 9861 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9862 Remove EF_SH64_ABI64, let ELF size make difference.
9863 Remove SH64-specific BFD section flag.
9864 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9865 containing SHmedia through elf_section_data (asect)->tdata
9866 non-zero, not using a BFD section flag.
9867 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9868 (sh64_elf_merge_private_data): Similar.
9869 (elf_backend_section_flags): Don't define.
9870 (sh64_elf_backend_section_flags): Delete.
9871 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9872 not EF_SH64_ABI64.
9873 (sh_elf64_merge_private_data): Similar.
9874 * section.c (Section flags definitions): Don't define
9875 SEC_SH_ISA_SHMEDIA.
9876 (bfd-in2.h): Regenerate.
9b5ecbd0 9877 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9878 Make DataLabel references work with partial linking.
9879 * elf32-sh64.c: Fix formatting.
9880 (sh64_elf_link_output_symbol_hook): New.
9881 (elf_backend_link_output_symbol_hook): Define to
9882 sh64_elf_link_output_symbol_hook.
9883 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9884 undefined if partial linking. Adjust sanity check.
9885 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9886 (elf_backend_link_output_symbol_hook): Define to
9887 sh64_elf64_link_output_symbol_hook.
9888 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9889 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9890 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9891 Implement semantics for inter-file DataLabel references.
9892 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9893 (sh64_elf64_add_symbol_hook): New.
9894 (sh_elf64_relocate_section): If passing an indirect symbol with
9895 st_type STT_DATALABEL on the way to a symbol with st_other
9896 STO_SH5_ISA32, do not bitor 1 to the relocation.
9897 (elf_backend_add_symbol_hook): Define to
9898 sh64_elf64_add_symbol_hook.
9899 * elf64-sh32.c: Tweak comments.
9900 (DATALABEL_SUFFIX): Define.
9901 (sh64_elf_add_symbol_hook): New.
9902 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9903 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9904 symbol with st_type STT_DATALABEL on the way to a symbol with
9905 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9906 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9907 Pass through STT_DATALABEL.
9908 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9909 (elf_backend_get_symbol_type): Define.
9910 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9911 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9912 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9913 * elf32-sh64.c: Tweak comments.
9914 (sh64_elf_copy_private_data_internal): Add prototype.
9915 (bfd_elf32_bfd_set_private_flags): Define.
9916 (sh64_elf_copy_private_data_internal): Compare machine name, not
9917 textual BFD target name, to check whether to copy section flag
9918 SHF_SH5_ISA32.
9919 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9920 Tweak section-contents-type-mismatch message.
9921 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9922 Validize reloc-types.
9923 * elf64-sh64.c: New file.
9924 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9925 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9926 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9927 Regenerate dependencies.
9928 * Makefile.in: Regenerate.
9929 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9930 bfd_elf64_sh64l_vec.
9931 * configure.in: Handle bfd_elf64_sh64_vec and
9932 bfd_elf64_sh64l_vec.
9933 * configure: Regenerate.
9934 * po/POTFILES.in: Regenerate.
9935 * po/bfd.pot: Regenerate.
9b5ecbd0 9936 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9937 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9938 anything else but EF_SH64 and EF_SH64_ABI64.
9939 (sh64_elf_merge_private_data): Emit error for anything else but
9940 EF_SH64 and EF_SH64_ABI64.
9941 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9942 from targ_selvecs.
9943 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9944 bfd_elf32_sh64l_vec as a temporary measure.
9945 * configure: Regenerate.
9b5ecbd0 9946 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9947 * cpu-sh.c (arch_info_struct): Include sh5 item
9948 unconditionalized.
9949 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9950 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9951 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9952 * elf32-sh64.c: Tweak comments.
9953 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9954 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9955 (sh64_elf_copy_private_data_internal): Wrap long line.
9956 (sh64_elf_merge_private_data): Rewrite to allow objects from
9957 SH64 subsets to be linked together.
9958 (INCLUDE_SHMEDIA): Define.
9959 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9960 Parenthesize plus-expression inside or-expression.
9961 <global symbol>: Ditto.
9962 (sh_elf_set_mach_from_flags): Remove code refusing
9963 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9964 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9965 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9966 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9967 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9968 (sh_elf_relocate_section) <local symbol>: Or 1 in
9969 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9970 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9971 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9972 relocation.
9b5ecbd0 9973 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9974 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9975 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9976 Regenerate dependencies.
9977 * Makefile.in: Regenerate.
9978 * archures.c: Add bfd_mach_sh5.
9979 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9980 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9981 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9982 * configure: Regenerate.
9983 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9984 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9985 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9986 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9987 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9988 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9989 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9990 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9991 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9992 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9993 in item for SH5.
9994 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9995 for SHmedia relocs.
9996 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9997 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9998 shmedia_prepare_reloc, goto final_link_relocate if it returns
9999 non-zero, else fail as before.
10000 (sh_elf_set_mach_from_flags): Provide function only if not defined
10001 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10002 (sh_elf_set_private_flags): Provide function only if not defined
10003 as a macro.
10004 (sh_elf_copy_private_data): Similar.
10005 (sh_elf_merge_private_data): Similar.
10006 * section.c (SEC_SH_ISA_SHMEDIA): New.
10007 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10008 * elf32-sh64.c: New file.
10009 * libbfd.h: Regenerate.
10010 * bfd-in2.h: Regenerate.
10011 * po/POTFILES.in: Regenerate.
10012 * po/bfd.pot: Regenerate.
10013 * bfd-in2.h: Regenerate.
10014 * libbfd.h: Regenerate.
10015
e108f470
DJ
100162002-02-07 Daniel Jacobowitz <drow@mvista.com>
10017
10018 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10019 been included, not drag it in.
10020 * bfd-in2.h: Regenerate.
10021
259d18a3
L
100222002-02-06 H.J. Lu (hjl@gnu.org)
10023
10024 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10025 the mach and ISA fields if necessary.
10026
f13b834e
NC
100272002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10028
10029 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10030 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10031 be sure exactly which architecture this represents.
10032
82f6addb
NC
100332002-02-05 Nick Clifton <nickc@redhat.com>
10034
10035 * po/tr.po: Updated translation.
10036
899f54f5
AM
100372002-02-05 Alan Modra <amodra@bigpond.net.au>
10038
10039 From Jimi X <jimix@watson.ibm.com>
10040 * archures (bfd_mach_ppc64): Define.
10041 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10042 (bfd_powerpc_arch): Define.
10043 * bfd-in2.h: Regenerate.
10044 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10045 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10046 (bfd_powerpc_archs): Add default powerpc64 arch.
10047
248866a8
AM
100482002-02-05 Alan Modra <amodra@bigpond.net.au>
10049
10050 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10051 against section syms in readonly sections. Don't do the global
10052 sym check if we find one.
10053 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10054 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 10055 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
10056 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10057 (elf_s390_grok_prstatus): Add missing prototype.
10058
4fa5c2a8
HPN
100592002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10060
10061 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10062 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10063 Call bfd_get_section_by_name only once. Initialize
10064 bpodata->n_bpo_relocs_this_section.
10065 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10066 referring to DSOs.
10067 (bpo_reloc_request_sort_fn): Don't use difference of values as
10068 return-value.
10069
537c972e
DB
100702002-02-02 David O'Brien <obrien@FreeBSD>
10071
10072 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10073 version 4.5 and later the same as 5-CURRENT.
10074 * configure: Re-generate.
10075
006336b8
JT
100762002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10077
10078 * config.bfd (hppa*-*-netbsd*): New target.
10079
6c571f00
PT
100802002-01-31 Philipp Thomas <pthomas@suse.de>
10081
19397422
AM
10082 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10083 to front of message. Unify messages with elf32-arm.h. Use
10084 commas where neccessary.
10085 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10086 ERROR in messages. Unify messages with coff-arm.c. Correct
10087 VFP/FPA error message.
10088 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10089 APCS-32 for translation.
6c571f00 10090
930b4cb2
HPN
100912002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10092
10093 Perform on-demand global register allocation from
10094 R_MMIX_BASE_PLUS_OFFSET relocs.
10095 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10096 bpo_reloc_request, struct bpo_greg_section_info): New.
10097 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10098 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10099 _bfd_mmix_check_all_relocs,
10100 _bfd_mmix_prepare_linker_allocated_gregs,
10101 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10102 (elf_mmix_howto_table): Correct src_mask for most relocs.
10103 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10104 case.
10105 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10106 case. Fix typo in comment. New label do_mmix_reloc.
10107 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10108 store first object file with a base-plus-offset reloc. Call
10109 mmix_elf_check_common_relocs for the part common with mmo.
10110 (mmix_elf_final_link): Write out linker-allocated register
10111 contents section.
10112 (elf_backend_gc_sweep_hook): Define.
10113 (bfd_elf64_bfd_relax_section): Define.
10114
10115 * mmo.c: Don't include <ctype.h>
10116 (mmo_init): Correct init-once logic.
10117
3e36d993
TR
101182002-02-01 Tom Rix <trix@redhat.com>
10119
10120 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10121
ba323545
AM
101222002-02-01 Alan Modra <amodra@bigpond.net.au>
10123
10124 * Makefile.am: Run "make dep-am"
10125 * Makefile.in: Regenerate.
10126
012884d6
DB
101272002-01-31 David O'Brien <obrien@FreeBSD>
10128
10129 * configure.in: Recognize the differences in core files from FreeBSD
10130 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10131 5-CURRENT.
10132 * configure: Regenerate.
10133
3b16e843
NC
101342002-01-31 Ivan Guzvinec <ivang@opencores.org>
10135
10136 * coff-or32.c: New file.
10137 * cpu-or32.c: New file.
10138 * elf32-or32.c: New file.
10139 * archures.c: Add support for or32.
10140 * targets.c: Add support for or32.
10141 * bfd-in2.h: Regenerate.
7dc0ab31 10142 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
10143 coff_write_object_contents): Add support for or32.
10144 * config.bfd: Add target.
10145 * configure.in: Add support for or32.
10146 * configure: Regenerate.
10147 * Makefile.am: Add support for or32.
10148 * Makefile.in: Regenerate.
3b16e843
NC
10149 * po/SRC-POTFILES.in: Add or32 files.
10150 * po/bfd.pot: Regenerate.
7dc0ab31 10151
caf8ca8e
NC
101522002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10153 Don Lindsay <lindsayd@cisco.com>
10154
10155 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10156 false' with a return of a bfd_reloc_ error code.
10157
e5dfef09
HPN
101582002-01-31 Hans-Peter Nilsson <hp@axis.com>
10159
10160 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10161 unexport unreferenced symbols when --export-dynamic. Call
10162 _bfd_elf_strtab_delref when unexporting.
10163
4e4770d0
DJ
101642002-01-30 Daniel Jacobowitz <drow@mvista.com>
10165
10166 * bfd-in.h: Include <stdbool.h> if it is available.
10167 * bfd-in2.h: Regenerated.
10168
e1fa50e7
AM
101692002-01-31 Alan Modra <amodra@bigpond.net.au>
10170
10171 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10172 not go via the plt.
10173
b5f79c76
NC
101742002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10175
b5f79c76
NC
10176 * archures.c: Tidy up formatting of embedded comments.
10177 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 10178 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
10179 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10180 * section.c: Tidy up formatting of embedded comments.
10181 * syms.c: Tidy up formatting of embedded comments.
10182 * targets.c: Tidy up formatting of embedded comments.
10183
10184 * bfd-in2.h: Regenerate.
10185
ca09e32b
NC
101862002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10187
10188 * vms-tir.c (cmd_name): New function.
10189 (tir_cmd_name): New function.
10190 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10191 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10192 Fix formatting.
7dc0ab31 10193
ca09e32b
NC
10194 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10195 translation.
9b5ecbd0 10196 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
10197
10198 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10199 translation.
10200
10201 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10202
10203 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10204
10205 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10206 message to aid in translation.
10207
10208 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10209 to aid in translation.
10210
10211 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10212
7dc0ab31 102132002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
10214
10215 * coff-arm.c, elf32-elf.h: Unify messages.
10216
05f64ac6
NC
102172002-01-30 Nick Clifton <nickc@redhat.com>
10218
10219 * po/sv.po: Updated translation.
10220
f5a3e38a
NC
102212002-01-30 Philipp Thomas <pthomas@suse.de>
10222
10223 * dwarf2.c (read_abbrev): Use full section name in error message.
10224 (decode_line_info): Likewise.
661a3fd4
NC
10225
10226 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10227 message.
10228
d926e03d
AM
102292002-01-30 Alan Modra <amodra@bigpond.net.au>
10230
10231 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10232 descriptor symbols for undefined function code syms. Clear
10233 ELF_LINK_NON_ELF so that they can stay weak.
10234
030d18fb 102352002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 10236 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
10237
10238 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10239 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10240 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10241 generation.
10242 * bfd-in2.h: Regenerate.
10243
fcc76bea
CD
102442002-01-29 Chris Demetriou <cgd@broadcom.com>
10245
10246 * elf32-mips.c: Add additional comments about HI16 relocation
10247 processing.
10248 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10249 pc-relative relocations. (Reverts change made on 2001-10-31.)
10250 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10251 for pc-relative relocations.
10252 (mips_elf_calculate_relocation): Add a comment about a kludge
10253 in the R_MIPS_GNU_REL_HI16 handling.
10254 (_bfd_mips_elf_relocate_section): Implement that kludge;
10255 adjust pc-relative HI16 relocation for difference in HI16 and
10256 LO16 addresses, since it can't easily be done in
10257 mips_elf_calculate_relocation.
10258
f9cd9119
MS
102592002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10260
10261 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10262 relocations with PC32 relocations for undefined or weak symbols.
10263 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10264 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10265
702248bb
JT
102662002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10267
10268 * elfcore.h (elf_core_file_p): Improve comment for last change.
10269
4867be41
DJ
102702002-01-27 Daniel Jacobowitz <drow@mvista.com>
10271
10272 * configure: Regenerated.
10273
a94cef6a
JT
102742002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10275
10276 * elfcore.h (elf_core_file_p): Set the machine architecture
10277 before processing the program headers.
10278
7562a296
HPN
102792002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10280
966abd70
HPN
10281 * configure.in <64-bit configuration>: If using gcc, check and
10282 emit error for egcs-1.1.2.
10283 * configure: Regenerate.
10284
e8eab623
NC
102852002-01-26 Egor Duda <deo@logos-m.ru>
10286
10287 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10288 as possible to avoid stack corruption.
10289
73896efb
RH
102902002-01-26 Richard Henderson <rth@redhat.com>
10291
10292 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10293 for non-allocated sections.
10294
102952002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10296
10297 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10298 prstat.pr_reg even if it is a struct.
10299
73896efb 103002002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10301
c5cd6d62 10302 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10303
3d66c4f7
NC
103042002-01-25 Philipp Thomas <pthomas@suse.de>
10305
10306 * coffgen.c (coff_print_symbol): Don't mark info message
10307 for translation.
10308
9460ecda
NC
103092002-01-25 Nick Clifton <nickc@redhat.com>
10310
10311 * po/fr.po: Updated translation.
10312 * po/es.po: Updated translation.
10313
cc9ff76a
AM
103142002-01-25 Philipp Thomas <pthomas@suse.de>
10315
10316 * coff-alpha.c (alpha_relocate_section): Unify warning message
10317 for GP relative relocations without GP defined.
10318 * coff-mips.c (mips_relocate_section): Likewise.
10319
c68836a9
AM
103202002-01-25 Alan Modra <amodra@bigpond.net.au>
10321
10322 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10323 unsigned overflow when new_offset < old_offset.
10324
e8eab623 103252002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10326
10327 * bfd.c (_bfd_abort): Fix typo.
10328
8ba89f17
RH
103292002-01-23 Richard Henderson <rth@redhat.com>
10330
10331 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10332 plt entries for undefweak symbols.
10333
c6953948
NC
103342002-01-23 Steve Ellcey <sje@cup.hp.com>
10335
c5cd6d62 10336 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10337 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10338 (bfd_elf32_h8300_vec): Ditto.
10339
41bd81ab
AM
103402002-01-23 Alan Modra <amodra@bigpond.net.au>
10341
10342 * elf64-ppc.c: Remove stale part of ABI comment.
10343 (NO_OPD_RELOCS): Define.
10344 (ppc64_elf_check_relocs): Use it.
10345 (ppc64_elf_relocate_section): Here too.
10346 (build_one_stub): Don't point function syms at the stub. Instead,
10347 hijack plt.offset.
10348 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10349 really go to the stub. Make all dynamic relocs in opd against
10350 locals.
10351 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10352 plt.offset.
10353
f304919d
RH
103542002-01-22 Richard Henderson <rth@redhat.com>
10355
10356 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10357
c0ef99a7
AM
103582002-01-22 Alan Modra <amodra@bigpond.net.au>
10359
60ee0d4a
AM
10360 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10361 TOC_BASE_OFF adjustment.
10362
c0ef99a7
AM
10363 * Makefile.am: Run "make dep-am".
10364 * Makefile.in: Regenerate.
10365 * po/SRC-POTFILES.in: Regenerate.
10366
64328b46
AM
103672002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10368
10369 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10370 host defines.
10371
59953665 103722002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10373
10374 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10375 Check for and emit error if sgot is NULL at this point.
10376
9596feea
JT
103772002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10378
10379 * config.bfd (ia64*-*-netbsd*): New target.
10380
7b45c6e1
AM
103812002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10382
10383 * som.c (som_write_space_strings): Comment typo fix.
10384
e5094212
AM
103852002-01-21 Alan Modra <amodra@bigpond.net.au>
10386
e86ce104
AM
10387 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10388 is_func_descriptor fields.
10389 (link_hash_newfunc): Init them.
10390 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10391 dot are candidates for plt entries. When processing .opd relocs,
10392 set function descriptor strings to point inside function code
10393 string, and set new ppc_link_hash_entry fields.
10394 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10395 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10396 function descriptors. It's now done in..
10397 (func_desc_adjust): New.
10398 (ppc64_elf_func_desc_adjust): New.
10399 (define elf_backend_always_size_sections): Define.
10400 (ppc64_elf_hide_symbol): New.
10401 (define elf_backend_hide_symbol): Define.
10402 (allocate_dynrelocs): Remove code looking up function descriptors
10403 as that has been done earlier.
10404 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10405 table.
10406 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10407 up function descriptor.
10408 (build_one_stub): Look up the function code sym. Check for
10409 invalid plt offsets.
10410 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10411 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10412
e5094212
AM
10413 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10414 boolean param.
10415 (_bfd_elf_link_hash_hide_symbol): Likewise.
10416 * elflink.h (elf_link_add_object_symbols): Adjust call to
10417 elf_backend_hide_symbol.
10418 (elf_fix_symbol_flags): Likewise.
10419 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10420 than bfd_alloc.
10421 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10422 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10423 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10424 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10425 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10426 and adjust to suit.
10427 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10428 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10429 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10430
40b8271b
AM
104312002-01-18 Alan Modra <amodra@bigpond.net.au>
10432
10433 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10434 dynamic function descriptor symbol, not the associated function
10435 symbol.
10436
55baa95b
EC
104372002-01-17 Eric Christopher <echristo@redhat.com>
10438
10439 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10440
328577ad
NC
104412002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10442
10443 * po/bfd.pot: Regenerate.
10444 * po/fr.po: Regenerate.
10445
af746e92
AM
104462002-01-17 Alan Modra <amodra@bigpond.net.au>
10447
10448 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10449 Remove "Elf_Internal_Shdr *" param.
10450 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10451 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10452 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10453 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10454 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10455 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10456 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10457 function to override special sections. Remove hdr arg from
10458 backend call, and don't loop.
10459
175e9962
EC
104602002-01-16 Eric Christopher <echristo@redhat.com>
10461
10462 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10463 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10464 relocations requiring gp0 and gp.
10465
96a846ea
RE
104662002-01-16 Richard Earnshaw <rearnsha@arm.com>
10467
175e9962 10468 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10469 EF_ARM_VFP_FLOAT.
10470 (elf32_arm_print_private_bfd_data): Likewise.
10471
af3ae48d
NC
104722002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10473
10474 * po/tr.po: Import new version.
10475
10ed1bba
AM
104762002-01-16 Alan Modra <amodra@bigpond.net.au>
10477
10478 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10479 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10480 (ORI_R0_R0_0): Correct.
10481
5d1634d7
AM
104822002-01-16 Alan Modra <amodra@bigpond.net.au>
10483
10484 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10485 when plt_not_loaded.
10486 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10487 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10488 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10489 (ppc64_elf_glink_code): Delete.
10490 (PPC64_ELF_GLINK_SIZE): Delete.
10491 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10492 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10493 ORI_R0_R0_0): Define.
10494 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10495 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10496 (ppc64_elf_link_hash_table_create): Init them.
10497 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10498 Don't copy to shared lib.
10499 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10500 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10501 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10502 room for .stub and .glink code.
10503 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10504 DT_PPC64_GLINK.
10505 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10506 bfd_elf64_bfd_final_link.
10507 (bfd_elf64_bfd_final_link): Don't define.
10508 (ppc64_elf_size_stubs): New.
10509 (build_plt_stub): New.
10510 (build_one_stub): New.
10511 (ppc64_elf_build_stubs): New.
10512 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10513 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10514 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10515 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10516 case output sections not separate. Adjust DT_RELASZ to not
10517 include plt relocs. Set reserved got entry. Set got and plt
10518 entry size.
10519 (elf_backend_got_header_size): Set to 8.
10520 * elf64-ppc.h: New file.
10521
c601ffdb
AM
105222002-01-16 Alan Modra <amodra@bigpond.net.au>
10523
10524 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10525 sections, use bfd_section_list_remove.
10526 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10527 * elflink.h (elf_link_add_object_symbols): When removing all
10528 sections, use bfd_section_list_clear.
10529
8fb4cb7f
NC
105302002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10531
10532 * po/sv.po: New file: Swedish translation.
10533 * configure.in (ALL_LINGUAS): Add sv.
10534 * configure: Regenerate.
10535
d3c456e9
JJ
105362002-01-15 Jakub Jelinek <jakub@redhat.com>
10537
10538 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10539 * elf.c (merge_sections_remove_hook): New function.
10540 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10541 _bfd_merge_sections.
10542 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10543 * libbfd.h: Rebuilt.
10544 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10545 Call remove_hook if a SEC_EXCLUDE section is encountered.
10546
1f7fd478
NC
105472002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10548
10549 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10550 (xstormy16_reloc_map): Initialise new field with correct howto
10551 table.
10552 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10553 howto entry.
10554
b87011e9
MS
105552002-01-10 Michael Snyder <msnyder@redhat.com>
10556
10557 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10558 (elfcore_write_pstatus): Use long instead of pid_t;
10559 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10560
175e9962 105612002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10562
10563 * elf.c: Update copyright years.
10564 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10565 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10566
7c76fa91
MS
105672002-01-08 Michael Snyder <msnyder@redhat.com>
10568
10569 Add capability to write corefile note sections, for gdb.
10570 * elf.c (elfcore_write_note): New function.
10571 (elfcore_write_prpsinfo): New function.
10572 (elfcore_write_prstatus): New function.
10573 (elfcore_write_pstatus): New function.
10574 (elfcore_write_prfpreg): New function.
10575 (elfcore_write_prxfpreg): New function.
97996af6 10576 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10577
e1fddb6b
AO
105782002-01-08 Alexandre Oliva <aoliva@redhat.com>
10579
10580 * elf.c (elf_fake_sections): Propagate errors from
10581 elf_backend_fake_section.
10582
8d05742f
JT
105832002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10584
10585 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10586 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10587 (elf32-sh-nbsd.lo): New rule.
10588 * Makefile.in: Regenerate.
10589 * config.bfd (sh*le-*-netbsdelf*): New target.
10590 (sh*-*-netbsdelf*): New target.
10591 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10592 (bfd_elf32_shnbsd_vec): New vector.
10593 (bfd_elf32_shlnbsd_vec): New vector.
10594 * configure: Regenerate.
10595 * elf32-sh-nbsd.c: New file.
10596 * targets.c: Update copyright years.
175e9962 10597 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10598 bfd_elf32_shnbsd_vec.
10599
1dba4cb4
AH
106002002-01-07 Aldy Hernandez <aldyh@redhat.com>
10601
10602 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10603
47b22aef
GK
106042002-01-07 Geoffrey Keating <geoffk@redhat.com>
10605
10606 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10607 of a symbol in a section that will be deleted.
10608
be2d1673
NC
106092002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10610
10611 * po/es.po: New file: Spanish translation.
10612 * configure.in (ALL_LINGUAS): Add es.
10613 * configure: Regenerate.
10614
d9cf1b54
AM
106152002-01-06 Steve Ellcey <sje@cup.hp.com>
10616
10617 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10618 argument so we can handle HP-UX specially.
10619 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10620 (elfNN_hpux_backend_section_from_bfd_section): New for support
10621 of SHN_IA_64_ANSI_COMMON.
10622 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10623 (is_unwind_section_name): Add special HP-UX support.
10624 (elfNN_ia64_section_from_shdr): Add support for more sections.
10625 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10626 add support for more sections.
10627 (elfNN_ia64_additional_program_headers): Modify
10628 is_unwind_section_name call.
10629 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10630 only one unwind section in segment.
10631
3f3c5c34
AM
106322002-01-06 Alan Modra <amodra@bigpond.net.au>
10633
10634 * syms.c (_bfd_generic_make_empty_symbol): New function.
10635 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10636 _bfd_generic_make_empty_symbol.
10637 * libbfd.h: Regenerate.
10638 * bfd-in2.h: Regenerate.
10639 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10640 (hppabsd_core_get_symtab_upper_bound): Don't define.
10641 (hppabsd_core_get_symtab): Likewise.
10642 (hppabsd_core_print_symbol): Likewise.
10643 (hppabsd_core_get_symbol_info): Likewise.
10644 (hppabsd_core_bfd_is_local_label_name): Likewise.
10645 (hppabsd_core_get_lineno): Likewise.
10646 (hppabsd_core_find_nearest_line): Likewise.
10647 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10648 (hppabsd_core_read_minisymbols): Likewise.
10649 (hppabsd_core_minisymbol_to_symbol): Likewise.
10650 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10651 Formatting fixes.
10652 * hpux-core.c: Similarly.
10653 * irix-core.c: Similarly.
10654 * osf-core.c: Similarly.
10655 * sco5-core.c: Similarly.
10656 * binary.c (binary_make_empty_symbol): Remove function, define as
10657 _bfd_generic_make_empty_symbol.
10658 * ihex.c (ihex_make_empty_symbol): Likewise.
10659 * mmo.c (mmo_make_empty_symbol): Likewise.
10660 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10661 * srec.c (srec_make_empty_symbol): Likewise.
10662 * versados.c (versados_make_empty_symbol): Likewise.
10663 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10664 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10665 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10666 rather than _bfd_vms_make_empty_symbol.
10667 * vms-misc.c (new_symbol): Likewise.
10668
3f0a7f7f
AM
106692002-01-05 Alan Modra <amodra@bigpond.net.au>
10670
9e7b37b3
AM
10671 * section.c (bfd_section_init): Remove unnecessary initialisations.
10672 (bfd_section_list_clear): New function.
10673 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10674 (_bfd_strip_section_from_output): Use them.
10675 * coffcode.h (coff_set_alignment_hook): Likewise.
10676 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10677 * elf64-mips.c (mips_elf64_final_link): Likewise.
10678 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10679 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10680 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10681 * bfd-in2.h: Regenerate.
10682
10683 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10684 rather than doing our own section handling. Clean up after errors
10685 with bfd_release and bfd_section_list_clear. Handle unexpected
10686 flags.
10687 * aoutf1.h (sunos4_core_file_p): Likewise.
10688 * aix386-core.c (aix386_core_file_p): Likewise.
10689 * cisco-core.c (cisco_core_file_validate): Likewise.
10690 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10691 * trad-core.c (trad_unix_core_file_p): Likewise.
10692
9b5ecbd0 10693 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10694 with bfd_release and bfd_section_list_clear.
10695 * hpux-core.c (hpux_core_core_file_p): Likewise.
10696 * irix-core.c (irix_core_core_file_p): Likewise.
10697 * lynx-core.c (lynx_core_file_p): Likewise.
10698 * osf-core.c (osf_core_core_file_p): Likewise.
10699 * rs6000-core.c (rs6000coff_core_p): Likewise.
10700 * sco5-core.c (sco5_core_file_p): Likewise.
10701
3f0a7f7f
AM
10702 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10703 sign extension adjustments without conditionals.
10704
a3aa38ee
JJ
107052002-01-04 Jakub Jelinek <jakub@redhat.com>
10706
10707 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10708 CIE at .eh_frame start is removed due to no FDEs referencing it.
10709
8a8b2d4b
AJ
107102002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10711
10712 * config.bfd (x86_64-*-netbsd*): New target.
10713 * configure.in (x86_64-*-netbsd*): Set COREFILE
10714 to netbsd-core.lo.
10715 * configure: Regenerated.
10716
04b5af89
TR
107172002-01-03 Tom Rix <trix@redhat.com>
10718
10719 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10720 for recent bfd_make_section_anyway change.
10721
51c5503b
NC
107222002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10723
10724 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10725 R_ARM_THM_PC11 reloc.
10726
07f7c046
NC
107272002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10728
10729 * configure.in (LINGUAS): Add ja.
10730 * configure: Regenerate.
10731 * po/ja.po: Import from translation project's web site.
10732
5eefb65f
NC
107332002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10734
10735 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10736 messages to ease translation into other languages.
10737
39e90f10 10738For older changes see ChangeLog-0001
56882138
AM
10739\f
10740Local Variables:
10741mode: change-log
10742left-margin: 8
10743fill-column: 74
10744version-control: never
10745End:
This page took 0.65298 seconds and 4 git commands to generate.