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