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