* elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
[binutils-gdb.git] / bfd / ChangeLog
1 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2
3 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
4 g->global_gotsym is NULL.
5
6 2002-08-08 H.J. Lu <hjl@gnu.org>
7
8 * elflink.h (elf_add_default_symbol): Don't warn a defintion
9 overrides an indirect versioned symbol.
10
11 2002-08-08 Jakub Jelinek <jakub@redhat.com>
12
13 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
14 for R_386_TLS_TPOFF32 relocs against symndx 0.
15
16 2002-08-07 H.J. Lu <hjl@gnu.org>
17
18 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
19 with undefined version if needed.
20 (elf_link_assign_sym_version): Match a default symbol with a
21 version without definition. No need to hide the default
22 definition separately.
23
24 2002-08-08 Alan Modra <amodra@bigpond.net.au>
25
26 * elflink.h (elf_link_output_extsym): Don't output symbols from
27 SEC_EXCLUDE sections.
28
29 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
30
31 2002-08-07 Alan Modra <amodra@bigpond.net.au>
32
33 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
34 entries.
35
36 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
37
38 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
39 mismatch.
40
41 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
42
43 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
44
45 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
46
47 * elf32-mips.c (mips_reloc_map): Fix typo.
48
49 2002-08-06 Alan Modra <amodra@bigpond.net.au>
50
51 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
52
53 2002-08-06 Alan Modra <amodra@bigpond.net.au>
54
55 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
56
57 2002-08-06 Alan Modra <amodra@bigpond.net.au>
58
59 * libxcoff.h: Use PARAMS on function declarations.
60 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
61 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
62
63 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
64 addend.
65 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
66
67 2002-08-06 Alan Modra <amodra@bigpond.net.au>
68
69 * coff-rs6000.c: Formatting fixes.
70 (xcoff_calculate_relocation): Use PARAMS in declaration.
71 (xcoff_complain_overflow): Likewise.
72 (xcoff_ppc_relocate_section): Use old-style function pointer call.
73 (bfd_xcoff_backend_data): Remove useless comments.
74 (rs6000coff_vec): Likewise.
75 (bfd_pmac_xcoff_backend_data): Likewise.
76 (pmac_xcoff_vec): Likewise.
77
78 * coff64-rs6000.c: Formatting fixes.
79 (xcoff64_calculate_relocation): Use PARAMS in declaration.
80 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
81 (bfd_xcoff_backend_data): Remove useless comments.
82 (rs6000coff64_vec): Likewise.
83 (bfd_xcoff_aix5_backend_data): Likewise.
84 (aix5coff64_vec): Likewise.
85
86 2002-08-06 Alan Modra <amodra@bigpond.net.au>
87
88 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
89 mask entries. Use complain_overflow_dont for R_REF.
90 (xcoff_reloc_type_ba): Revert last change.
91 (xcoff_reloc_type_br): Likewise.
92 (xcoff_reloc_type_crel): Likewise.
93 (xcoff_ppc_relocate_section): Likewise.
94 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
95 (xcoff64_ppc_relocate_section): Likewise.
96 (xcoff64_howto_table): Revert some of last change to mask entries.
97 Use complain_overflow_dont for R_REF.
98
99 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
100 relocs with bitsize == 16 have size = 1.
101 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
102 (xcoff_reloc_type_br): Likewise.
103 (xcoff_reloc_type_crel): Likewise.
104 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
105 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
106 dst_mask adjustment.
107 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
108 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
109 bitsize == 16 have size = 1.
110
111 2002-08-01 Denis Chertykov <denisc@overta.ru>
112
113 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
114 (struct misc): New field isymbuf. All free_* fields removed.
115 (symbol_value): Pass in internal syms. No need to swap syms in.
116 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
117 possibly cached info.
118 (tidyup_after_error): Removed.
119 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
120 misc. Use new field.
121 (adjust_all_relocations): Use internal syms. No need to swap syms
122 in and out.
123 (add_page_insn): Don't use removed fields of struct misc.
124
125 2002-08-01 Nick Clifton <nickc@redhat.com>
126
127 * elf32-arm.h: Revert previous delta.
128
129 2002-08-01 Nick Clifton <nickc@redhat.com>
130
131 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
132 * configure: Regenerate.
133
134 2002-07-31 H.J. Lu <hjl@gnu.org>
135
136 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
137 selected.
138
139 2002-07-31 H.J. Lu <hjl@gnu.org>
140
141 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
142 is selected.
143
144 2002-07-31 Jakub Jelinek <jakub@redhat.com>
145
146 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
147 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
148
149 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
150
151 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
152 There is no 8 byte relocation type for this architecture.
153 (do_ns32k_reloc): Use bfd_vma instead of native types.
154 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
155 returns void.
156 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
157 rely on generic code to do that.
158 * aout-ns32k.c (howto_table): Add appropriate overflow detection
159 to all table entries.
160 (_bfd_ns32k_relocate_contents): put_data returns void.
161 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
162 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
163 return void.
164
165 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
166
167 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
168 archive object is target dependant.
169
170 2002-07-31 Adam Nemet <anemet@lnxw.com>
171
172 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
173 (THUMB_PLT_ENTRY_SIZE): New macro.
174 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
175 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
176 ARM_PLT_ENTRY_SIZE.
177 (elf32_arm_plt_entry): Likewise.
178 (elf_backend_plt_header_size): Likewise.
179 (elf32_thumb_plt0_entry): New global.
180 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
181 into .plt.thumb.
182 (elf32_thumb_plt_entry): New global.
183 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
184 Thumb entries. Set the bottom bit of the corresponding GOT entry
185 for a Thumb PLT entry.
186 (struct elf32_arm_plt_entry_info): New structure.
187 (struct elf32_arm_link_hash_entry, plt_info): New member of this
188 type.
189 (elf32_arm_link_hash_newfunc): Initialize new member.
190 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
191 relocations against the PLT.
192 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
193 first_rel_type if this is the first time we encounter the symbol.
194 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
195 Determine if relocation needs a PLT entry. Set first_rel_type if
196 this is the first time we encounter the symbol
197 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
198 functions as well.
199 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
200 (elf32_arm_create_dynamic_sections): New function. Create the
201 .plt.thumb section.
202 (elf_backend_create_dynamic_sections): Call it.
203
204 2002-07-31 Nick Clifton <nickc@redhat.com>
205
206 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
207 'alternative' in order to avoid shadowing global symbol of the
208 same name.
209 * bfd-in2.h: Regenerate.
210 * libbfd.h: Regenerate.
211 * libcoff.h: Regenerate.
212
213 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
214
215 * Makefile.am: Add n32 ABI support.
216 * Makefile.in: Regenerate.
217 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
218 bit vectors for mips*-*-linux targets as optional.
219 * configure.in: Add n32 ABI vectors.
220 * configure: Regenerate.
221 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
222 * elfn32-mips.c: New file, n32 ABI support.
223 * targets.c: Add n32 ABI vectors.
224
225 2002-07-30 Graeme Peterson <gp@qnx.com>
226
227 * elfarmqnx-nabi.c: New file: Support for QNX.
228 * config.bfd: Add support for arm-*-nto target.
229 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
230 * configure: Regenerate.
231 * Makefile.am: Add entries for elfarmqnx-nabi.c.
232 * Makefile.in: Regenerate.
233 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
234 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
235 * elfarm-nabi.c: Do not include elf32-arm.h if
236 ELFARM_NABI_C_INCLUDED is defined.
237 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
238
239 2002-07-30 Nick Clifton <nickc@redhat.com>
240
241 * po/sv.po: Updated Swedish translation.
242
243 2002-07-30 Jakub Jelinek <jakub@redhat.com>
244
245 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
246
247 2002-07-30 Alan Modra <amodra@bigpond.net.au>
248
249 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
250 * archive.c (bfd_generic_archive_p): Likewise.
251 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
252 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
253 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
254 (xcoff64_archive_p): Likewise.
255 (xcoff64_openr_next_archived_file): Likewise.
256 (xcoff64_archive_p): Clean up tdata properly on error.
257 * coffgen.c (coff_real_object_p): Likewise.
258 (coff_object_p): Release filehdr and opthdr.
259 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
260 * ieee.c (ieee_archive_p): Likewise.
261 * ihex.c (ihex_object_p): Likewise.
262 (ihex_mkobject): Always allocate tdata.
263 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
264 * srec.c (srec_mkobject): Always allocate tdata.
265 (srec_object_p): Clean up tdata properly on error.
266 (symbolsrec_object_p): Likewise.
267 * versados.c (versados_object_p): Likewise.
268 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
269 and bfd_realloc instead of realloc.
270 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
271 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
272 place of bfd_malloc, simplifying error freeing. Free hash table too.
273 (vms_object_p): Clean up tdata on error.
274 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
275 (vms_close_and_cleanup): Adjust for bfd_alloc use.
276
277 2002-07-30 Alan Modra <amodra@bigpond.net.au>
278
279 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
280
281 2002-07-26 Chris Demetriou <cgd@broadcom.com>
282
283 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
284 flags into resulting BFD.
285
286 2002-07-26 Alan Modra <amodra@bigpond.net.au>
287
288 From John Reiser <jreiser@BitWagon.com>
289 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
290 tls_ldm_got.refcount.
291
292 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
293
294 * elf64-mips.c: Update TODO comment.
295 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
296 mips_elf64_gprel16_reloca): Remove prototypes.
297 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
298 (UNUSED_RELOC): Replace by EMPTY_RELOC.
299 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
300 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
301 R_MIPS_HIGHEST.
302 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
303 R_MIPS_GOT16. Remove wrong comments.
304 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
305 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
306 from elf32-mips.c.
307 (mips_elf64_hi16_reloc): Fix formatting.
308 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
309 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
310 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
311 (mips_elf64_gprel16_reloc): Make static. Add check for
312 partial_inplace.
313 (mips_elf64_gprel16_reloca): Remove.
314 (mips_elf64_literal_reloc): New function.
315 (mips_elf64_gprel32_reloc): Fix formatting.
316 (mips_elf64_shift6_reloc): Fix comment. Make static.
317 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
318 elf32-mips.c.
319 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
320 elf32-mips.c
321 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
322 specific relocations.
323 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
324 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
325 (ELF_MAXPAGESIZE): Add comment.
326
327 2002-07-25 Nick Clifton <nickc@redhat.com>
328
329 * po/sv.po: Updated Swedish translation.
330 * po/es.po: Updated Spanish translation.
331 * po/fr.po: Updated French translation.
332
333 2002-07-25 Alan Modra <amodra@bigpond.net.au>
334
335 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
336 as elf_link_record_local_dynamic_symbol.
337 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
338 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
339 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
340 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
341 attempt is made to record a symbol in a discarded section, and
342 return `2' in that case.
343
344 2002-07-24 Nick Clifton <nickc@redhat.com>
345
346 * po/sv.po: Updated Swedish translation.
347 * po/es.po: Updated Spanish translation.
348
349 2002-07-23 Alan Modra <amodra@bigpond.net.au>
350
351 * po/SRC-POTFILES.in: Regenerate.
352
353 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
354 immediately. Remove code handling relocatable linking.
355 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
356 * elf32-cris.c (cris_elf_relocate_section): Likewise.
357 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
358 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
359 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
360 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
361 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
362 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
363 * elf32-v850.c (v850_elf_relocate_section): Likewise.
364 * elf32-vax.c (elf_vax_relocate_section): Likewise.
365 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
366 * elf32-avr.c (elf_backend_rela_normal): Define.
367 * elf32-cris.c: Likewise.
368 * elf32-fr30.c: Likewise.
369 * elf32-frv.c: Likewise.
370 * elf32-h8300.c: Likewise.
371 * elf32-hppa.c: Likewise.
372 * elf32-ip2k.c: Likewise.
373 * elf32-sparc.c: Likewise.
374 * elf32-v850.c: Likewise.
375 * elf32-vax.c: Likewise.
376 * elf64-hppa.c: Likewise.
377 * elf64-sparc.c: Likewise.
378 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
379 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
380 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
381 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
382 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
383 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
384 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
385 * elf-m10200.c (USE_RELA): Don't define.
386 * elf-m10300.c: Likewise.
387 * elfarm-oabi.c: Likewise.
388 * elf32-i370.c: Likewise.
389 * elf32-ip2k.c: Likewise.
390 * elf32-m68k.c: Likewise.
391 * elf32-mcore.c: Likewise.
392 * elf32-ppc.c: Likewise.
393 * elf32-s390.c: Likewise.
394 * elf32-vax.c: Likewise.
395 * elf64-ppc.c: Likewise.
396 * elf64-s390.c: Likewise.
397 * elf64-x86-64.c: Likewise.
398 * elfxx-ia64.c: Likewise.
399 * elf32-avr.c (USE_REL): Don't undef.
400 * elf32-ip2k.c: Likewise.
401
402 2002-07-23 Nick Clifton <nickc@redhat.com>
403
404 * elf-bfd.h (struct elf_backend_data): Add new bitfield
405 'want_p_paddr_set_to_zero'.
406 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
407 to false;
408 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
409 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
410
411 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
412
413 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
414 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
415 show the Copyright string.
416 Minor formatting tidy ups.
417
418 2002-07-23 Nick Clifton <nickc@redhat.com>
419
420 * po/fr.po: Updated French translation.
421 * po/sv.po: Updated Swedish translation.
422
423 2002-07-23 Alan Modra <amodra@bigpond.net.au>
424
425 * elflink.h (elf_link_input_bfd): Don't change internal symbols
426 when outputting relocs.
427
428 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
429
430 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
431 DT_PLTGOT into the dynamic section if there is a PLT.
432
433 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
434
435 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
436 elf32-mips.c.
437 (_bfd_mips_elf_write_section): Likewise.
438 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
439 (_bfd_mips_elf_write_section): Likewise.
440 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
441 (elf32_mips_write_section): Likewise.
442 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
443 (_bfd_mips_elf_write_section): Likewise.
444
445 2002-07-19 Alan Modra <amodra@bigpond.net.au>
446
447 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
448 PT_IA_64_UNWIND segments for a given section.
449
450 2002-07-17 H.J. Lu <hjl@gnu.org>
451
452 * Makefile.am: Fix a typo.
453 * Makefile.in: Regenerate.
454
455 2002-07-15 Denis Chertykov <denisc@overta.ru>
456 Frank Ch. Eigler <fche@redhat.com>
457 Ben Elliston <bje@redhat.com>
458 Alan Lehotsky <alehotsky@cygnus.com>
459 John Healy <jhealy@redhat.com>
460 Graham Stott <grahams@redhat.com>
461 Jeff Johnston <jjohnstn@redhat.com>
462
463 * Makefile.am: Add support for ip2k.
464 * Makefile.in: Regenerate.
465 * doc/Makefile.in: Regenerate.
466 * archures.c: Add support for ip2k.
467 * config.bfd: Add support for ip2k.
468 * configure.in: Add support for ip2k.
469 * configure: Regenerate.
470 * reloc.c: Add support for ip2k.
471 * targets.c: Add support for ip2k.
472 * bfd-in2.h: Regenerate.
473 * libbfd.h: Regenerate.
474 * cpu-ip2k.c: New file.
475 * elf32-ip2k.c: New file.
476
477 2002-07-17 Ian Rickards <irickard@arm.com>
478
479 * dwarf2.c (concat_filename): If we can't establish the directory
480 just return the filename.
481
482 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
483
484 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
485
486 2002-07-16 Alan Modra <amodra@bigpond.net.au>
487
488 * elflink.h: Formatting fixes, tidy prototypes.
489 (elf_link_assign_sym_version): Move common code out of loop.
490
491 2002-07-16 Alan Modra <amodra@bigpond.net.au>
492
493 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
494 reloc section size is zero. Correct reloc output location.
495
496 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
497
498 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
499 the final type for the e_fsel selector when generating PA2.0W code.
500 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
501 relocations.
502
503 2002-07-14 H.J. Lu <hjl@gnu.org>
504
505 * elflink.h (elf_link_assign_sym_version): Hide the default
506 definition if there is a hidden versioned definition.
507
508 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
509
510 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
511 dynamic reference test in assertion when initializing GOT with
512 static contents. Just assert that there are either no dynamic
513 sections, the symbol is defined in the regular objects or that the
514 symbol is undef weak. Tweak comment.
515 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
516 only if the symbol isn't defined in the program and isn't undef
517 weak.
518 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
519 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
520 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
521 (elf_cris_discard_excess_program_dynamics): Don't consider
522 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
523
524 2002-07-11 Alan Modra <amodra@bigpond.net.au>
525
526 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
527 unresolved debugging relocs in dynamic applications.
528 * elf32-s390.c (elf_s390_relocate_section): Likewise.
529 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
530 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
531 * elf64-s390.c (elf_s390_relocate_section): Likewise.
532 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
533 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
534
535 2002-07-10 Alan Modra <amodra@bigpond.net.au>
536
537 * elf64-ppc.c (ONES): Define.
538 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
539 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
540 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
541
542 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
543 (ppc64_elf_set_private_flags): Delete.
544 (ppc64_elf_section_from_shdr): Delete.
545 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
546 (ppc64_elf_fake_sections): Delete.
547 (bfd_elf64_bfd_set_private_flags): Don't define.
548 (bfd_elf64_get_symbol_info): Likewise.
549 (elf_backend_section_from_shdr): Likewise.
550 (elf_backend_fake_sections): Likewise.
551
552 2002-07-10 Marco Walther <Marco.Walther@sun.com>
553
554 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
555 when not already set.
556 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
557 (elf_backend_fake_sections): Define.
558
559 2002-07-10 Alan Modra <amodra@bigpond.net.au>
560
561 * merge.c (_bfd_merge_section): Remove redundant output_section check.
562 Formatting.
563 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
564
565 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
566
567 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
568 NULL sym_hashes to just before use.
569 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
570 symbol with non-default visibility.
571 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
572 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
573 Ditto.
574 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
575 symbol with non-default visibility.
576 (cris_elf_check_relocs): At tests for local symbol before
577 increasing h->plt.refcount, also check for non-default
578 visibility. Ditto when checking for local symbol to eliminate
579 pc-relative runtime relocs.
580
581 2002-07-08 Alan Modra <amodra@bigpond.net.au>
582
583 * elf.c: Formatting.
584 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
585 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
586 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
587 segments.
588
589 2002-07-07 Mark Mitchell <mark@codesourcery.com>
590 Alan Modra <amodra@bigpond.net.au>
591
592 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
593 account the impact of relocation count overflow when computing
594 section offsets.
595 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
596 or not to apply the PE COFF reloc overflow handling. Fix a
597 fencepost error in deciding whether or not to use that technique.
598
599 2002-07-07 Alan Modra <amodra@bigpond.net.au>
600
601 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
602 change type of locsyms.
603 (bfd_elf_get_elf_syms): Declare.
604 * elf.c (bfd_elf_get_elf_syms): New function.
605 (group_signature): Use bfd_elf_get_elf_syms.
606 (bfd_section_from_r_symndx): Likewise.
607 * elfcode.h (elf_slurp_symbol_table): Likewise.
608 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
609 (elf_link_add_object_symbols): Likewise. Reorganise to increase
610 locality of various data structures. Properly free internal relocs.
611 (elf_bfd_final_link): Properly free internal relocs.
612 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
613 (elf_link_input_bfd): Likewise.
614 (elf_gc_mark): Likewise. Properly free internal relocs.
615 (elf_gc_sweep): Properly free internal relocs.
616 (elf_reloc_symbol_deleted_p): No need to swap syms in.
617 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
618 internal relocs.
619 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
620 Properly free possibly cached info.
621 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
622 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
623 symbol swapping code.
624 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
625 Properly free possibly cached info.
626 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
627 (mn10300_elf_relax_delete_bytes): Likewise.
628 (mn10300_elf_symbol_address_p): Likewise.
629 (mn10300_elf_get_relocated_section_contents): Likewise.
630 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
631 (elf32_h8_relax_delete_bytes): Likewise.
632 (elf32_h8_symbol_address_p): Likewise.
633 (elf32_h8_get_relocated_section_contents): Likewise.
634 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
635 (m32r_elf_relax_delete_bytes): Likewise.
636 (m32r_elf_get_relocated_section_contents): Likewise.
637 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
638 elf_section_data to determine whether cached.
639 (sh_elf_relax_section): As above for elf-m10200.c.
640 (sh_elf_relax_delete_bytes): Likewise.
641 (sh_elf_get_relocated_section_contents): Likewise.
642 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
643 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
644 reading of local syms.
645 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
646 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
647 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
648 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
649 relocs.
650 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
651 free internal relocs and section contents. Don't read symbols.
652 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
653 (elf32_hppa_size_stubs): Don't free local syms.
654 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
655 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
656 possibly cached info.
657 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
658 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
659 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
660 all_local_syms.
661 (get_local_syms): Delete function.
662 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
663 on exit.
664 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
665
666 2002-07-05 Jim Wilson <wilson@redhat.com>
667
668 * syms.c (decode_section_type): New.
669 (bfd_decode_symclass): Call decode_section_type.
670
671 2002-07-04 Jakub Jelinek <jakub@redhat.com>
672
673 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
674 section content start.
675 Reported by Michael Schumacher <mike@hightec-rt.com>.
676
677 2002-07-04 Alan Modra <amodra@bigpond.net.au>
678
679 * section.c (_bfd_strip_section_from_output): Remove unnecessary
680 link order code. Don't actually remove the output section here;
681 Just set a flag for the linker to do so.
682 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
683 sections when setting up output section dynsyms.
684
685 2002-07-04 Alan Modra <amodra@bigpond.net.au>
686
687 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
688 fudge.
689 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
690 libs here instead.
691
692 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
693
694 * elf64-s390.c (create_got_section): Set .got section alignment to
695 8 bytes.
696 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
697
698 2002-07-02 Alan Modra <amodra@bigpond.net.au>
699
700 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
701
702 2002-07-01 Matt Thomas <matt@3am-software.com>
703
704 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
705 to EF_VAX_*.
706
707 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
708
709 * elfxx-mips.c (ABI_64_P): Fix comment.
710 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
711 new section names for N64 ABI.
712 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
713 (mips_elf_calculate_relocation): Code formatting.
714 (mips_elf_create_dynamic_relocation): Likewise.
715 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
716 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
717 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
718 in any NewABI.
719 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
720 for NewABI.
721 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
722 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
723 here, too.
724
725 2002-07-01 Andreas Schwab <schwab@suse.de>
726
727 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
728 R_X86_64_64 to R_X86_64_RELATIVE.
729
730 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
731
732 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
733 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
734 Run "make dep-am".
735 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
736 host_aout_vec.
737 * configure.in (vaxbsd_vec): Add.
738 * targets.c (vaxbsd_vec): Add.
739 * Makefile.in: Rebuild.
740 * configure: Rebuild.
741 * po/SRC-POTFILES.in: Rebuild.
742
743 2002-07-01 Alan Modra <amodra@bigpond.net.au>
744
745 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
746 examining to gc_mark_hook, rather than the bfd.
747 (elf_gc_sections): Adjust.
748 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
749 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
750 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
751 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
752 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
753 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
754 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
755 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
756 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
757 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
758 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
759 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
760 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
761 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
762 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
763 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
764 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
765 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
766 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
767 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
768 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
769 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
770 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
771 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
772 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
773 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
774 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
775 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
776 redundant local sym tests.
777 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
778 (link_hash_newfunc): Init is_entry.
779 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
780 (ppc64_elf_link_hash_table_create): Init all_local_syms.
781 (create_linkage_sections): Use bfd_make_section_anyway rather than
782 bfd_make_section.
783 (ppc64_elf_mark_entry_syms): New function.
784 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
785 up opd entry to function section map.
786 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
787 relocs that reference the opd section.
788 (edit_opd): New function.
789 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
790 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
791 (get_local_syms): Do so here. Exit if we already have local syms.
792 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
793 read local syms on non-ELF input.
794 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
795 than duplicating it's function here. Adjust free of internal
796 relocs to suit.
797 (ppc64_elf_relocate_section): Adjust local syms in opd section.
798 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
799 * elf32-hppa.c (elf32_hppa_size_stubs): Call
800 _bfd_elf32_link_read_relocs rather than duplicating it's function
801 here. Adjust free of internal relocs to suit.
802
803 2002-07-01 Andreas Jaeger <aj@suse.de>
804
805 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
806 are not allowed in shared libs code, enforce -fPIC.
807
808 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
809
810 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
811 trailing zero-sequences when there's previous left-over data.
812
813 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
814
815 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
816 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
817 and opd_rel_sec in order for starting rela section. Check _raw_size.
818 (elf_backend_reloc_type_class): Define.
819
820 2002-06-27 Kevin Buettner <kevinb@redhat.com>
821
822 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
823 DWARF2 formats.
824
825 2002-06-27 Alan Modra <amodra@bigpond.net.au>
826
827 * cpu-powerpc.c: Comment on ordering of arch_info.
828 * elf32-ppc.c (ppc_elf_object_p): New function.
829 (elf_backend_object_p): Define.
830 * elf64-ppc.c (ppc64_elf_object_p): New function.
831 (elf_backend_object_p): Define.
832
833 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
834
835 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
836 * configure: Regenerate.
837
838 2002-06-25 Jason Eckhardt <jle@rice.edu>
839
840 * dwarf2.c (decode_line_info): Check unit->addr_size
841 to read in the proper number of prologue bytes.
842
843 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
844
845 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
846 aix5coff64_vec if 64-bit bfd support has been enabled.
847 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
848 been enabled.
849
850 * targets.c (_bfd_target_vector[]): Only include
851 aix5coff64_vec if 64-bit bfd support has been enabled.
852
853 2002-06-25 Alan Modra <amodra@bigpond.net.au>
854
855 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
856 * elf32-hppa.c (hppa_add_stub): Likewise.
857 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
858 * elflink.h (elf_add_default_symbol): Fix comment typo.
859 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
860 (elf_link_add_object_symbols): Likewise.
861 (elf_link_assign_sym_version): Likewise.
862 * hash.c (bfd_hash_lookup): Likewise.
863 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
864 * section.c (bfd_get_unique_section_name): Likewise.
865 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
866 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
867 (assign_section_numbers): Likewise.
868 (_bfd_elfcore_make_pseudosection): Likewise.
869 (elfcore_grok_lwpstatus): Likewise.
870 (elfcore_grok_win32pstatus): Likewise.
871 (elfcore_write_note): Constify input params. Use PTR instead of
872 void *. Include terminating NUL in namesz. Correct padding.
873 Support NULL "name" param. Use memcpy instead of strcpy.
874 (elfcore_write_prpsinfo): Constify input params.
875 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
876 (elfcore_write_lwpstatus): Likewise.
877 (elfcore_write_pstatus): Likewise.
878 (elfcore_write_prfpreg): Likewise.
879 (elfcore_write_prxfpreg): Likewise.
880 * elf-bfd.h (elfcore_write_note): Update declaration.
881 (elfcore_write_prpsinfo): Likewise.
882 (elfcore_write_prstatus): Likewise.
883 (elfcore_write_pstatus): Likewise.
884 (elfcore_write_prfpreg): Likewise.
885 (elfcore_write_prxfpreg): Likewise.
886 (elfcore_write_lwpstatus): Likewise.
887
888 2002-06-25 Jason Eckhardt <jle@rice.edu>
889
890 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
891 symbols of type stProc and stStaticProc.
892
893 2002-06-25 Nick Clifton <nickc@redhat.com>
894
895 * ecoff.c: VArious formatting fixes.
896
897 2002-06-25 Alan Modra <amodra@bigpond.net.au>
898
899 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
900
901 2002-06-25 Alan Modra <amodra@bigpond.net.au>
902
903 * aout-adobe.c: Don't compare against "true" or "false.
904 * aout-target.h: Likewise.
905 * aoutx.h: Likewise.
906 * archive.c: Likewise.
907 * bout.c: Likewise.
908 * cache.c: Likewise.
909 * coff-a29k.c: Likewise.
910 * coff-alpha.c: Likewise.
911 * coff-i386.c: Likewise.
912 * coff-mips.c: Likewise.
913 * coff-or32.c: Likewise.
914 * coff64-rs6000.c: Likewise.
915 * coffcode.h: Likewise.
916 * coffgen.c: Likewise.
917 * cpu-ns32k.c: Likewise.
918 * ecoff.c: Likewise.
919 * ecofflink.c: Likewise.
920 * elf.c: Likewise.
921 * elf32-arm.h: Likewise.
922 * elf32-cris.c: Likewise.
923 * elf32-d30v.c: Likewise.
924 * elf32-i386.c: Likewise.
925 * elf32-mcore.c: Likewise.
926 * elf32-ppc.c: Likewise.
927 * elf32-sh.c: Likewise.
928 * elf32-sh64.c: Likewise.
929 * elf32-v850.c: Likewise.
930 * elf64-alpha.c: Likewise.
931 * elf64-sh64.c: Likewise.
932 * elfcode.h: Likewise.
933 * elfcore.h: Likewise.
934 * elflink.h: Likewise.
935 * elfxx-mips.c: Likewise.
936 * i386os9k.c: Likewise.
937 * ieee.c: Likewise.
938 * libbfd.c: Likewise.
939 * linker.c: Likewise.
940 * mmo.c: Likewise.
941 * nlm32-alpha.c: Likewise.
942 * nlm32-i386.c: Likewise.
943 * nlm32-ppc.c: Likewise.
944 * nlm32-sparc.c: Likewise.
945 * nlmcode.h: Likewise.
946 * oasys.c: Likewise.
947 * pdp11.c: Likewise.
948 * peicode.h: Likewise.
949 * reloc.c: Likewise.
950 * som.c: Likewise.
951 * srec.c: Likewise.
952 * tekhex.c: Likewise.
953 * vms.c: Likewise.
954 * xcofflink.c: Likewise.
955 * elf64-sparc.c: Edit comment to not use "== false".
956
957 * aoutf1.h: Don't use "? true : false".
958 * ecoff.c: Likewise.
959 * format.c: Likewise.
960 * ieee.c: Likewise.
961 * linker.c: Likewise.
962 * mmo.c: Likewise.
963 * oasys.c: Likewise.
964
965 2002-06-23 H.J. Lu <hjl@gnu.org>
966
967 * elflink.h (elf_link_add_archive_symbols): For the default
968 version, check references with only one `@' first.
969
970 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
971
972 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
973 function.
974 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
975 symbol table.
976 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
977 (elf64_hppa_size_dynamic_sections): Revise to use
978 elf64_hppa_mark_milli_and_exported_functions.
979 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
980 symbols out of dynamic symbol table.
981
982 2002-06-23 Alan Modra <amodra@bigpond.net.au>
983
984 * Makefile.in: Regenerate.
985 * libbfd.h: Regenerate.
986 * bfd-in2.h: Regenerate.
987 * configure: Regenerate.
988 * po/SRC-POTFILES.in: Regenerate.
989
990 * elflink.h: Comment typo fixes.
991
992 2002-06-23 H.J. Lu <hjl@gnu.org>
993
994 * elf-bfd.h (elf_link_loaded_list): New structure.
995 (elf_link_hash_table): Add "loaded".
996 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
997 * elflink.h (elf_link_check_versioned_symbol): New function.
998 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
999
1000 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1001
1002 * elflink.h (size_dynamic_sections): If the target does not
1003 support an ELF style hash table, return true, indicating that
1004 nothing needed to be done, rather than false, indicating that the
1005 section's size could not be computed.
1006
1007 2002-06-18 Dave Brolley <brolley@redhat.com>
1008
1009 From Catherine Moore, Michael Meissner, Dave Brolley:
1010 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
1011 * targets.c: Support bfd_elf32_frv_vec.
1012 * reloc.c: Add FRV relocs.
1013 * configure.in: Add support for bfd-elf32-frv-vec.
1014 * config.bfd (targ_cpu): Add support for frv-*-elf.
1015 * archures.c: Add frv arch and machines.
1016 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
1017 (ALL_MACHINES_CFILES): Add cpu-frv.c.
1018 (BFD32_BACKENDS): Add elf32-frv.lo.
1019 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
1020 (cpu-frv.lo): New target.
1021 (elf32-frv.lo): New target.
1022 * cpu-frv.c: New file.
1023 * elf32-frv.c: New file.
1024
1025 2002-06-18 Jakub Jelinek <jakub@redhat.com>
1026
1027 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1028 e_shnum == 0.
1029 Only read the first section header if e_shoff is non-zero.
1030 Don't consider e_shstrndx if there are no sections.
1031
1032 2002-06-17 Tom Rix <trix@redhat.com>
1033
1034 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
1035 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
1036 complain_overflow_bitfield.
1037
1038 2002-06-17 Alan Modra <amodra@bigpond.net.au>
1039
1040 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1041 (bfd_fdopenr): Likewise.
1042 (bfd_openstreamr): Likewise.
1043 (bfd_openw): Likewise.
1044
1045 * targets.c: Sort target vecs.
1046 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1047 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1048 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1049 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1050 * configure.in: Sort target vecs. Add m88kmach3_vec.
1051 * configure: Regenerate.
1052
1053 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1054
1055 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1056 bpo_reloc_no to break sort order ties, not address of items.
1057
1058 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1059
1060 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1061 Skip excluded sections in determing __gp value.
1062 (elf_hppa_final_link_relocate): Use the symbol's address in
1063 R_PARISC_FPTR64 relocations that don't need an opd entry.
1064 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1065 (elf64_hppa_finalize_dynreloc): Likewise.
1066 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1067 (elf64_hppa_finish_dynamic_symbol): Break up assert.
1068
1069 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
1070
1071 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1072 alignment for .bss, .data and .text sections so that sse and sse2
1073 code will work.
1074 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1075
1076 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
1077
1078 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1079 sh[1234]*-elf*.
1080
1081 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1082
1083 * elflink.h (elf_bfd_final_link): Improve error handling for missing
1084 dynamic sections.
1085
1086 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1087 for a symbol that has no output section.
1088 (allocate_dynrel_entries): Correct comment.
1089 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
1090 unless we want one.
1091 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1092 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
1093 with no section. Remove unnecessary parentheses.
1094
1095 2002-06-11 Tom Rix <trix@redhat.com>
1096
1097 * coffcode.h (coff_compute_section_file_positions): Add data
1098 section to AIX loader alignment check.
1099
1100 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
1101 alignment to 4 bytes.
1102 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1103 power accessor macro.
1104 (do_shared_object_padding): Remove invalid assertion.
1105
1106 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
1107
1108 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1109 for removed output sections.
1110
1111 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
1112
1113 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1114 htab_alloc.
1115 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1116
1117 2002-06-08 H.J. Lu <hjl@gnu.org>
1118
1119 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1120 work around a long long bug in gcc 2.96 on mips.
1121
1122 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
1123
1124 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1125 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1126 Regenerate dependency lists.
1127 * Makefile.in: Regenerate.
1128 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1129 vax1knetbsd_vec to targ_selvecs.
1130 * configure.in: Add vax1knetbsd_vec.
1131 * configure: Regenerate.
1132 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1133 * vax1knetbsd.c: New file.
1134 * vaxnetbsd.c: Update copyright years.
1135 (TARGET_PAGE_SIZE): Set to 0x1000.
1136 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1137
1138 2002-06-08 Matt Thomas <matt@3am-software.com>
1139
1140 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1141
1142 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1143
1144 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1145
1146 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1147
1148 * Makefile.am: Run "make dep-am".
1149 * Makefile.in: Regenerate.
1150
1151 * armnetbsd.c: Replace CONST with const.
1152 * corefile.c: Likewise.
1153 * elf32-dlx.c: Likewise.
1154 * elf64-mips.c: Likewise.
1155 * mmo.c: Likewise.
1156 * ns32knetbsd.c: Likewise.
1157
1158 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1159 table is elf64-sparc.
1160
1161 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1162
1163 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
1164 Fix RELA addends to get not shifted in the result. Don't do special
1165 handling of R_MIPS_64 for NewABI.
1166
1167 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1168
1169 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1170 (NAME(aout,slurp_reloc_table)): Likewise.
1171 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
1172 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
1173 (xcoff_write_archive_contents_big): Likewise.
1174 (xcoff_generate_rtinit): Likewise.
1175 (xcoff_generate_rtinit): Likewise, and check error return.
1176 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1177 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
1178 (coff_get_normalized_symtab): Likewise.
1179 (coff_make_empty_symbol): Likewise.
1180 (bfd_coff_set_symbol_class): Likewise.
1181 * cofflink.c (coff_link_add_symbols): Likewise.
1182 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
1183 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
1184 (bfd_ecoff_write_accumulated_debug): Likewise.
1185 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
1186 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
1187 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
1188 * ieee.c (do_with_relocs): Use bfd_zalloc.
1189 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
1190 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1191 (NAME(aout,slurp_reloc_table)): Likewise.
1192 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
1193 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
1194 * som.c (som_build_and_write_symbol_table): Likewise.
1195 (som_slurp_string_table): Likewise.
1196 (som_slurp_symbol_table): Likewise.
1197 (som_bfd_ar_write_symbol_stuff): Likewise.
1198 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
1199 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
1200 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
1201 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
1202 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
1203
1204 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1205
1206 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
1207 "group" union.
1208 (elf_group_name): Update.
1209 (elf_group_id): Define.
1210 (bfd_elf_set_group_contents): Declare.
1211 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
1212 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
1213 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
1214 that sym for the signature.
1215 (_bfd_elf_compute_section_file_positions): Don't call
1216 set_group_contents for "ld -r" case.
1217 (swap_out_syms): Use bfd_zalloc.
1218 * elflink.h (elf_link_add_archive_symbols): Likewise.
1219 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1220 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
1221
1222 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1223
1224 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
1225 relocs in opd for non-shared too.
1226
1227 2002-06-06 Jeffrey Law <law@redhat.com
1228
1229 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
1230 relocations.
1231
1232 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
1233
1234 * merge.c: Include libiberty.h.
1235 * elf-strtab.c: Include libiberty.h.
1236
1237 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
1238
1239 * peXXigen.c (pe_print_idata): Remove unused variable.
1240
1241 2002-06-06 David Heine <dlheine@tensilica.com>
1242
1243 * elf.c (assign_file_positions_for_segments): Remove unallocated
1244 sections from the section to segment mapping for PT_LOAD segments.
1245 Update comment about empty loadable segments.
1246
1247 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
1248
1249 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
1250 is within the .stabstr section.
1251
1252 2002-06-06 Alan Modra <amodra@bigpond.net.au>
1253
1254 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
1255 are "const PTR", not "const PTR *".
1256 (bfd_elf32_swap_symbol_in): Likewise.
1257 (bfd_elf64_swap_symbol_in): Likewise.
1258 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
1259 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1260 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1261 (elf_link_add_object_symbols): Likewise.
1262 (elf_link_record_local_dynamic_symbol): Likewise.
1263 (elf_link_input_bfd): Likewise.
1264 (elf_gc_mark): Likewise.
1265 (elf_reloc_symbol_deleted_p): Likewise.
1266 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1267 (mn10200_elf_relax_delete_bytes): Likewise.
1268 (mn10200_elf_symbol_address_p): Likewise.
1269 (mn10200_elf_get_relocated_section_contents): Likewise.
1270 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1271 (mn10300_elf_relax_section): Likewise.
1272 (mn10300_elf_relax_delete_bytes): Likewise.
1273 (mn10300_elf_symbol_address_p): Likewise.
1274 (mn10300_elf_get_relocated_section_contents): Likewise.
1275 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1276 (elf32_h8_relax_delete_bytes): Likewise.
1277 (elf32_h8_symbol_address_p): Likewise.
1278 (elf32_h8_get_relocated_section_contents): Likewise.
1279 * elf32-hppa.c (get_local_syms): Likewise.
1280 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1281 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1282 * elf32-sh.c (sh_elf_relax_section): Likewise.
1283 (sh_elf_relax_delete_bytes): Likewise.
1284 (sh_elf_get_relocated_section_contents): Likewise.
1285 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1286 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1287 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1288 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1289 * elf64-ppc.c (get_local_syms): Likewise.
1290 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1291 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1292
1293 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
1294
1295 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
1296
1297 2002-06-05 Alan Modra <amodra@bigpond.net.au>
1298
1299 * elf.c (group_signature): Swap in the whole symbol, and handle
1300 extracting section symbol names.
1301 (setup_group): Add comment.
1302 (set_group_contents): When called from objcopy or ld, arrange for
1303 section contents to be written. Write group member output section
1304 indices to allow objcopy to reorganize sections.
1305 (_bfd_elf_copy_private_section_data): Copy group info.
1306
1307 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
1308 (bfd_elf32_swap_symbol_in): Update prototype.
1309 (bfd_elf64_swap_symbol_in): Likewise.
1310 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
1311 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1312 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1313 (elf_link_add_object_symbols): Likewise.
1314 (elf_link_record_local_dynamic_symbol): Likewise.
1315 (elf_link_input_bfd): Likewise.
1316 (elf_gc_mark): Likewise.
1317 (elf_reloc_symbol_deleted_p): Likewise.
1318 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1319 (mn10200_elf_relax_delete_bytes): Likewise.
1320 (mn10200_elf_symbol_address_p): Likewise.
1321 (mn10200_elf_get_relocated_section_contents): Likewise.
1322 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1323 (mn10300_elf_relax_section): Likewise.
1324 (mn10300_elf_relax_delete_bytes): Likewise.
1325 (mn10300_elf_symbol_address_p): Likewise.
1326 (mn10300_elf_get_relocated_section_contents): Likewise.
1327 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1328 (elf32_h8_relax_delete_bytes): Likewise.
1329 (elf32_h8_symbol_address_p): Likewise.
1330 (elf32_h8_get_relocated_section_contents): Likewise.
1331 * elf32-hppa.c (get_local_syms): Likewise.
1332 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1333 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1334 * elf32-sh.c (sh_elf_relax_section): Likewise.
1335 (sh_elf_relax_delete_bytes): Likewise.
1336 (sh_elf_get_relocated_section_contents): Likewise.
1337 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1338 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1339 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1340 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1341 * elf64-ppc.c (get_local_syms): Likewise.
1342 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1343 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1344 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
1345 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1346 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1347 * elf64-mips.c (mips_elf64_size_info): Likewise.
1348 * elf64-s390.c (s390_elf64_size_info): Likewise.
1349 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1350
1351 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1352
1353 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
1354 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
1355 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
1356 _bfd_mips_elf_ignore_discarded_relocs.
1357 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
1358
1359 2002-06-05 H.J. Lu <hjl@gnu.org>
1360
1361 * elfxx-mips.c (mips_elf_calculate_relocation): Call
1362 _bfd_elf_rel_local_sym for STT_SECTION relocations against
1363 the SEC_MERGE section.
1364
1365 2002-06-05 Alan Modra <amodra@bigpond.net.au>
1366
1367 * coff-alpha.c: Update copyright date.
1368 * coff-mips.c: Likewise.
1369 * xcoff-target.h: Likewise.
1370
1371 * bfd-in.h: Remove "taken from the source" comment.
1372 * libbfd-in.h: Likewise.
1373 * libcoff-in.h: Likewise.
1374 * bfd-in2.h: Regenerate.
1375 * libbfd.h: Regenerate.
1376 * libcoff.h: Regenerate.
1377
1378 * elf.c (bfd_elf_discard_group): Return true.
1379 * elf-bfd.h (bfd_elf_discard_group): Declare.
1380 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
1381 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
1382 * bfd.c (bfd_discard_group): Define.
1383 * targets.c (struct bfd_target): Add _bfd_discard_group.
1384 (BFD_JUMP_TABLE_LINK): Here too.
1385 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
1386 * aout-adobe.c (aout_32_bfd_discard_group): Define.
1387 * aout-target.h (MY_bfd_discard_group): Define.
1388 * aout-tic30.c (MY_bfd_discard_group): Define.
1389 * binary.c (binary_bfd_discard_group): Define.
1390 * bout.c (b_out_bfd_discard_group): Define.
1391 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
1392 * coffcode.h (coff_bfd_discard_group): Define.
1393 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
1394 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
1395 * i386msdos.c (msdos_bfd_discard_group): Define.
1396 * i386os9k.c (os9k_bfd_discard_group): Define.
1397 * ieee.c (ieee_bfd_discard_group): Define.
1398 * ihex.c (ihex_bfd_discard_group): Define.
1399 * mmo.c (mmo_bfd_discard_group): Define.
1400 * nlm-target.h (nlm_bfd_discard_group): Define.
1401 * oasys.c (oasys_bfd_discard_group): Define.
1402 * ppcboot.c (ppcboot_bfd_discard_group): Define.
1403 * som.c (som_bfd_discard_group): Define.
1404 * srec.c (srec_bfd_discard_group): Define.
1405 * tekhex.c (tekhex_bfd_discard_group): Define.
1406 * versados.c (versados_bfd_discard_group): Define.
1407 * vms.c (vms_bfd_discard_group): Define.
1408 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
1409 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
1410 (aix5coff64_vec): Likewise.
1411 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
1412
1413 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1414
1415 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
1416 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
1417 (elf32-sh64-com.lo): New dependency list.
1418 * Makefile.in: Regenerate.
1419 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
1420 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
1421 elf32-sh64-com.lo.
1422 * configure: Regenerate.
1423 * elf32-sh64.c (sh64_address_in_cranges)
1424 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
1425 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
1426 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
1427 * elf32-sh64-com.c: ...here. New file.
1428
1429 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1430
1431 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
1432 ATTRIBUTE_UNUSED on used params.
1433 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
1434 before calling bfd_section_from_elf_index on local syms.
1435 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1436
1437 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1438
1439 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
1440 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
1441 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
1442 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
1443 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
1444 * Makefile.in: Regenerate.
1445 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1446 (sh64-*-netbsd*): New targets.
1447 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
1448 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
1449 * configure: Regenerate.
1450 * elf32-sh64-nbsd.c: New file.
1451 * elf64-sh64-nbsd.c: New file.
1452 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
1453 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
1454 bfd_elf64_sh64lnbsd_vec.
1455
1456 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1457
1458 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
1459 (bfd_section_from_shdr): Likewise. Set section name of group
1460 sections from signature.
1461 (group_signature): Split out from setup_group. Ensure symbol table
1462 is available.
1463 (bfd_elf_discard_group): New function.
1464 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
1465 .gnu.linkonce* sections if they are members of a group.
1466 (set_group_contents): Set GRP_COMDAT flag.
1467 * section.c (bfd_discard_group): New function.
1468 * bfd-in.h (bfd_elf_discard_group): Declare.
1469 * bfd-in2.h: Regenerate.
1470 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
1471 (elf_linkonce_p): Define.
1472
1473 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1474
1475 * elf.c (bfd_section_from_shdr): Make "name" const.
1476 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
1477 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
1478 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1479 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1480 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1481 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1482 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1483 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
1484 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1485 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1486 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1487
1488 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1489
1490 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
1491 ABI.
1492
1493 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
1494
1495 * elf32-arc.c: Fix formatting.
1496 * elf32-arm.h: Likewise.
1497 * elf32-cris.c: Likewise.
1498 * elf32-dlx.c: Likewise.
1499 * elf32-hppa.c: Likewise.
1500 * elf32-i386.c: Likewise.
1501 * elf32-i386qnx.c: Likewise.
1502 * elf32-or32.c: Likewise.
1503 * elf32-s390.c: Likewise.
1504 * elf32-sh64.c: Likewise.
1505 * elf32-vax.c: Likewise.
1506 * elf32-xstormy16.c: Likewise.
1507 * elf64-alpha.c: Likewise.
1508 * elf64-mmix.c: Likewise.
1509 * elf64-ppc.c: Likewise.
1510 * elf64-s390.c: Likewise.
1511 * elf64-sh64.c: Likewise.
1512 * elf64-x86-64.c: Likewise.
1513
1514 2002-06-02 Richard Henderson <rth@redhat.com>
1515
1516 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
1517 null when there are no got entries for a symbol.
1518 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
1519 uninitialized variable warning.
1520
1521 2002-06-01 Richard Henderson <rth@redhat.com>
1522
1523 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
1524 undefined symbols here.
1525 (elf64_alpha_relax_section): Do it here. Also test for not
1526 defined in the current module.
1527 (elf64_alpha_relocate_section_r): Split out of ...
1528 (elf64_alpha_relocate_section): ... here. Don't dereference
1529 NULL when looking up local got entries.
1530
1531 2002-06-01 Richard Henderson <rth@redhat.com>
1532
1533 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
1534 symbols from JSR relaxation.
1535 (elf64_alpha_size_plt_section_1): New.
1536 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
1537 (elf64_alpha_size_rela_got_1): ... here.
1538 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
1539 (elf64_alpha_size_rela_got_section): ... here.
1540 (elf64_alpha_size_plt_section): New.
1541 (elf64_alpha_relax_section): Call them.
1542 (elf64_alpha_size_got_sections): Remove output_bfd arg.
1543 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
1544
1545 2002-06-01 Richard Henderson <rth@redhat.com>
1546
1547 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
1548 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
1549 in shared libraries. Fix DTPRELHI and TPRELHI value.
1550 (INSN_ADDQ, INSN_RDUNIQ): New.
1551 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
1552 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
1553 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
1554 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
1555 Handle GOTDTPREL and GOTTPREL relocations.
1556 (elf64_alpha_relax_gprelhilo): New.
1557 (elf64_alpha_relax_tls_get_addr): New.
1558 (elf64_alpha_relax_find_tls_segment): New.
1559 (elf64_alpha_relax_section): Handle TLS relocations.
1560 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
1561 (elf64_alpha_check_relocs): Set it.
1562
1563 2002-06-01 Richard Henderson <rth@redhat.com>
1564
1565 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
1566
1567 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
1568 check; don't suppress dynamic relocs for non-allocated sections.
1569
1570 * elf64-alpha.c: Remove dead code.
1571
1572 2002-05-31 Alan Modra <amodra@bigpond.net.au>
1573
1574 * bfd-in2.h: Regenerate.
1575 * libbfd.h: Regenerate.
1576 * po/SRC-POTFILES.in: Regenerate.
1577
1578 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
1579 space for bss .plt.
1580
1581 2002-05-31 Graeme Peterson <gp@qnx.com>
1582
1583 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
1584 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
1585 Run "make dep-am".
1586 * Makefile.in: Regenerate.
1587 * config.bfd: Add i[3456]86-*-nto-qnx* support.
1588 * configure.in: Add bfd_elf32_i386qnx_vec support.
1589 * configure: Regenerate.
1590 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
1591 is_contained_by_filepos, and copy_private_bfd_data_p.
1592 * elf.c (assign_file_positions_for_segments): Call backend
1593 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
1594 (IS_CONTAINED_BY_FILEPOS): Define.
1595 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
1596 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
1597 Fix non-K&R call to _bfd_error_handler.
1598 (_bfd_elf_copy_private_section_data): Use backend
1599 copy_private_bfd_data_p.
1600 * elf32-i386.c: Don't include elfxx-target.h when
1601 ELF32_I386_C_INCLUDED is defined.
1602 * elf32-i386qnx.c: New QNX elf backend file.
1603 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
1604 elf_backend_is_contained_by_filepos, and
1605 elf_backend_do_copy_private_bfd_data.
1606 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
1607
1608 2002-05-31 Alan Modra <amodra@bigpond.net.au>
1609
1610 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
1611 Move other similar defines to start of file.
1612
1613 2002-05-30 Tom Rix <trix@redhat.com>
1614
1615 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
1616 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
1617
1618 2002-05-30 Richard Henderson <rth@redhat.com>
1619
1620 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
1621 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
1622 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
1623 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
1624 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
1625 (struct alpha_elf_obj_tdata): Rename total_got_entries and
1626 n_local_got_entries to total_got_size and local_got_size.
1627 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
1628 (alpha_got_entry_size): New.
1629 (elf64_alpha_relax_with_lituse): Use it.
1630 (elf64_alpha_relax_without_lituse): Likewise.
1631 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
1632 (get_got_entry): New.
1633 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
1634 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
1635 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
1636 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
1637 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
1638 (elf64_alpha_calc_got_offsets): Likewise.
1639 (alpha_dynamic_entries_for_reloc): New.
1640 (elf64_alpha_calc_dynrel_sizes): Use it.
1641 (elf64_alpha_size_dynamic_sections): Likewise.
1642 (elf64_alpha_relocate_section): Handle TLS relocations.
1643 * reloc.c: Add Alpha TLS relocations.
1644 * bfd-in2.h, libbfd.h: Rebuild.
1645
1646 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1647
1648 * peXXigen.c (pe_print_idata): Remove double printed
1649 import table lines; add Bound-To comment.
1650
1651 2002-05-29 Matt Thomas <matt@3am-software.com>
1652
1653 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
1654 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
1655 (elf32-vax.lo): New rule.
1656 * Makefile.in: Regenerate.
1657 * configure.in (bfd_elf32_vax_vec)
1658 (vaxnetbsd_vec): New vectors.
1659 * configure: Regenerate.
1660 * config.bfd (vax-*-netbsdelf*)
1661 (vax-*-netbsdaout*)
1662 (vax-*-netbsd*): New targets.
1663 * elf32-vax.c: New file.
1664 * reloc.c: Add VAX relocations.
1665 * bfd-in2.h: Regenerate.
1666 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
1667
1668 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
1669
1670 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
1671 and bfd_elf32_bigarm_vec to targ_selvecs.
1672
1673 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1674
1675 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1676 with auto-imported symbols.
1677
1678 2002-05-29 Adam Nemet <anemet@lnxw.com>
1679
1680 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1681 sections only record bfd.
1682 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
1683 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
1684 * bfd-in2.h: Regenerate.
1685
1686 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
1687
1688 * syms.c (_bfd_stab_section_find_nearest_line): Move
1689 declaration and initialisation of saw_line and saw_func out of
1690 for loop.
1691
1692 2002-05-29 Alan Modra <amodra@bigpond.net.au>
1693
1694 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
1695 (bfd_elf64_get_symbol_info): Define.
1696 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
1697
1698 2002-05-29 Andrey Volkov <avolkov@transas.com>
1699
1700 * cpu-h8300.c: Make default h8300 machine first in machine list.
1701
1702 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
1703
1704 * config.bfd: Added DLX configuraton.
1705 * Makefile.am: Added DLX configuraton.
1706 * configure.in: Added DLX configuraton.
1707 * archures.c: Add DLX architecure.
1708 * reloc.c: Add DLX relocs.
1709 * targets.c: Added DLX target vector.
1710 * configure: Regenerate.
1711 * Makefile.in: Regenreate.
1712 * bfd-in2.h: Regenreate.
1713 * elf32-dlx.c: New file: Support DLX target.
1714 * cpu-dlx.c: New file: Support DLX target.
1715
1716 2002-05-25 Alan Modra <amodra@bigpond.net.au>
1717
1718 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
1719
1720 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
1721 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
1722 strings to point inside function code sym string.
1723 (func_desc_adjust): Likewise.
1724 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
1725
1726 2002-05-24 Michal Ludvig <mludvig@suse.cz>
1727
1728 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
1729 (elf64_x86_64_grok_psinfo): Added.
1730
1731 2002-05-24 TAMURA Kent <kent@netbsd.org>
1732
1733 * config.bfd: Add a target for i386-netbsdpe.
1734
1735 2002-05-24 Alan Modra <amodra@bigpond.net.au>
1736
1737 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
1738 and is_func_descriptor.
1739 (func_desc_adjust): Hide function code sym in shared libs unless
1740 there is a matching exported function descriptor sym.
1741
1742 2002-05-23 Jakub Jelinek <jakub@redhat.com>
1743
1744 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
1745 for symbols from SHF_TLS section.
1746 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
1747 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
1748 (map_sections_to_segments): Build PT_TLS segment if necessary.
1749 (assign_file_positions_for_segments): Likewise.
1750 (get_program_header_size): Account for PT_TLS segment.
1751 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
1752 SEC_THREAD_LOCAL sections to STT_TLS.
1753 * reloc.c: Add 386 and IA-64 TLS relocs.
1754 * section.c (SEC_THREAD_LOCAL): Define.
1755 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
1756 Remove.
1757 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
1758 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
1759 unconditionally.
1760 (struct elf_final_link_info): Add first_tls_sec.
1761 (elf_bfd_final_link): Set first_tls_sec.
1762 Compute elf_hash_table (info)->tls_segment.
1763 (elf_link_output_extsym): Handle STT_TLS symbols.
1764 (elf_link_input_bfd): Likewise.
1765 * syms.c (BSF_THREAD_LOCAL): Define.
1766 * bfd-in2.h: Rebuilt.
1767 * libbfd.h: Rebuilt.
1768 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
1769 elf_i386_mkobject, elf_i386_object_p): New functions.
1770 (elf_howto_table): Add TLS relocs.
1771 (elf_i386_reloc_type_lookup): Support TLS relocs.
1772 (elf_i386_info_to_howto_rel): Likewise.
1773 (struct elf_i386_link_hash_entry): Add tls_type.
1774 (struct elf_i386_obj_tdata): New.
1775 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
1776 New macros.
1777 (struct elf_i386_link_hash_table): Add tls_ldm_got.
1778 (link_hash_newfunc): Clear tls_type.
1779 (elf_i386_check_relocs): Support TLS relocs.
1780 (elf_i386_gc_sweep_hook): Likewise.
1781 (allocate_dynrelocs): Likewise.
1782 (elf_i386_size_dynamic_sections): Likewise.
1783 (elf_i386_relocate_section): Likewise.
1784 (elf_i386_finish_dynamic_symbol): Likewise.
1785 (bfd_elf32_mkobject, elf_backend_object_p): Define.
1786 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
1787 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
1788 want_tprel, want_dtpmod, want_dtprel.
1789 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
1790 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
1791 R_IA64_LTOFF_TPREL22.
1792 (elf_code_to_howto_index): Add TLS relocs.
1793 (elfNN_ia64_check_relocs): Support TLS relocs.
1794 (allocate_global_data_got): Account for TLS .got data.
1795 (allocate_dynrel_entries): Account for TLS dynamic relocations.
1796 (elfNN_ia64_install_value): Supprt TLS relocs.
1797 (set_got_entry): Support TLS relocs.
1798 (elfNN_ia64_relocate_section): Likewise.
1799
1800 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
1801
1802 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
1803 BLX reloc round the relocation up rather than down.
1804 * coff-arm.c (coff_arm_relocate_section): Likewise.
1805
1806 2002-05-21 H.J. Lu (hjl@gnu.org)
1807
1808 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
1809 definition.
1810
1811 2002-05-22 Alan Modra <amodra@bigpond.net.au>
1812
1813 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
1814 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
1815
1816 2002-05-22 Alan Modra <amodra@bigpond.net.au>
1817
1818 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
1819 unresolved relocs.
1820 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
1821
1822 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1823
1824 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
1825 non-ELF targets.
1826
1827 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1828
1829 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
1830 an error value.
1831 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1832 return with false on error.
1833 (elf_link_input_bfd): Check reloc_emitter return value.
1834
1835 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
1836
1837 * config.bfd (armeb-*-netbsdelf*): New target.
1838
1839 2002-05-20 Alan Modra <amodra@bigpond.net.au>
1840
1841 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1842 at the plt call stub.
1843
1844 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1845
1846 * cpu-mips.c (mips_compatible): Don't try to check machine
1847 compatibility.
1848
1849 2002-05-18 Tom Rix <trix@redhat.com>
1850
1851 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
1852
1853 2002-05-17 Alan Modra <amodra@bigpond.net.au>
1854
1855 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1856 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1857 we've already warned about an undefined symbol. Report more
1858 detail on reloc errors.
1859
1860 2002-05-17 Alan Modra <amodra@bigpond.net.au>
1861
1862 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1863 * configure.in: Invoke AM_INSTALL_LIBBFD.
1864 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
1865 (install_libbfd): .. New target.
1866 (uninstall_libbfd): Likewise.
1867 (install-bfdlibLTLIBRARIES): Likewise.
1868 (uninstall-bfdlibLTLIBRARIES): Likewise.
1869 (bfdlibdir): New.
1870 (bfdincludedir): New.
1871 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1872 * aclocal.m4: Regenerate.
1873 * configure: Regenerate.
1874 * Makefile.in: Regenerate.
1875
1876 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
1877
1878 * hash.c (bfd_hash_lookup): Remove computation of len from inside
1879 hash loop.
1880
1881 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
1882
1883 * config.bfd: Add targets for sh64-linux (little endian and
1884 big endian).
1885
1886 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
1887
1888 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1889 is located in the same section as the import table. Instead
1890 check, and if necessary load the section containing the thunk.
1891
1892 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
1893
1894 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
1895 bfd_bread.
1896 (xcoff64_core_file_matches_executable_p): Replace bfd_read
1897 with bfd_bread.
1898
1899 2002-05-15 Alan Modra <amodra@bigpond.net.au>
1900
1901 * aix5ppc-core.c: Warning fixes.
1902 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1903 * aout-target.h (MY_bfd_link_just_syms): Define.
1904 * aout-tic30.c (MY_bfd_link_just_syms): Define.
1905 * bfd.c (bfd_link_just_syms): Define.
1906 * binary.c (binary_bfd_link_just_syms): Define.
1907 * bout.c (b_out_bfd_link_just_syms): Define.
1908 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1909 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1910 * coffcode.h (coff_bfd_link_just_syms): Define.
1911 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1912 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1913 (_bfd_elf_link_just_syms): Declare.
1914 * elf.c (_bfd_elf_link_just_syms): New function.
1915 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1916 sections haven't already been discarded by the linker.
1917 * elflink.h (elf_link_add_object_symbols): Likewise for stab
1918 sections and SEC_MERGE sections.
1919 (elf_bfd_discard_info): Similarly here.
1920 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1921 * i386msdos.c (msdos_bfd_link_just_syms): Define.
1922 * i386os9k.c (os9k_bfd_link_just_syms): Define.
1923 * ieee.c (ieee_bfd_link_just_syms): Define.
1924 * ihex.c (ihex_bfd_link_just_syms): Define.
1925 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1926 (_bfd_generic_link_just_syms): Declare.
1927 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1928 * linker.c (_bfd_generic_link_just_syms): New function.
1929 * mmo.c (mmo_bfd_link_just_syms): Define.
1930 * nlm-target.h (nlm_bfd_link_just_syms): Define.
1931 * oasys.c (oasys_bfd_link_just_syms): Define.
1932 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1933 * som.c (som_bfd_link_just_syms): Define.
1934 * srec.c (srec_bfd_link_just_syms): Define.
1935 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1936 (BFD_JUMP_TABLE_LINK): And here.
1937 * tekhex.c (tekhex_bfd_link_just_syms): Define.
1938 * versados.c (versados_bfd_link_just_syms): Define.
1939 * vms.c (vms_bfd_link_just_syms): Define.
1940 * libbfd.h: Regenerate.
1941 * bfd-in2.h: Regenerate.
1942
1943 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1944
1945 * elf32-mips.c: Remove superfluous definitions copied from
1946 elfxx-mips.c.
1947 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1948 SGIish vectors to check the special case.
1949 (mips_elf_hi16_reloc): Fix comment.
1950 (mips_elf_got16_reloc): Likewise.
1951 (_bfd_mips_elf32_gprel16_reloc): Likewise.
1952 (elf_reloc_map): Code cleanup.
1953 (mips_reloc_map): Add comment.
1954 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1955 (mips_elf32_rtype_to_howto): Likewise.
1956 (mips_elf32_discard_info): Likewise.
1957 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1958 lead to IRIX compatibility now.
1959
1960 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1961
1962 * elfxx-mips.c: Call it IRIX, not Irix in comments.
1963
1964 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
1965
1966 * config.bfd (shle-*-netbsdelf*): Add target which includes
1967 sh64 support.
1968
1969 2002-05-13 David Edelsohn <edelsohn@gnu.org>
1970
1971 * configure.in: Revert 2002-04-07. Instead, auto-configure
1972 HAVE_ST_C_IMPL.
1973 * configure: Regenerate.
1974 * config.in: Regenerate.
1975 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1976 or AIX_5_CORE.
1977
1978 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1979
1980 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1981 corefiles as well.2
1982 * configure: Regenerate.
1983
1984 2002-05-13 Alan Modra <amodra@bigpond.net.au>
1985
1986 * Makefile.am (install-data-local): Install headers to
1987 $(exec_prefix)/include.
1988 * Makefile.in: Regenerate.
1989
1990 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1991 Daniel Jacobowitz <drow@mvista.com>
1992
1993 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
1994 map BFD_RELOC_RVA.
1995
1996 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1997
1998 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1999 hppa*-*-openbsd*): New targets.
2000 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2001 * configure: Regenerate.
2002
2003 2002-05-10 Tom Rix <trix@redhat.com>
2004
2005 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
2006 xcoff64_ppc_relocate_section.
2007 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
2008 * libxcoff.h: Common xcoff_reloc_type function declaration.
2009
2010 2002-05-10 Alan Modra <amodra@bigpond.net.au>
2011
2012 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
2013 added in 2002-05-09 commit.
2014
2015 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
2016 don't look for stubs on all undefined syms.
2017
2018 2002-05-09 Alan Modra <amodra@bigpond.net.au>
2019
2020 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
2021 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
2022 pcrel_offset.
2023
2024 * elf32-i386.c (elf_howto_table): Comments.
2025 (elf_i386_relocate_section): Handle more relocs for relocatable
2026 linking and against SEC_MERGE sections.
2027
2028 2002-05-08 Alan Modra <amodra@bigpond.net.au>
2029
2030 * elf32-ppc.c (ppc_elf_create_got): New function.
2031 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
2032 _bfd_elf_create_dynamic_sections. Correct .plt flags.
2033 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2034 _bfd_elf_create_got_section.
2035
2036 2002-05-07 Alan Modra <amodra@bigpond.net.au>
2037
2038 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2039 * elfxx-target.h (elf_backend_rela_normal): Define.
2040 (elfNN_bed): Init rela_normal.
2041 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2042 for section symbols here if rela_normal. Simplify abs section test.
2043 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2044 return immediately. Remove code handling relocatable linking.
2045 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2046 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2047 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2048 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2049 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2050 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2051 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2052 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2053 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2054 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2055 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2056 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2057 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2058 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2059 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2060 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2061 * elf-m10200.c (elf_backend_rela_normal): Define.
2062 * elf-m10300.c (elf_backend_rela_normal): Define.
2063 * elf32-fr30.c (elf_backend_rela_normal): Define.
2064 * elf32-i370.c (elf_backend_rela_normal): Define.
2065 * elf32-i860.c (elf_backend_rela_normal): Define.
2066 * elf32-m68k.c (elf_backend_rela_normal): Define.
2067 * elf32-mcore.c (elf_backend_rela_normal): Define.
2068 * elf32-openrisc.c (elf_backend_rela_normal): Define.
2069 * elf32-ppc.c (elf_backend_rela_normal): Define.
2070 * elf32-s390.c (elf_backend_rela_normal): Define.
2071 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2072 * elf64-ppc.c (elf_backend_rela_normal): Define.
2073 * elf64-s390.c (elf_backend_rela_normal): Define.
2074 * elf64-x86-64.c (elf_backend_rela_normal): Define.
2075 * elfxx-ia64.c (elf_backend_rela_normal): Define.
2076 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2077 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2078
2079 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
2080
2081 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2082 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2083
2084 2002-05-06 Alan Modra <amodra@bigpond.net.au>
2085
2086 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2087 when not relocatable. Fix reloc_emitter call for K&R.
2088
2089 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2090
2091 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2092 reloading local sym addend mistakenly removed in 2002-05-01 change.
2093
2094 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2095 (read_abbrevs): Change "offset" param to bfd_vma.
2096 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2097 Change "abbrev_offset" to bfd_vma.
2098 (read_indirect_string): Use correct conversion chars in error
2099 message format string, cast bfd_vma's to unsigned long.
2100 (read_abbrevs): Likewise.
2101 (read_attribute_value): Likewise.
2102 (decode_line_info): Likewise.
2103 (scan_unit_for_functions): Likewise.
2104 (parse_comp_unit): Likewise.
2105
2106 2002-05-04 Tom Rix <trix@redhat.com>
2107
2108 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2109 (coff_swap_reloc_out): Same.
2110 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2111 (xcoff_swap_reloc_out): Same.
2112 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2113 case some 16 bit relocs. Add reloc value to output.
2114 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
2115 R_RBR. Improve names.
2116 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2117 (bfd_xcoff_backend_data): Update with new reloc swap names.
2118 (bfd_pmac_xcoff_backend_data) : Same.
2119 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2120 (xcoff64_swap_reloc_out): Same.
2121 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
2122 R_POS. Add reloc value to output.
2123 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
2124 bit R_RBR. Improve names, masks.
2125 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2126 (bfd_xcoff_backend_data): Update with new reloc swap names.
2127 (bfd_xcoff_aix5_backend_data) : Same.
2128
2129 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2130
2131 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2132 bfd_count top_index, input_list, all_local_syms.
2133 (elf32_hppa_setup_section_lists): New function, split from
2134 elf32_hppa_size_stubs.
2135 (elf32_hppa_next_input_section): Likewise.
2136 (group_sections): Likewise.
2137 (get_local_syms): Likewise.
2138 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
2139 stubs on undefined syms too.
2140 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
2141 Only access htab elf fields when we have an elf hash table.
2142 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2143 (elf32_hppa_next_input_section): Declare.
2144
2145 2002-05-04 Bob Byrnes <byrnes@curl.com>
2146
2147 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2148 _bfd_new_bfd.
2149
2150 2002-05-03 H.J. Lu (hjl@gnu.org)
2151
2152 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2153 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2154 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2155 to hide a global symbol.
2156 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
2157 forced_local to true.
2158
2159 2002-05-02 Richard Henderson <rth@redhat.com>
2160
2161 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2162 vs SHN_UNDEF to zero.
2163
2164 2002-05-02 Alan Modra <amodra@bigpond.net.au>
2165
2166 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
2167 16 bit reloc.
2168 <R_PPC64_SECTOFF_DS>: Likewise.
2169 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2170 SECTOFF reloc.
2171 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
2172 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2173 SECTOFF reloc.
2174
2175 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
2176 (ppc64_elf_ha_reloc): New function.
2177 (ppc64_elf_brtaken_reloc): New function.
2178 (ppc64_elf_sectoff_reloc): New function.
2179 (ppc64_elf_sectoff_ha_reloc): New function.
2180 (ppc64_elf_toc_reloc): New function.
2181 (ppc64_elf_toc_ha_reloc): New function.
2182 (ppc64_elf_toc64_reloc): New function.
2183 (ppc64_elf_unhandled_reloc): New function.
2184 (ppc64_elf_howto_raw): Use the above.
2185 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
2186 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
2187 <R_PPC64_SECTOFF_DS>: Likewise.
2188 (IS_ABSOLUTE_RELOC): Update.
2189 (struct ppc_link_hash_table): Add have_undefweak.
2190 (ppc64_elf_link_hash_table_create): Init.
2191 (func_desc_adjust): Set have_undefweak.
2192 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
2193 add the .sfpr blr when have_undefweak.
2194 (ppc64_elf_setup_section_lists): Check hash table flavour.
2195 (ppc64_elf_next_input_section): Move output_section->owner test to
2196 ppc64elf.em.
2197 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
2198 and relocatable test. Return TOCstart and don't set elf_gp.
2199 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
2200 offset calculation. Add assert on weak sym branch tweaks.
2201 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
2202 (ppc64_elf_toc): Declare.
2203 (ppc64_elf_next_input_section): Update.
2204
2205 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2206
2207 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
2208 file_name.
2209
2210 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2211
2212 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
2213 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
2214 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
2215 call branches. Correct undefined weak destination.
2216 (ppc64_elf_func_desc_adjust): Always create at least one blr in
2217 .sfpr, and correct case where either only savef* or restf* is
2218 needed.
2219
2220 Long branch stubs, multiple stub sections.
2221 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
2222 (ppc64_elf_next_input_section): Declare.
2223 * elf64-ppc.c: Move linker-only prototypes.
2224 (STUB_SUFFIX): Define.
2225 (enum ppc_stub_type): New.
2226 (struct ppc_stub_hash_entry): New.
2227 (struct ppc_branch_hash_entry): New.
2228 (struct ppc_link_hash_entry): Add stub_cache, oh.
2229 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
2230 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
2231 Rename plt_overflow to stub_error.
2232 (ppc_stub_hash_lookup): Define.
2233 (ppc_branch_hash_lookup): Define.
2234 (stub_hash_newfunc): New function.
2235 (branch_hash_newfunc): New function.
2236 (link_hash_newfunc): Init new fields.
2237 (ppc64_elf_link_hash_table_create): Likewise.
2238 (ppc64_elf_link_hash_table_free): New function.
2239 (ppc_stub_name): New function.
2240 (ppc_get_stub_entry): New function.
2241 (ppc_add_stub): New function.
2242 (create_linkage_sections): Use bfd_make_section_anyway. Create
2243 .branch_lt and .rela.branch_lt sections. Don't create .stub.
2244 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
2245 and set up for plt call stubs. Link func and func desc syms.
2246 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
2247 (func_desc_adjust): Avoid hash lookup when func desc sym available
2248 via shortcut, and set links when processing.
2249 (ppc64_elf_hide_symbol): Likewise.
2250 (allocate_dynrelocs): Don't allocate stub section here.
2251 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
2252 Remove sstub code.
2253 (ppc_type_of_stub): New function.
2254 (build_one_stub): Delete.
2255 (ppc_build_one_stub): New function.
2256 (ppc_size_one_stub): New function.
2257 (ppc64_elf_setup_section_lists): New function.
2258 (ppc64_elf_next_input_section): New function.
2259 (group_sections): New function.
2260 (get_local_syms): New function.
2261 (ppc64_elf_size_stubs): Rewrite.
2262 (ppc64_elf_build_stubs): Rewrite.
2263 (ppc64_elf_relocate_section): Look up stub entry for REL24
2264 relocs. Don't propagate REL14* to dynamic objects. Look for long
2265 branch stubs if REL14* or REL24 relocs won't reach.
2266 (bfd_elf64_bfd_link_hash_table_free): Define.
2267
2268 2002-04-30 Mark Mitchell <mark@codesourcery.com>
2269
2270 * bfd/config.bfd: Add support for powerpc-*-windiss.
2271
2272 2002-04-30 Tom Rix <trix@redhat.com>
2273
2274 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
2275 symbol names into the hash table.
2276
2277 2002-04-28 Tom Rix <trix@redhat.com>
2278
2279 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
2280 calulating relocations.
2281 (xcoff_complain_overflow) : Function table for relocation errors.
2282 (xcoff_ppc_relocate_section): Use relocation and complain function
2283 tables.
2284 (xcoff_complain_overflow_unsigned_func): New complain function.
2285 (xcoff_complain_overflow_signed_func): Same.
2286 (xcoff_complain_overflow_bitfield_func): Same.
2287 (xcoff_complain_overflow_dont_func): Same.
2288 (xcoff_reloc_type_crel): New recot function.
2289 (xcoff_reloc_type_br): Same.
2290 (xcoff_reloc_type_ba): Same.
2291 (xcoff_reloc_type_toc): Same.
2292 (xcoff_reloc_type_rel): Same.
2293 (xcoff_reloc_type_neg): Same.
2294 (xcoff_reloc_type_pos): Same.
2295 (xcoff_reloc_type_fail): Same.
2296 (xcoff_reloc_type_noop): Same.
2297 * libxcoff.h : Declare common parts for xcoff64.
2298 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
2299 and complain function tables.
2300
2301 2002-04-28 Alan Modra <amodra@bigpond.net.au>
2302
2303 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
2304 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
2305
2306 2002-04-26 Alan Modra <amodra@bigpond.net.au>
2307
2308 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
2309 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2310
2311 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
2312 same as the output before calling elf_link_input_bfd.
2313
2314 * coffcode.h (coff_compute_section_file_positions): Set
2315 section_tail after shuffling section list.
2316
2317 2002-04-24 Christian Groessler <chris@groessler.org>
2318
2319 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
2320 addresses are 23bit with a special layout, not plain 32bit
2321 values. Prevent relocation of immediate values.
2322
2323 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
2324
2325 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
2326 MIPS-16 ASE flags are set, print something to indicate that.
2327
2328 2002-04-23 Alan Modra <amodra@bigpond.net.au>
2329
2330 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
2331 under which a plt call stub is used.
2332 (final_link_relocate): Similarly.
2333 (allocate_plt_static): Clear h-plabel except when plt entry is
2334 exclusively used for a plabel.
2335 (allocate_dynrelocs): Use the above to simplify plt sizing.
2336 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
2337 (elf32_hppa_link_hash_table_create): Init.
2338 (BL22_RP): Define.
2339 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
2340 (elf32_hppa_check_relocs): Set has_22bit_branch.
2341
2342 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
2343 (final_link_relocate): Likewise.
2344
2345 2002-04-22 Jakub Jelinek <jakub@redhat.com>
2346
2347 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
2348 search table if some FDE is DW_EH_PE_aligned encoded either.
2349 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
2350
2351 2002-04-22 Richard Smith <richard@ex-parrot.com>
2352 Jakub Jelinek <jakub@redhat.com>
2353
2354 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
2355 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
2356 encoded personality.
2357 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
2358 for CIE/FDE removal.
2359
2360 2002-04-20 Tom Rix <trix@redhat.com>
2361
2362 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
2363
2364 2002-04-20 Alan Modra <amodra@bigpond.net.au>
2365
2366 * archures.c (bfd_lookup_arch): Move the list order comment..
2367 (struct bfd_arch_info): ..to where it belongs.
2368 * bfd-in2.h: Regenerate.
2369
2370 * archures.c (bfd_lookup_arch): Add comment on list order.
2371 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
2372 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
2373 is always at head of list.
2374
2375 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2376
2377 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
2378 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
2379 definition of these functions for ARM_WINCE builds as they are
2380 not used.
2381 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
2382 for ARM_WINCE builds.
2383
2384 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2385
2386 * coff-arm.c (bfd_arm_process_before_allocation):
2387
2388 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
2389
2390 * cpu-sh.c (scan_mach): Delete.
2391 (arch_info_struct): Replace scan_mach with bfd_default_scan.
2392 (bfd_sh_arch): Likewise.
2393
2394 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
2395
2396 * ihex.c (ihex_write_object_contents): Fix check for records
2397 crossing 64K boundaries.
2398
2399 2002-04-16 Alan Modra <amodra@bigpond.net.au>
2400
2401 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
2402 type rather than just assuming entries are ELF.
2403 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2404 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2405 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
2406 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
2407 rather than elf_link_hash_entry.
2408
2409 2002-04-15 Richard Henderson <rth@redhat.com>
2410
2411 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
2412 n32 binaries.
2413
2414 2002-04-15 Michael Snyder <msnyder@redhat.com>
2415
2416 * opncls.c (bfd_close): Write contents if writeable.
2417 Minor formatting tidy-ups.
2418
2419 2002-04-15 Alan Modra <amodra@bigpond.net.au>
2420
2421 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2422
2423 2002-04-12 Michael Snyder <msnyder@redhat.com>
2424
2425 * bfd-in.h (bfd_get_section_lma): New access macro.
2426 Minor white-space fix-up.
2427
2428 2002-04-12 Alan Modra <amodra@bigpond.net.au>
2429
2430 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
2431 header pad.
2432
2433 2002-04-09 DJ Delorie <dj@redhat.com>
2434
2435 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
2436
2437 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
2438
2439 * coffcode.h (coff_read_word): New.
2440 (coff_compute_checksum): New.
2441 (coff_apply_checksum): New.
2442 (coff_write_object_contents): Call coff_apply_checksum () to
2443 apply checksum to PE image.
2444
2445 2002-04-08 Randolph Chung <tausq@debian.org>
2446
2447 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
2448 (elf32_hppa_final_link): Split out sorting logic to..
2449 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
2450 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
2451
2452 2002-04-07 Andrew Cagney <ac131313@redhat.com>
2453
2454 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
2455 pattern.
2456 * configure: Re-generate.
2457
2458 2002-04-07 Andrew Cagney <ac131313@redhat.com>
2459
2460 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
2461 is greater or equal to 4.3.3.
2462 * configure: Regenerate.
2463 Fix PR gdb/344.
2464
2465 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
2466
2467 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
2468 R_CRIS_32_PCREL>: Fix typo in name.
2469 (cris_elf_check_relocs): Always create .rela.got here when
2470 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
2471 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
2472 assume it's created.
2473
2474 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
2475
2476 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
2477 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
2478 define.
2479 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
2480 * bfd.c (bfd_link_hash_table_free): Define.
2481 * binary.c (binary_bfd_link_hash_table_free): Define.
2482 * bout.c (b_out_bfd_link_hash_table_free): Define.
2483 * coff-rs6000.c (rs6000coff_vec): Include
2484 _bfd_generic_link_hash_table_free.
2485 (pmac_xcoff_vec): Likewise.
2486 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2487 (aix5coff64_vec): Likewise.
2488 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
2489 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
2490 (bfd_elf32_bfd_link_hash_table_free): Define.
2491 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
2492 (bfd_elf32_bfd_link_hash_table_free): Define.
2493 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
2494 define.
2495 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
2496 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
2497 * ieee.c (ieee_bfd_link_hash_table_free): Define.
2498 * ihex.c (ihex_bfd_link_hash_table_free): Define.
2499 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
2500 (_bfd_generic_link_hash_table_free): Add prototype.
2501 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
2502 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
2503 * linker.c (_bfd_generic_link_hash_table_free): New function.
2504 * mmo.c (mmo_bfd_link_hash_table_free): Define.
2505 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
2506 * oasys.c (oasys_bfd_link_hash_table_free): Define.
2507 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
2508 * som.c (som_bfd_link_hash_table_free): Define.
2509 * srec.c (srec_bfd_link_hash_table_free): Define.
2510 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
2511 * versados.c (versados_bfd_link_hash_table_free): Define.
2512 * vms.c (vms_bfd_link_hash_table_free): New function.
2513 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
2514
2515 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
2516 instead of bfd_alloc.
2517 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2518 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
2519 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
2520 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
2521 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2522 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2523 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
2524 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
2525 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2526 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2527 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2528 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2529 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2530 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
2531 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
2532 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2533 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2534 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2535 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
2536 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
2537 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2538 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
2539 * m68klinux.c (linux_link_hash_table_create): Likewise.
2540 * sparclinux.c (linux_link_hash_table_create): Likewise.
2541 * sunos.c (sunos_link_hash_table_create): Likewise.
2542 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2543
2544 * targets.c: Add _bfd_link_hash_table_free to xvec.
2545
2546 * bfd-in2.h: Regenerate.
2547 * libbfd.h: Regenerate.
2548 * libcoff.h: Regenerate.
2549
2550 2002-04-04 Alan Modra <amodra@bigpond.net.au>
2551
2552 * dep-in.sed: Cope with absolute paths.
2553 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
2554 Run "make dep-am".
2555 * Makefile.in: Regenerate.
2556 * coff-arm.c: Fix copyright date.
2557 * cpu-h8300.c: Likewise.
2558 * cpu-i370.c: Likewise.
2559 * cpu-s390.c: Likewise.
2560 * cpu-mips.c: Likewise.
2561 * po/SRC-POTFILES.in: Regenerate.
2562
2563 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2564
2565 * Makefile.am: Add elfxx-mips.c to the known backends.
2566 (elf32-mips.lo): remove dependency to coff/external.h.
2567 * Makefile.in: Regenerate.
2568 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
2569 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
2570 accordingly.
2571 * configure: Regenerate.
2572 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
2573 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
2574 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
2575 MIPS specific backend functions.
2576 * elf32-mips.c: Moved most code to elfxx-mips.c.
2577 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
2578 static.
2579 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
2580 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
2581 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
2582 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
2583 interface to allow selection of the right REL or RELA howto table.
2584 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
2585 static. Let it refuse n32 objects.
2586 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
2587 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
2588 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
2589 (elf32_mips_ignore_discarded_relocs): Rename from
2590 _bfd_elf32_mips_ignore_discarded_relocs.
2591 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
2592 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
2593 (elf_mips_howto_table_rela): Remove.
2594 * elf64-mips.c: Moved most code to elfxx-mips.c.
2595 (bfd_elf64_bfd_reloc_type_lookup): Make static.
2596 (mips_elf64_rtype_to_howto): New function.
2597 (mips_elf64_object_p): Likewise.
2598 (elf64_mips_irix_compat): Likewise.
2599 * elfxx-mips.c: New file containing common code merged together from
2600 elf32-mips.c and elf64-mips.c.
2601 * elfxx-mips.h: New file containing MIPS specific prototypes from
2602 elf-bfd.h.
2603 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
2604 elf_backend_mips_rtype_to_howto.
2605
2606 2002-04-04 Alan Modra <amodra@bigpond.net.au>
2607
2608 * srec.c (MAXCHUNK, Chunk): Revise comments.
2609 (srec_write_record): Correct buffer size.
2610 (srec_write_header): Do without intermediate buffer.
2611 (srec_write_section): Validate Chunk.
2612 (srec_write_terminator): Pass NULL instead of dummy buffer.
2613 (srec_write_symbols): Pass file and symbol names directly to
2614 bfd_bwrite so sprintf won't overflow buffer.
2615
2616 2002-04-03 Jakub Jelinek <jakub@redhat.com>
2617
2618 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
2619 PC relative relocs against hidden symbols.
2620 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2621
2622 2002-04-03 Alan Modra <amodra@bigpond.net.au>
2623
2624 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
2625 LMAs, loop over segments until p_vaddr and p_memsz specify an
2626 extent enclosing the section.
2627
2628 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
2629
2630 * ihex.c (ihex_write_object_contents): Do not allow records to
2631 cross a 64K boundary - wrap if necessary.
2632
2633 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
2634
2635 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
2636 which caused the returned LWP ID to always be 0.
2637
2638 2002-04-01 Richard Henderson <rth@redhat.com>
2639
2640 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2641 (elf32_sparc_relocate_section): Use it to figure out when to
2642 initialize .got entries.
2643 * elf64-sparc.c: Similarly.
2644
2645 2002-03-28 Alan Modra <amodra@bigpond.net.au>
2646
2647 * linker.c (link_action): Ignore duplicate warning syms.
2648 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
2649 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
2650 (elf_adjust_dynamic_symbol): Likewise.
2651 (elf_export_symbol): Likewise.
2652 (elf_link_find_version_dependencies): Likewise.
2653 (elf_link_assign_sym_version): Likewise.
2654 (elf_link_sec_merge_syms): Likewise.
2655 (elf_link_output_extsym): Likewise.
2656 (elf_gc_sweep_symbol): Likewise.
2657 (elf_gc_propagate_vtable_entries_used): Likewise.
2658 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2659 (elf_gc_allocate_got_offsets): Likewise.
2660 (elf_collect_hash_codes): Likewise.
2661 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
2662 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2663 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2664 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
2665 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
2666 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
2667 (elf_cris_discard_excess_dso_dynamics): Likewise.
2668 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
2669 (mark_PIC_calls): Likewise.
2670 (allocate_plt_static): Likewise.
2671 (allocate_dynrelocs): Likewise.
2672 (readonly_dynrelocs): Likewise.
2673 * elf32-i386.c (allocate_dynrelocs): Likewise.
2674 (readonly_dynrelocs): Likewise.
2675 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2676 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2677 * elf32-mips.c (mips_elf_output_extsym): Likewise.
2678 (mips_elf_sort_hash_table_f): Likewise.
2679 (mips_elf_check_mips16_stubs): Likewise.
2680 * elf32-s390.c (allocate_dynrelocs): Likewise.
2681 (readonly_dynrelocs): Likewise.
2682 * elf32-sh.c (sh_elf_discard_copies): Likewise.
2683 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2684 (xstormy16_relax_plt_realloc): Likewise.
2685 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
2686 (elf64_alpha_output_extsym): Likewise.
2687 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
2688 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
2689 (mips_elf64_check_mips16_stubs): Likewise.
2690 (mips_elf64_output_extsym): Likewise.
2691 * elf64-ppc.c (func_desc_adjust): Likewise.
2692 (allocate_dynrelocs): Likewise.
2693 (readonly_dynrelocs): Likewise.
2694 * elf64-s390.c (allocate_dynrelocs): Likewise.
2695 (readonly_dynrelocs): Likewise.
2696 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2697 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2698 (readonly_dynrelocs): Likewise.
2699 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
2700 * aoutx.h (aout_link_write_other_symbol): Likewise.
2701 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
2702 (_bfd_coff_write_global_sym): Likewise.
2703 * i386linux.c (linux_tally_symbols): Likewise.
2704 * m68klinux.c (linux_tally_symbols): Likewise.
2705 * sparclinux.c (linux_tally_symbols): Likewise.
2706 * pdp11.c (aout_link_write_other_symbol): Likewise.
2707 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2708 * xcofflink.c (xcoff_build_ldsyms): Likewise.
2709 (xcoff_write_global_symbol): Likewise.
2710
2711 * cofflink.c (_bfd_coff_final_link): Formatting.
2712 * cpu-mips.c (mips_compatible): Make static, prototype.
2713 * elf32-i386.c (elf_i386_check_relocs): Formatting.
2714 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
2715 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
2716 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
2717 (mips_elf64_final_link): Likewise.
2718 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
2719 prototype.
2720
2721 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
2722
2723 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
2724 (SWAP_OUT_RELOC_OFFSET): Define.
2725
2726 2002-03-27 Gregory Steuck <greg@nest.cx>
2727
2728 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
2729 terminating NULL if empty symbol table.
2730 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
2731
2732 2002-03-26 H.J. Lu (hjl@gnu.org)
2733
2734 * elflink.h (elf_link_input_bfd): Revert the last change since
2735 the gcc exception handling isn't fixed yet.
2736
2737 2002-03-26 H.J. Lu (hjl@gnu.org)
2738
2739 * elflink.h (elf_link_input_bfd): Complain about relocations
2740 against local symbols in discarded sections.
2741
2742 2002-03-26 Alan Modra <amodra@bigpond.net.au>
2743
2744 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
2745
2746 2002-03-23 Alan Modra <amodra@bigpond.net.au>
2747
2748 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2749 section file offset for !SEC_LOAD sections.
2750
2751 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
2752
2753 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
2754 <case R_ARM_GOT>): Handle relocations to Thumb functions.
2755
2756 2002-03-21 Alan Modra <amodra@bigpond.net.au>
2757
2758 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
2759 Whitespace changes.
2760 * archive.c: Update copyright date.
2761 * bfd-in2.h: Regenerate.
2762 * libbfd.h: Regenerate.
2763 * Makefile.am: Run "make dep-am"
2764 * Makefile.in: Regenerate.
2765 * po/SRC-POTFILES.in: Regenerate.
2766
2767 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
2768
2769 * dwarf2.c (struct funcinfo): Move up.
2770 (lookup_address_in_function_table): New argument function_ptr.
2771 Set it.
2772 (lookup_address_in_line_table): New argument function. If function
2773 is non-NULL, use it to handle ``addr'' before the first line note of
2774 the function.
2775 (comp_unit_find_nearest_line): Update and swap calls to
2776 lookup_address_in_function_table and lookup_address_in_line_table.
2777 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
2778 N_SLINE encountered if we see an N_FUN before any N_SLINE.
2779
2780 2002-03-20 Tom Rix <trix@redhat.com>
2781
2782 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
2783 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
2784 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
2785
2786 2002-03-19 Tom Rix <trix@redhat.com>
2787
2788 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
2789 dynamic objects in archives.
2790
2791 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
2792
2793 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
2794 STT_NOTYPE symbols to STT_OBJECT.
2795
2796 2002-03-18 Jan Hubicka <jh@suse.cz>
2797
2798 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
2799
2800 2002-03-18 Tom Rix <trix@redhat.com>
2801
2802 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
2803 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
2804 * coff-rs6000 (do_pad) : New function for archive padding.
2805 (do_copy) : New function for object file copying in archives.
2806 (do_shared_object_padding) : New function for padding shared
2807 objects to their text section alignment in archives.
2808 (bfd_xcoff_ar_achive_set_magic) : Stub.
2809 (xcoff_write_armap_big) : Use do_copy and do_pad.
2810 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
2811 do_copy and do_pad.
2812 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
2813 bfd_xcoff_magic_number.
2814 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
2815 fop.
2816 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
2817 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
2818 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
2819 * rs6000-core.c : Update copyright date.
2820 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
2821 csectpp.
2822 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
2823 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
2824 (coff_set_flags) : Use bfd_xcoff_magic_number.
2825 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
2826 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
2827 * Makefile.am : Same.
2828 * config.bfd : Same.
2829 * targets.c : Same.
2830 * configure : Regnerate.
2831 * Makefile.in : Same.
2832 * bfd-in2.h : Same.
2833
2834 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
2835
2836 * po/fr.po: Updated version.
2837
2838 2002-03-18 Alan Modra <amodra@bigpond.net.au>
2839
2840 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2841 * libbfd.h: Regenerate.
2842 * archive.c (coff_write_armap): Pass on failures from
2843 bfd_write_bigendian_4byte_int.
2844
2845 2002-03-14 H.J. Lu <hjl@gnu.org>
2846
2847 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2848 error to bfd_error_nonrepresentable_section for reinit_array
2849 section in DSO.
2850
2851 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2852
2853 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2854 OR it in rather than replacing previously selected flags.
2855
2856 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2857 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2858
2859 2002-03-14 Alan Modra <amodra@bigpond.net.au>
2860
2861 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
2862 (N): Use the above.
2863 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
2864 ensure reloc size matches before calling elf_link_input_bfd.
2865 Add an assert to check reloc size when counting output relocs.
2866
2867 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2868
2869 * mmo.c (mmo_get_loc): Return NULL rather than false.
2870
2871 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
2872
2873 * po/fr.po: Updated version.
2874
2875 2002-03-13 Alan Modra <amodra@bigpond.net.au>
2876
2877 * archures.c (bfd_default_compatible): Test bits_per_word.
2878 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
2879 bfd_default_compatible.
2880 * cpu-i370.c (i370_compatible): Likewise.
2881 * cpu-sparc.c (sparc_compatible): Likewise.
2882 * cpu-h8300.c (compatible): Test in->arch == out->arch.
2883
2884 * elflink.h: Formatting fixes.
2885 (elf_link_output_extsym): Merge undefined and undef weak cases.
2886
2887 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2888 when word size of input matches output word size.
2889
2890 2002-03-12 Andreas Jaeger <aj@suse.de>
2891
2892 * cpu-i386.c (i386_compatible): New. Use it instead of
2893 bfd_default_compatible.
2894
2895 2002-03-07 H.J. Lu (hjl@gnu.org)
2896
2897 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2898 as the type for bfd_reloc_val.
2899
2900 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
2901
2902 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2903 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2904 (elf_hppa_final_link_relocate): Correct relocations for indirect
2905 references to local data through the DLT. Fix .opd creation for
2906 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2907 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
2908 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2909 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2910 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2911 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2912 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2913
2914 2002-03-05 Jakub Jelinek <jakub@redhat.com>
2915
2916 * merge.c (_bfd_merge_sections): Don't segfault if there
2917 is nothing to merge due to GC.
2918
2919 2002-03-05 Alan Modra <amodra@bigpond.net.au>
2920
2921 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2922 symbols that have been forced local.
2923
2924 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2925 to output forced local syms for non-shared link.
2926 (elf_link_output_extsym): Tweak condition for calling backend
2927 adjust_dynamic_symbol so that previous behaviour is kept.
2928 Whitespace changes throughout file.
2929
2930 2002-03-04 H.J. Lu <hjl@gnu.org>
2931
2932 * elf.c (bfd_section_from_shdr): Handle special sections,
2933 .init_array, .fini_array and .preinit_array.
2934 (elf_fake_sections): Likewise.
2935
2936 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2937 DT entry only if the section is in output for .init_array,
2938 .fini_array and .preinit_array. Complain about .preinit_array
2939 section in DSO.
2940 (elf_bfd_final_link): Warn zero size for .init_array,
2941 .fini_array and .preinit_array sections.
2942
2943 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2944 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2945 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2946 .preinit_array.
2947
2948 2002-03-04 Alan Modra <amodra@bigpond.net.au>
2949
2950 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2951 * configure: Regenerate.
2952
2953 2002-03-02 Tom Rix <trix@redhat.com>
2954
2955 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2956 symbolic equiv.
2957 * coff-rs6000.c (xcoff_howto_table): Same.
2958
2959 2002-03-01 David Mosberger <davidm@hpl.hp.com>
2960
2961 * elflink.h (size_dynamic_sections): If section named
2962 ".preinit_array" exists, create DT_PREINIT_ARRAY and
2963 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
2964 ".init_array" and ".fini_array".
2965 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2966 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2967 DT_FINI_ARRAY.
2968
2969 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
2970
2971 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2972 dynsyms.
2973
2974 2002-02-25 Alan Modra <amodra@bigpond.net.au>
2975
2976 * elf64-hppa.h: Update copyright date.
2977
2978 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2979 (ppc64_elf_relocate_section): Don't generate power4 style branch
2980 hints for *_BRTAKEN and *_BRNTAKEN relocs.
2981
2982 2002-02-22 Jakub Jelinek <jakub@redhat.com>
2983
2984 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2985 last patch.
2986 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2987
2988 2002-02-21 Andreas Jaeger <aj@suse.de>
2989
2990 * elf64-x86-64.c: Major rework that introduces all recent changes
2991 to the x86-64 backend. Get a closer match to elf32-i386.
2992 (struct elf64_x86_64_dyn_relocs): Rename from
2993 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
2994 all users.
2995 (struct elf64_x86_64_link_hash_table): Add short cuts to some
2996 sections.
2997 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2998 remove casts, initialize new hash members.
2999 (create_got_section): New.
3000 (elf64_x86_64_create_dynamic_sections): New.
3001 (elf64_x86_64_copy_indirect_symbol): New.
3002 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3003 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3004 Reference count possible .plt and .got entries. Don't test input
3005 section SEC_READONLY here to try to avoid copy relocs, and keep
3006 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3007 DF_TEXTREL here. Delay setting of variables until needed. Cache
3008 pointer to "sreloc" section in elf_section_data. Tweak condition
3009 under which .got created. Report files with bad relocation
3010 section names.
3011 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
3012 Reference count possible .plt entries. Don't deallocate .got and
3013 .relgot space here.
3014 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
3015 do copy reloc processing for weakdefs. Remove redundant casts and
3016 aborts. Delay setting of vars until needed. Move creation of
3017 dynamic symbols and allocation of .plt and .rela.plt to
3018 allocate_dynrelocs. Replace BFD_ASSERT with abort.
3019 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3020 (allocate_dynrelocs): New.
3021 (readonly_dynrelocs): New.
3022 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
3023 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
3024 Zero out the dynamic allocated content space.
3025 (elf64_x86_64_discard_copies): Removed.
3026 (elf64_x86_64_relocate_section): Make use of dynamic section
3027 short-cuts. Localise vars, and delay setting. Better error
3028 reporting, replace BFD_ASSERT with abort. Check
3029 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3030 regular object file and tread the weak definition as the normal
3031 one. Don't discard relocs for undefweak or undefined symbols and
3032 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3033 relocs.
3034 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3035 symbols that have been forced local. Use same test to decide if
3036 we can use a relative reloc for got as relocate_section. Expand
3037 SHN_UNDEF comment. Move expressions out of function calls.
3038 Replace BFD_ASSERT with abort.
3039 (bfd_elf64_bfd_final_link): Removed.
3040 (elf_backend_copy_indirect_symbol): Define.
3041
3042 2002-02-20 Tom Rix <trix@redhat.com>
3043
3044 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3045 (_bfd_xcoff_reloc_type_lookup): Use it.
3046 * coff64-rs6000.c (xcoff64_howto_table): Same.
3047 (xcoff64_reloc_type_lookup): Same.
3048
3049 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
3050
3051 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
3052 little endian.
3053
3054 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
3055
3056 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3057 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3058 * bfd-in2.h: Regenerate.
3059 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3060 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3061 with "s390:64-bit".
3062 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3063 (elf_s390_reloc_type_lookup): Likewise.
3064 (elf_s390_check_relocs): Likewise.
3065 (elf_s390_gc_sweep_hook): Likewise.
3066 (elf_s390_relocate_section): Likewise.
3067 (elf_s390_object_p): Use renamed architecture define.
3068 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3069
3070 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
3071
3072 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
3073
3074 2002-02-19 Jakub Jelinek <jakub@redhat.com>
3075
3076 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3077 absptr -> pcrel optimization for shared libs.
3078 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3079 library cannot be converted to pcrel.
3080 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3081 relative.
3082 * elf32-i386.c (elf_i386_relocate_section): If
3083 _bfd_elf_section_offset returned -2, skip, but make sure the
3084 relocation is installed.
3085 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3086 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3087 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3088 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3089 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3090 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3091 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3092 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3093 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3094 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3095 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3096 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3097 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3098 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3099 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3100 _bfd_elf_section_offset returning -2 the same way as -1.
3101 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3102 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3103 and BFD_ASSERT.
3104 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3105
3106 2002-02-18 Tom Rix <trix@redhat.com>
3107
3108 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3109 (bfd_xcoff_size_dynamic_sections): Same.
3110 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3111 (bfd_xcoff_size_dynamic_sections): Same.
3112 * coff-rs6000.c (xcoff_generate_rtinit): Same.
3113 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3114 * libxcoff.h (struct xcoff_backend_data_rec): Same.
3115 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3116 * bfd-in2.h: Regenerate.
3117
3118 2002-02-18 Alan Modra <amodra@bigpond.net.au>
3119
3120 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3121 (struct ppc_link_hash_table): Add sfpr.
3122 (ppc64_elf_link_hash_table_create): Init it.
3123 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3124 .glink out to..
3125 (create_linkage_sections): ..here. Make .sfpr too.
3126 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3127 dynobj early.
3128 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3129 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3130 ._restf* functions, and create as needed.
3131 (func_desc_adjust): Only force_local for shared libs.
3132
3133 2002-02-18 David O'Brien <obrien@FreeBSD.org>
3134
3135 * configure.in: Bump version number post 2.12 branching.
3136 * configure: Regenerate.
3137
3138 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
3139
3140 * mmo.c: Correct and improve comments.
3141 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3142 zero-pad. Use input to fill up non-empty bfd buffer.
3143 (mmo_flush_chunk): New function.
3144 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3145 changed. Don't emit location specifier if VMA is same as
3146 *LAST_VMAP after omitting leading zero contents. Call
3147 mmo_flush_chunk before emitting location specifier.
3148 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3149 with mmo_write_loc_chunk calls.
3150 (mmo_internal_write_section): Call mmo_flush_chunk after
3151 mmo_write_chunk.
3152 (mmo_write_symbols_and_terminator): Move :Main to first position
3153 in symbol array. Add faked one if it does not exist if there are
3154 other symbols. Don't add it if there are no symbols at all. Move
3155 out test for value of :Main from symbol loop. Rename table
3156 fakemain to maintable and variable mainsym to fakemain.
3157
3158 2002-02-15 Richard Henderson <rth@redhat.com>
3159
3160 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3161 section with no got matches any got. Simplify error generaion.
3162
3163 2002-02-15 Alan Modra <amodra@bigpond.net.au>
3164
3165 Support arbitrary length fill patterns.
3166 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
3167 (_bfd_default_link_order): Remove bfd_fill_link_order code.
3168 Call default_data_link_order.
3169 (default_fill_link_order): Delete.
3170 (default_data_link_order): New function.
3171 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
3172 of bfd_fill_link_order with bfd_data_link_order.
3173 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
3174 * elf64-mips.c (mips_elf64_final_link): Likewise.
3175
3176 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
3177 Correct value returned in "end" for "0x<non-hex>".
3178
3179 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
3180
3181 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
3182 (scan): Test against 'mach' field in info structure.
3183
3184 2002-02-14 Alan Modra <amodra@bigpond.net.au>
3185
3186 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
3187
3188 2002-02-14 Matt Fredette <fredette@netbsd.org>
3189
3190 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
3191 EF_M68000.
3192
3193 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
3194
3195 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
3196 non-zero physical addresses when adjusting the LMAs of new
3197 sections.
3198
3199 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
3200
3201 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
3202 from _bfd_elf_hppa_gen_reloc_type.
3203 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
3204 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
3205 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
3206 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
3207
3208 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
3209
3210 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
3211 loading its contents if there's nothing to do in it.
3212
3213 2002-02-12 Alan Modra <amodra@bigpond.net.au>
3214
3215 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
3216 64k boundary.
3217
3218 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
3219 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
3220 (ppc64_elf_finish_dynamic_sections): Set values for them.
3221
3222 2002-02-11 Michael Snyder <msnyder@redhat.com>
3223
3224 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
3225 * elf.c (elfcore_grok_pstatus): Add prototype.
3226 (elfcore_grok_lwpstatus): Add prototype.
3227 (elfcore_write_lwpstatus): New function.
3228 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
3229
3230 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
3231
3232 * elf32-sh.c: Added missing prototypes.
3233 * elf32-sh64.c: Likewise.
3234 (sh_elf_align_loads): Mark unused args as such.
3235 * elf64-sh64.c: Added missing prototypes.
3236 (struct elf_sh64_link_hash_entry): Fix typo.
3237 (sh_elf64_relocate_section): Fix info argument passed to
3238 _bfd_elf_section_offset.
3239
3240 2002-02-11 Alan Modra <amodra@bigpond.net.au>
3241
3242 * Makefile.am: "make dep-am".
3243 * Makefile.in: Regenerate.
3244 * aclocal.m4: Regenerate.
3245 * config.in: Regenerate.
3246 * configure: Regenerate.
3247
3248 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
3249
3250 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
3251 variable warnings.
3252 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
3253 comparison warning.
3254 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
3255 cast warnings for the common case.
3256
3257 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
3258
3259 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
3260 vectors.
3261 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
3262 vectors.
3263
3264 2002-02-09 Richard Henderson <rth@redhat.com>
3265
3266 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
3267 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
3268 (elf64_alpha_relocate_section): Likewise.
3269 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
3270 * bfd-in2.h, libbfd.h: Rebuild.
3271
3272 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
3273
3274 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
3275 that base-plus-offset reloc accounting is consistent.
3276 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
3277 up to date for undefined symbols.
3278
3279 2002-02-08 Eric Christopher <echristo@redhat.com>
3280
3281 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3282
3283 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
3284 sections for the O32 ABI.
3285
3286 2002-02-08 Chris Demetriou <cgd@broadcom.com>
3287
3288 * elf32-arm.h: Fix formatting of _("...").
3289 * elf32-d10v.c: Likewise.
3290 * elf32-m68k.c: Likewise.
3291 * elf32-mips.c: Likewise.
3292
3293 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
3294
3295 * coff-or32.c: Fix compile time warning messages.
3296
3297 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
3298
3299 Contribute sh64-elf.
3300 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
3301 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
3302 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
3303 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
3304 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
3305 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
3306 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
3307 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
3308 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
3309 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
3310 New relocs.
3311 * libbfd.h, bfd-in2.h: Rebuilt.
3312 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
3313 (sh_reloc_map): Map them.
3314 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3315 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
3316 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
3317 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3318 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
3319 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
3320 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
3321 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
3322 datalabel_got_offset.
3323 (sh_elf_link_hash_newfunc): Initialize it.
3324 (sh_elf_relocate_section): Augment the scope of
3325 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
3326 GOT and GOTOFF handling to new SHmedia relocation types. Support
3327 GOT_BIAS.
3328 (sh_elf_check_relocs): Likewise.
3329 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
3330 PLT entries using movi_shori_putval. Support GOT_BIAS.
3331 (sh_elf_finish_dynamic_sections): Likewise.
3332 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
3333 relocation, it's now done by the caller.
3334 (GOT_BIAS): New.
3335 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
3336 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
3337 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
3338 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
3339 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
3340 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
3341 sh64_elf64_hash_table): New.
3342 (sh_elf64_howto_table): Introduce new relocs.
3343 (sh_elf64_info_to_howto): Accept new PIC relocs.
3344 (sh_elf64_relocate_section): Augment the scope of
3345 seen_stt_datalabel. Support new PIC relocs.
3346 (sh_elf64_check_relocs): Support new PIC relocs.
3347 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
3348 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
3349 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
3350 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
3351 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
3352 movi_shori_putval, movi_3shori_putval,
3353 sh64_elf64_create_dynamic_sections,
3354 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
3355 sh64_elf64_size_dynamic_sections,
3356 sh64_elf64_finish_dynamic_symbol,
3357 sh64_elf64_finish_dynamic_sections): New.
3358 (elf_backend_create_dynamic-sections,
3359 bfd_elf64_bfd_link_hash_table_create,
3360 elf_backend_adjust_dynamic_symbol,
3361 elf_backend_size_dynamic_sections,
3362 elf_backend_finish_dynamic_symbol,
3363 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3364 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3365 elf_backend_got_header_size, elf_backend_plt_header_size):
3366 Define.
3367 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
3368 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
3369 match official numbers and names; moved unmaching ones to the
3370 range 0xf2-0xff.
3371 * elf32-sh64.c, elf64-sh64.c: Likewise.
3372 2001-03-12 DJ Delorie <dj@redhat.com>
3373 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
3374 sections.
3375 2001-03-12 DJ Delorie <dj@redhat.com>
3376 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
3377 be aligned.
3378 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
3379 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
3380 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
3381 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
3382 .cranges section with SEC_SORT_ENTRIES set.
3383 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
3384 incoming sorted .cranges section.
3385 (sh64_bfd_elf_copy_private_section_data): New.
3386 (sh64_elf_final_write_processing): Only sort .cranges and modify
3387 start address if called by linker.
3388 2001-01-08 Ben Elliston <bje@redhat.com>
3389 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
3390 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
3391 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
3392 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3393 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
3394 line. Add comments before all entries.
3395 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
3396 comment.
3397 (sh_elf64_reloc): Correct head comment.
3398 (sh_elf64_relocate_section): Correct spacing.
3399 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
3400 instead call reloc_dangerous callback.
3401 <case R_SH_SHMEDIA_CODE>: New case.
3402 (sh_elf64_gc_mark_hook): Correct spacing.
3403 (sh_elf64_check_relocs): Ditto.
3404 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
3405 New case.
3406 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
3407 functions.
3408 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
3409 clarify describing comment. Add comments before all entries.
3410 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
3411 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
3412 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3413 Sort .cranges section in final link. Prepare to set bit 0 on
3414 entry address.
3415 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
3416 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
3417 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
3418 .cranges section.
3419 (sh64_backend_section_from_shdr): New, to recognize
3420 SHT_SH5_CR_SORTED on incoming .cranges section.
3421 (elf_backend_section_from_shdr): Define.
3422 (sh64_elf_final_write_processing): Sort outgoing .cranges
3423 section. (New, temporarily disabled:) Set bit 0 on entry address
3424 according to ISA type.
3425 (sh64_find_section_for_address): New.
3426 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
3427 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
3428 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
3429 bfd_malloc, not xmalloc.
3430 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
3431 global.
3432 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
3433 temporarily disabled) setting bit 0 on entry address.
3434 (elf_backend_final_write_processing): Define.
3435 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
3436 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
3437 be a proper relocation for PTA and PTB rather than a marker.
3438 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
3439 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
3440 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
3441 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
3442 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
3443 Zero src_mask.
3444 * elf64-sh64.c: Ditto.
3445 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
3446 * elf32-sh64.c: Include opcodes/sh64-opc.h
3447 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
3448 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
3449 parameters. No unused parameters. Caller changed.
3450 <case R_SH_PT_16>: New case.
3451 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
3452 * Makefile.in: Regenerate.
3453 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
3454 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
3455 all code sections.
3456 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3457 (sh64_elf_merge_private_data): Ditto.
3458 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
3459 to access stored section flags.
3460 (sh64_elf_final_write_processing): Return immediately unless
3461 called by linker. Use sh64_elf_section_data (cranges) to get size
3462 of linker-generated cranges entries.
3463 (sh64_elf_copy_private_data): Add missing "return true".
3464 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3465 (sh_elf64_merge_private_data): Ditto.
3466 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
3467 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
3468 elf64-sh64.c:sh64_elf_fake_sections.
3469 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
3470 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
3471 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
3472 (sh64_elf_final_write_processing): New.
3473 (elf_backend_final_write_processing): Define.
3474 (sh64_elf_fake_sections): Get header flags from tdata field.
3475 (sh64_elf_copy_private_data): Do not call
3476 sh64_elf_copy_private_data_internal, just copy e_flags field.
3477 (sh64_elf_merge_private_data): Do not call
3478 sh64_elf_copy_private_data_internal.
3479 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
3480 Remove EF_SH64_ABI64, let ELF size make difference.
3481 Remove SH64-specific BFD section flag.
3482 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
3483 containing SHmedia through elf_section_data (asect)->tdata
3484 non-zero, not using a BFD section flag.
3485 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
3486 (sh64_elf_merge_private_data): Similar.
3487 (elf_backend_section_flags): Don't define.
3488 (sh64_elf_backend_section_flags): Delete.
3489 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
3490 not EF_SH64_ABI64.
3491 (sh_elf64_merge_private_data): Similar.
3492 * section.c (Section flags definitions): Don't define
3493 SEC_SH_ISA_SHMEDIA.
3494 (bfd-in2.h): Regenerate.
3495 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
3496 Make DataLabel references work with partial linking.
3497 * elf32-sh64.c: Fix formatting.
3498 (sh64_elf_link_output_symbol_hook): New.
3499 (elf_backend_link_output_symbol_hook): Define to
3500 sh64_elf_link_output_symbol_hook.
3501 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
3502 undefined if partial linking. Adjust sanity check.
3503 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
3504 (elf_backend_link_output_symbol_hook): Define to
3505 sh64_elf64_link_output_symbol_hook.
3506 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
3507 undefined if partial linking. Adjust sanity check.
3508 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
3509 Implement semantics for inter-file DataLabel references.
3510 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
3511 (sh64_elf64_add_symbol_hook): New.
3512 (sh_elf64_relocate_section): If passing an indirect symbol with
3513 st_type STT_DATALABEL on the way to a symbol with st_other
3514 STO_SH5_ISA32, do not bitor 1 to the relocation.
3515 (elf_backend_add_symbol_hook): Define to
3516 sh64_elf64_add_symbol_hook.
3517 * elf64-sh32.c: Tweak comments.
3518 (DATALABEL_SUFFIX): Define.
3519 (sh64_elf_add_symbol_hook): New.
3520 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
3521 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
3522 symbol with st_type STT_DATALABEL on the way to a symbol with
3523 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
3524 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
3525 Pass through STT_DATALABEL.
3526 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
3527 (elf_backend_get_symbol_type): Define.
3528 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
3529 (elf_backend_get_symbol_type): Define.
3530 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
3531 * elf32-sh64.c: Tweak comments.
3532 (sh64_elf_copy_private_data_internal): Add prototype.
3533 (bfd_elf32_bfd_set_private_flags): Define.
3534 (sh64_elf_copy_private_data_internal): Compare machine name, not
3535 textual BFD target name, to check whether to copy section flag
3536 SHF_SH5_ISA32.
3537 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
3538 Tweak section-contents-type-mismatch message.
3539 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
3540 Validize reloc-types.
3541 * elf64-sh64.c: New file.
3542 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
3543 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
3544 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
3545 Regenerate dependencies.
3546 * Makefile.in: Regenerate.
3547 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
3548 bfd_elf64_sh64l_vec.
3549 * configure.in: Handle bfd_elf64_sh64_vec and
3550 bfd_elf64_sh64l_vec.
3551 * configure: Regenerate.
3552 * po/POTFILES.in: Regenerate.
3553 * po/bfd.pot: Regenerate.
3554 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
3555 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
3556 anything else but EF_SH64 and EF_SH64_ABI64.
3557 (sh64_elf_merge_private_data): Emit error for anything else but
3558 EF_SH64 and EF_SH64_ABI64.
3559 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
3560 from targ_selvecs.
3561 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
3562 bfd_elf32_sh64l_vec as a temporary measure.
3563 * configure: Regenerate.
3564 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
3565 * cpu-sh.c (arch_info_struct): Include sh5 item
3566 unconditionalized.
3567 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
3568 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
3569 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
3570 * elf32-sh64.c: Tweak comments.
3571 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
3572 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
3573 (sh64_elf_copy_private_data_internal): Wrap long line.
3574 (sh64_elf_merge_private_data): Rewrite to allow objects from
3575 SH64 subsets to be linked together.
3576 (INCLUDE_SHMEDIA): Define.
3577 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
3578 Parenthesize plus-expression inside or-expression.
3579 <global symbol>: Ditto.
3580 (sh_elf_set_mach_from_flags): Remove code refusing
3581 deleted EF_SH64_32BIT_ABI flag.
3582 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
3583 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
3584 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
3585 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
3586 (sh_elf_relocate_section) <local symbol>: Or 1 in
3587 calculation of relocation if sym->st_other & STO_SH5_ISA32.
3588 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
3589 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
3590 relocation.
3591 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
3592 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
3593 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
3594 Regenerate dependencies.
3595 * Makefile.in: Regenerate.
3596 * archures.c: Add bfd_mach_sh5.
3597 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
3598 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
3599 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
3600 * configure: Regenerate.
3601 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
3602 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
3603 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
3604 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
3605 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
3606 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
3607 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
3608 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
3609 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
3610 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
3611 in item for SH5.
3612 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
3613 for SHmedia relocs.
3614 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
3615 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
3616 shmedia_prepare_reloc, goto final_link_relocate if it returns
3617 non-zero, else fail as before.
3618 (sh_elf_set_mach_from_flags): Provide function only if not defined
3619 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
3620 (sh_elf_set_private_flags): Provide function only if not defined
3621 as a macro.
3622 (sh_elf_copy_private_data): Similar.
3623 (sh_elf_merge_private_data): Similar.
3624 * section.c (SEC_SH_ISA_SHMEDIA): New.
3625 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
3626 * elf32-sh64.c: New file.
3627 * libbfd.h: Regenerate.
3628 * bfd-in2.h: Regenerate.
3629 * po/POTFILES.in: Regenerate.
3630 * po/bfd.pot: Regenerate.
3631 * bfd-in2.h: Regenerate.
3632 * libbfd.h: Regenerate.
3633
3634 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
3635
3636 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
3637 been included, not drag it in.
3638 * bfd-in2.h: Regenerate.
3639
3640 2002-02-06 H.J. Lu (hjl@gnu.org)
3641
3642 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
3643 the mach and ISA fields if necessary.
3644
3645 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
3646
3647 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
3648 ARM architecture when an F_ARM_5 flag is detected, since we cannot
3649 be sure exactly which architecture this represents.
3650
3651 2002-02-05 Nick Clifton <nickc@redhat.com>
3652
3653 * po/tr.po: Updated translation.
3654
3655 2002-02-05 Alan Modra <amodra@bigpond.net.au>
3656
3657 From Jimi X <jimix@watson.ibm.com>
3658 * archures (bfd_mach_ppc64): Define.
3659 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
3660 (bfd_powerpc_arch): Define.
3661 * bfd-in2.h: Regenerate.
3662 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
3663 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
3664 (bfd_powerpc_archs): Add default powerpc64 arch.
3665
3666 2002-02-05 Alan Modra <amodra@bigpond.net.au>
3667
3668 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
3669 against section syms in readonly sections. Don't do the global
3670 sym check if we find one.
3671 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
3672 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
3673 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3674 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
3675 (elf_s390_grok_prstatus): Add missing prototype.
3676
3677 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
3678
3679 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3680 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3681 Call bfd_get_section_by_name only once. Initialize
3682 bpodata->n_bpo_relocs_this_section.
3683 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3684 referring to DSOs.
3685 (bpo_reloc_request_sort_fn): Don't use difference of values as
3686 return-value.
3687
3688 2002-02-02 David O'Brien <obrien@FreeBSD>
3689
3690 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
3691 version 4.5 and later the same as 5-CURRENT.
3692 * configure: Re-generate.
3693
3694 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
3695
3696 * config.bfd (hppa*-*-netbsd*): New target.
3697
3698 2002-01-31 Philipp Thomas <pthomas@suse.de>
3699
3700 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
3701 to front of message. Unify messages with elf32-arm.h. Use
3702 commas where neccessary.
3703 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
3704 ERROR in messages. Unify messages with coff-arm.c. Correct
3705 VFP/FPA error message.
3706 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
3707 APCS-32 for translation.
3708
3709 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
3710
3711 Perform on-demand global register allocation from
3712 R_MMIX_BASE_PLUS_OFFSET relocs.
3713 * elf64-mmix.c (struct bpo_reloc_section_info, struct
3714 bpo_reloc_request, struct bpo_greg_section_info): New.
3715 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
3716 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
3717 _bfd_mmix_check_all_relocs,
3718 _bfd_mmix_prepare_linker_allocated_gregs,
3719 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
3720 (elf_mmix_howto_table): Correct src_mask for most relocs.
3721 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
3722 case.
3723 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
3724 case. Fix typo in comment. New label do_mmix_reloc.
3725 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
3726 store first object file with a base-plus-offset reloc. Call
3727 mmix_elf_check_common_relocs for the part common with mmo.
3728 (mmix_elf_final_link): Write out linker-allocated register
3729 contents section.
3730 (elf_backend_gc_sweep_hook): Define.
3731 (bfd_elf64_bfd_relax_section): Define.
3732
3733 * mmo.c: Don't include <ctype.h>
3734 (mmo_init): Correct init-once logic.
3735
3736 2002-02-01 Tom Rix <trix@redhat.com>
3737
3738 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
3739
3740 2002-02-01 Alan Modra <amodra@bigpond.net.au>
3741
3742 * Makefile.am: Run "make dep-am"
3743 * Makefile.in: Regenerate.
3744
3745 2002-01-31 David O'Brien <obrien@FreeBSD>
3746
3747 * configure.in: Recognize the differences in core files from FreeBSD
3748 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
3749 5-CURRENT.
3750 * configure: Regenerate.
3751
3752 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
3753
3754 * coff-or32.c: New file.
3755 * cpu-or32.c: New file.
3756 * elf32-or32.c: New file.
3757 * archures.c: Add support for or32.
3758 * targets.c: Add support for or32.
3759 * bfd-in2.h: Regenerate.
3760 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3761 coff_write_object_contents): Add support for or32.
3762 * config.bfd: Add target.
3763 * configure.in: Add support for or32.
3764 * configure: Regenerate.
3765 * Makefile.am: Add support for or32.
3766 * Makefile.in: Regenerate.
3767 * po/SRC-POTFILES.in: Add or32 files.
3768 * po/bfd.pot: Regenerate.
3769
3770 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
3771 Don Lindsay <lindsayd@cisco.com>
3772
3773 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
3774 false' with a return of a bfd_reloc_ error code.
3775
3776 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
3777
3778 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3779 unexport unreferenced symbols when --export-dynamic. Call
3780 _bfd_elf_strtab_delref when unexporting.
3781
3782 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
3783
3784 * bfd-in.h: Include <stdbool.h> if it is available.
3785 * bfd-in2.h: Regenerated.
3786
3787 2002-01-31 Alan Modra <amodra@bigpond.net.au>
3788
3789 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
3790 not go via the plt.
3791
3792 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3793
3794 * archures.c: Tidy up formatting of embedded comments.
3795 * bfd.c: Tidy up formatting of embedded comments.
3796 * bfd-in.h: Fix formatting of comments.
3797 * reloc.c: Tidy up formatting of ordinary & embedded comments.
3798 * section.c: Tidy up formatting of embedded comments.
3799 * syms.c: Tidy up formatting of embedded comments.
3800 * targets.c: Tidy up formatting of embedded comments.
3801
3802 * bfd-in2.h: Regenerate.
3803
3804 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3805
3806 * vms-tir.c (cmd_name): New function.
3807 (tir_cmd_name): New function.
3808 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
3809 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
3810 Fix formatting.
3811
3812 * peXXigen.c (pe_print_idata): Rearrange message to aid in
3813 translation.
3814 (pe_print_pdata): Rearrange message to aid in translation.
3815
3816 * libbfd.c (warn_deprecated): Rearrange error message to aid in
3817 translation.
3818
3819 * ihex.c (ihex_write_object_contents): Fix spelling typo.
3820
3821 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
3822
3823 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
3824 message to aid in translation.
3825
3826 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
3827 to aid in translation.
3828
3829 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
3830
3831 2002-01-30 Philipp Thomas <pthomas@suse.de>
3832
3833 * coff-arm.c, elf32-elf.h: Unify messages.
3834
3835 2002-01-30 Nick Clifton <nickc@redhat.com>
3836
3837 * po/sv.po: Updated translation.
3838
3839 2002-01-30 Philipp Thomas <pthomas@suse.de>
3840
3841 * dwarf2.c (read_abbrev): Use full section name in error message.
3842 (decode_line_info): Likewise.
3843
3844 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3845 message.
3846
3847 2002-01-30 Alan Modra <amodra@bigpond.net.au>
3848
3849 * elf64-ppc.c (func_desc_adjust): Only provide missing function
3850 descriptor symbols for undefined function code syms. Clear
3851 ELF_LINK_NON_ELF so that they can stay weak.
3852
3853 2002-01-29 Chris Demetriou <cgd@broadcom.com>
3854 Mitch Lichtenberg <mpl@broadcom.com>
3855
3856 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3857 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3858 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3859 generation.
3860 * bfd-in2.h: Regenerate.
3861
3862 2002-01-29 Chris Demetriou <cgd@broadcom.com>
3863
3864 * elf32-mips.c: Add additional comments about HI16 relocation
3865 processing.
3866 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3867 pc-relative relocations. (Reverts change made on 2001-10-31.)
3868 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3869 for pc-relative relocations.
3870 (mips_elf_calculate_relocation): Add a comment about a kludge
3871 in the R_MIPS_GNU_REL_HI16 handling.
3872 (_bfd_mips_elf_relocate_section): Implement that kludge;
3873 adjust pc-relative HI16 relocation for difference in HI16 and
3874 LO16 addresses, since it can't easily be done in
3875 mips_elf_calculate_relocation.
3876
3877 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
3878
3879 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3880 relocations with PC32 relocations for undefined or weak symbols.
3881 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3882 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3883
3884 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
3885
3886 * elfcore.h (elf_core_file_p): Improve comment for last change.
3887
3888 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
3889
3890 * configure: Regenerated.
3891
3892 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
3893
3894 * elfcore.h (elf_core_file_p): Set the machine architecture
3895 before processing the program headers.
3896
3897 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
3898
3899 * configure.in <64-bit configuration>: If using gcc, check and
3900 emit error for egcs-1.1.2.
3901 * configure: Regenerate.
3902
3903 2002-01-26 Egor Duda <deo@logos-m.ru>
3904
3905 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3906 as possible to avoid stack corruption.
3907
3908 2002-01-26 Richard Henderson <rth@redhat.com>
3909
3910 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3911 for non-allocated sections.
3912
3913 2002-01-25 Mark Kettenis <kettenis@gnu.org>
3914
3915 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3916 prstat.pr_reg even if it is a struct.
3917
3918 2002-01-25 Steve Ellcey <sje@cup.hp.com>
3919
3920 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3921
3922 2002-01-25 Philipp Thomas <pthomas@suse.de>
3923
3924 * coffgen.c (coff_print_symbol): Don't mark info message
3925 for translation.
3926
3927 2002-01-25 Nick Clifton <nickc@redhat.com>
3928
3929 * po/fr.po: Updated translation.
3930 * po/es.po: Updated translation.
3931
3932 2002-01-25 Philipp Thomas <pthomas@suse.de>
3933
3934 * coff-alpha.c (alpha_relocate_section): Unify warning message
3935 for GP relative relocations without GP defined.
3936 * coff-mips.c (mips_relocate_section): Likewise.
3937
3938 2002-01-25 Alan Modra <amodra@bigpond.net.au>
3939
3940 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3941 unsigned overflow when new_offset < old_offset.
3942
3943 2002-01-24 Philipp Thomas <pthomas@suse.de>
3944
3945 * bfd.c (_bfd_abort): Fix typo.
3946
3947 2002-01-23 Richard Henderson <rth@redhat.com>
3948
3949 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3950 plt entries for undefweak symbols.
3951
3952 2002-01-23 Steve Ellcey <sje@cup.hp.com>
3953
3954 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3955 DEFAULT_VECTOR.
3956 (bfd_elf64_ia64_hpux_big_vec): Ditto.
3957 (bfd_elf32_h8300_vec): Ditto.
3958
3959 2002-01-23 Alan Modra <amodra@bigpond.net.au>
3960
3961 * elf64-ppc.c: Remove stale part of ABI comment.
3962 (NO_OPD_RELOCS): Define.
3963 (ppc64_elf_check_relocs): Use it.
3964 (ppc64_elf_relocate_section): Here too.
3965 (build_one_stub): Don't point function syms at the stub. Instead,
3966 hijack plt.offset.
3967 (ppc64_elf_relocate_section): Check whether REL24 relocs should
3968 really go to the stub. Make all dynamic relocs in opd against
3969 locals.
3970 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3971 plt.offset.
3972
3973 2002-01-22 Richard Henderson <rth@redhat.com>
3974
3975 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3976
3977 2002-01-22 Alan Modra <amodra@bigpond.net.au>
3978
3979 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3980 TOC_BASE_OFF adjustment.
3981
3982 * Makefile.am: Run "make dep-am".
3983 * Makefile.in: Regenerate.
3984 * po/SRC-POTFILES.in: Regenerate.
3985
3986 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
3987
3988 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3989 host defines.
3990
3991 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
3992
3993 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3994 Check for and emit error if sgot is NULL at this point.
3995
3996 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
3997
3998 * config.bfd (ia64*-*-netbsd*): New target.
3999
4000 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4001
4002 * som.c (som_write_space_strings): Comment typo fix.
4003
4004 2002-01-21 Alan Modra <amodra@bigpond.net.au>
4005
4006 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4007 is_func_descriptor fields.
4008 (link_hash_newfunc): Init them.
4009 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
4010 dot are candidates for plt entries. When processing .opd relocs,
4011 set function descriptor strings to point inside function code
4012 string, and set new ppc_link_hash_entry fields.
4013 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
4014 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
4015 function descriptors. It's now done in..
4016 (func_desc_adjust): New.
4017 (ppc64_elf_func_desc_adjust): New.
4018 (define elf_backend_always_size_sections): Define.
4019 (ppc64_elf_hide_symbol): New.
4020 (define elf_backend_hide_symbol): Define.
4021 (allocate_dynrelocs): Remove code looking up function descriptors
4022 as that has been done earlier.
4023 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
4024 table.
4025 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
4026 up function descriptor.
4027 (build_one_stub): Look up the function code sym. Check for
4028 invalid plt offsets.
4029 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4030 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4031
4032 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4033 boolean param.
4034 (_bfd_elf_link_hash_hide_symbol): Likewise.
4035 * elflink.h (elf_link_add_object_symbols): Adjust call to
4036 elf_backend_hide_symbol.
4037 (elf_fix_symbol_flags): Likewise.
4038 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4039 than bfd_alloc.
4040 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4041 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4042 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4043 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4044 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4045 and adjust to suit.
4046 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4047 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4048 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4049
4050 2002-01-18 Alan Modra <amodra@bigpond.net.au>
4051
4052 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4053 dynamic function descriptor symbol, not the associated function
4054 symbol.
4055
4056 2002-01-17 Eric Christopher <echristo@redhat.com>
4057
4058 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4059
4060 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
4061
4062 * po/bfd.pot: Regenerate.
4063 * po/fr.po: Regenerate.
4064
4065 2002-01-17 Alan Modra <amodra@bigpond.net.au>
4066
4067 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4068 Remove "Elf_Internal_Shdr *" param.
4069 (_bfd_mips_elf_section_from_bfd_section): Ditto.
4070 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4071 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4072 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4073 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4074 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4075 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4076 function to override special sections. Remove hdr arg from
4077 backend call, and don't loop.
4078
4079 2002-01-16 Eric Christopher <echristo@redhat.com>
4080
4081 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4082 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4083 relocations requiring gp0 and gp.
4084
4085 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
4086
4087 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
4088 EF_ARM_VFP_FLOAT.
4089 (elf32_arm_print_private_bfd_data): Likewise.
4090
4091 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
4092
4093 * po/tr.po: Import new version.
4094
4095 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4096
4097 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4098 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4099 (ORI_R0_R0_0): Correct.
4100
4101 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4102
4103 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4104 when plt_not_loaded.
4105 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4106 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
4107 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4108 (ppc64_elf_glink_code): Delete.
4109 (PPC64_ELF_GLINK_SIZE): Delete.
4110 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4111 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4112 ORI_R0_R0_0): Define.
4113 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4114 (struct ppc_link_hash_table): Add sstub and plt_overflow.
4115 (ppc64_elf_link_hash_table_create): Init them.
4116 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4117 Don't copy to shared lib.
4118 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4119 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4120 (allocate_dynrelocs <plt>): Don't change function sym here. Make
4121 room for .stub and .glink code.
4122 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
4123 DT_PPC64_GLINK.
4124 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
4125 bfd_elf64_bfd_final_link.
4126 (bfd_elf64_bfd_final_link): Don't define.
4127 (ppc64_elf_size_stubs): New.
4128 (build_plt_stub): New.
4129 (build_one_stub): New.
4130 (ppc64_elf_build_stubs): New.
4131 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4132 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4133 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
4134 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4135 case output sections not separate. Adjust DT_RELASZ to not
4136 include plt relocs. Set reserved got entry. Set got and plt
4137 entry size.
4138 (elf_backend_got_header_size): Set to 8.
4139 * elf64-ppc.h: New file.
4140
4141 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4142
4143 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4144 sections, use bfd_section_list_remove.
4145 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4146 * elflink.h (elf_link_add_object_symbols): When removing all
4147 sections, use bfd_section_list_clear.
4148
4149 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4150
4151 * po/sv.po: New file: Swedish translation.
4152 * configure.in (ALL_LINGUAS): Add sv.
4153 * configure: Regenerate.
4154
4155 2002-01-15 Jakub Jelinek <jakub@redhat.com>
4156
4157 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4158 * elf.c (merge_sections_remove_hook): New function.
4159 (_bfd_elf_merge_sections): Pass it as 3rd argument to
4160 _bfd_merge_sections.
4161 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4162 * libbfd.h: Rebuilt.
4163 * merge.c (_bfd_merge_sections): Add remove_hook argument.
4164 Call remove_hook if a SEC_EXCLUDE section is encountered.
4165
4166 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4167
4168 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
4169 (xstormy16_reloc_map): Initialise new field with correct howto
4170 table.
4171 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
4172 howto entry.
4173
4174 2002-01-10 Michael Snyder <msnyder@redhat.com>
4175
4176 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
4177 (elfcore_write_pstatus): Use long instead of pid_t;
4178 * elf-bfd.h: Change prototypes to use long instead of pid_t;
4179
4180 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
4181
4182 * elf.c: Update copyright years.
4183 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
4184 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
4185
4186 2002-01-08 Michael Snyder <msnyder@redhat.com>
4187
4188 Add capability to write corefile note sections, for gdb.
4189 * elf.c (elfcore_write_note): New function.
4190 (elfcore_write_prpsinfo): New function.
4191 (elfcore_write_prstatus): New function.
4192 (elfcore_write_pstatus): New function.
4193 (elfcore_write_prfpreg): New function.
4194 (elfcore_write_prxfpreg): New function.
4195 * elf-bfd.h: Add prototypes for above functions.
4196
4197 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
4198
4199 * elf.c (elf_fake_sections): Propagate errors from
4200 elf_backend_fake_section.
4201
4202 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
4203
4204 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
4205 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
4206 (elf32-sh-nbsd.lo): New rule.
4207 * Makefile.in: Regenerate.
4208 * config.bfd (sh*le-*-netbsdelf*): New target.
4209 (sh*-*-netbsdelf*): New target.
4210 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
4211 (bfd_elf32_shnbsd_vec): New vector.
4212 (bfd_elf32_shlnbsd_vec): New vector.
4213 * configure: Regenerate.
4214 * elf32-sh-nbsd.c: New file.
4215 * targets.c: Update copyright years.
4216 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
4217 bfd_elf32_shnbsd_vec.
4218
4219 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
4220
4221 * coff-rs6000.c (READ20): Use bfd_scan_vma.
4222
4223 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
4224
4225 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
4226 of a symbol in a section that will be deleted.
4227
4228 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
4229
4230 * po/es.po: New file: Spanish translation.
4231 * configure.in (ALL_LINGUAS): Add es.
4232 * configure: Regenerate.
4233
4234 2002-01-06 Steve Ellcey <sje@cup.hp.com>
4235
4236 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4237 argument so we can handle HP-UX specially.
4238 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
4239 (elfNN_hpux_backend_section_from_bfd_section): New for support
4240 of SHN_IA_64_ANSI_COMMON.
4241 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
4242 (is_unwind_section_name): Add special HP-UX support.
4243 (elfNN_ia64_section_from_shdr): Add support for more sections.
4244 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
4245 add support for more sections.
4246 (elfNN_ia64_additional_program_headers): Modify
4247 is_unwind_section_name call.
4248 (elfNN_ia64_modify_segment_map): Remove assumption that there is
4249 only one unwind section in segment.
4250
4251 2002-01-06 Alan Modra <amodra@bigpond.net.au>
4252
4253 * syms.c (_bfd_generic_make_empty_symbol): New function.
4254 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
4255 _bfd_generic_make_empty_symbol.
4256 * libbfd.h: Regenerate.
4257 * bfd-in2.h: Regenerate.
4258 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
4259 (hppabsd_core_get_symtab_upper_bound): Don't define.
4260 (hppabsd_core_get_symtab): Likewise.
4261 (hppabsd_core_print_symbol): Likewise.
4262 (hppabsd_core_get_symbol_info): Likewise.
4263 (hppabsd_core_bfd_is_local_label_name): Likewise.
4264 (hppabsd_core_get_lineno): Likewise.
4265 (hppabsd_core_find_nearest_line): Likewise.
4266 (hppabsd_core_bfd_make_debug_symbol): Likewise.
4267 (hppabsd_core_read_minisymbols): Likewise.
4268 (hppabsd_core_minisymbol_to_symbol): Likewise.
4269 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
4270 Formatting fixes.
4271 * hpux-core.c: Similarly.
4272 * irix-core.c: Similarly.
4273 * osf-core.c: Similarly.
4274 * sco5-core.c: Similarly.
4275 * binary.c (binary_make_empty_symbol): Remove function, define as
4276 _bfd_generic_make_empty_symbol.
4277 * ihex.c (ihex_make_empty_symbol): Likewise.
4278 * mmo.c (mmo_make_empty_symbol): Likewise.
4279 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
4280 * srec.c (srec_make_empty_symbol): Likewise.
4281 * versados.c (versados_make_empty_symbol): Likewise.
4282 * vms.c (_bfd_vms_make_empty_symbol): Remove.
4283 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
4284 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
4285 rather than _bfd_vms_make_empty_symbol.
4286 * vms-misc.c (new_symbol): Likewise.
4287
4288 2002-01-05 Alan Modra <amodra@bigpond.net.au>
4289
4290 * section.c (bfd_section_init): Remove unnecessary initialisations.
4291 (bfd_section_list_clear): New function.
4292 (bfd_section_list_remove, bfd_section_list_insert): New macros.
4293 (_bfd_strip_section_from_output): Use them.
4294 * coffcode.h (coff_set_alignment_hook): Likewise.
4295 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
4296 * elf64-mips.c (mips_elf64_final_link): Likewise.
4297 * elf64-mmix.c (mmix_elf_final_link): Likewise.
4298 * sunos.c (sunos_add_dynamic_symbols): Likewise.
4299 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
4300 * bfd-in2.h: Regenerate.
4301
4302 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
4303 rather than doing our own section handling. Clean up after errors
4304 with bfd_release and bfd_section_list_clear. Handle unexpected
4305 flags.
4306 * aoutf1.h (sunos4_core_file_p): Likewise.
4307 * aix386-core.c (aix386_core_file_p): Likewise.
4308 * cisco-core.c (cisco_core_file_validate): Likewise.
4309 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
4310 * trad-core.c (trad_unix_core_file_p): Likewise.
4311
4312 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
4313 with bfd_release and bfd_section_list_clear.
4314 * hpux-core.c (hpux_core_core_file_p): Likewise.
4315 * irix-core.c (irix_core_core_file_p): Likewise.
4316 * lynx-core.c (lynx_core_file_p): Likewise.
4317 * osf-core.c (osf_core_core_file_p): Likewise.
4318 * rs6000-core.c (rs6000coff_core_p): Likewise.
4319 * sco5-core.c (sco5_core_file_p): Likewise.
4320
4321 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
4322 sign extension adjustments without conditionals.
4323
4324 2002-01-04 Jakub Jelinek <jakub@redhat.com>
4325
4326 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
4327 CIE at .eh_frame start is removed due to no FDEs referencing it.
4328
4329 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
4330
4331 * config.bfd (x86_64-*-netbsd*): New target.
4332 * configure.in (x86_64-*-netbsd*): Set COREFILE
4333 to netbsd-core.lo.
4334 * configure: Regenerated.
4335
4336 2002-01-03 Tom Rix <trix@redhat.com>
4337
4338 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
4339 for recent bfd_make_section_anyway change.
4340
4341 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
4342
4343 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4344 R_ARM_THM_PC11 reloc.
4345
4346 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4347
4348 * configure.in (LINGUAS): Add ja.
4349 * configure: Regenerate.
4350 * po/ja.po: Import from translation project's web site.
4351
4352 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4353
4354 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
4355 messages to ease translation into other languages.
4356
4357 For older changes see ChangeLog-0001
4358 \f
4359 Local Variables:
4360 mode: change-log
4361 left-margin: 8
4362 fill-column: 74
4363 version-control: never
4364 End: