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