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