0709dc3ec5617c740a79d16083b5497c7a812a1b
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2003-08-11 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
4 branch to __libc_start_main.
5
6 2003-08-08 Dmitry Diky <diwil@mail.ru>
7
8 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
9 gcc order.
10 * cpu-msp430.c: Likewise.
11 * elf32-msp430.c: Likewise.
12 * bfd-in2.h: Regenerate.
13
14 2003-08-07 Alan Modra <amodra@bigpond.net.au>
15
16 * elfxx-target.h: Remove PTR cast.
17 * targets.c (bfd_target): Make backend_data const void *.
18 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
19 * elf-m10300.c: Likewise.
20 * elf.c: Likewise.
21 * elf32-hppa.c: Likewise.
22 * elf32-i386.c: Likewise.
23 * elf32-m68hc1x.c: Likewise.
24 * elf32-ppc.c: Likewise.
25 * elf32-s390.c: Likewise.
26 * elf32-sh.c: Likewise.
27 * elf32-sh64.c: Likewise.
28 * elf32-sparc.c: Likewise.
29 * elf32-xtensa.c: Likewise.
30 * elf64-mips.c: Likewise.
31 * elf64-ppc.c: Likewise.
32 * elf64-s390.c: Likewise.
33 * elf64-sh64.c: Likewise.
34 * elf64-sparc.c: Likewise.
35 * elf64-x86-64.c: Likewise.
36 * elfcode.h: Likewise.
37 * elfcore.h: Likewise.
38 * elflink.c: Likewise.
39 * elflink.h: Likewise.
40 * elfxx-ia64.c: Likewise.
41 * elfxx-mips.c: Likewise.
42 * elfxx-mips.h: Likewise.
43 * elf.c (prep_headers): Remove useless check for null backend_data.
44 * bfd-in2.h: Regenerate.
45
46 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
47 (NAME): Use ## rather than CONCAT4 macro.
48 * elfcode.h: Remove one remaining PARAMS macro.
49 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
50 * elf-strtab.c: Likewise.
51 * elf-hppa.h: Likewise.
52 * elf32-hppa.h: Likewise.
53 * elf32-hppa.c: Likewise.
54 (elf32_hppa_add_symbol_hook): Delete.
55 (elf_backend_add_symbol_hook): Don't define.
56 * libhppa.h: Convert to C90. Replace INLINE with inline.
57
58 2003-08-06 Alan Modra <amodra@bigpond.net.au>
59
60 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
61 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
62 function descriptors, but warn.
63 (ppc_build_one_stub): Remove a couple of vars. Move code creating
64 stub syms so that we can avoid a stub sym if we already have a
65 plt sym. Do not redefine an existing symbol.
66 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
67 glink.
68
69 2003-08-06 Nick Clifton <nickc@redhat.com>
70
71 * po/fr.po: Updated French translation.
72
73 2003-08-06 Alan Modra <amodra@bigpond.net.au>
74
75 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
76 SEC_LINKER_CREATED.
77
78 2003-08-05 Daniel Jacobowitz <drow@mvista.com>
79
80 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
81 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
82
83 2003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
84
85 * coffcode.h (coff_slurp_line_table): Return with a warning
86 message if the line number table could not be read.
87
88 2003-08-04 Nick Clifton <nickc@redhat.com>
89
90 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
91 to messages produced for .gnu.warning.SYMBOL sections.
92
93 2003-08-04 Alan Modra <amodra@bigpond.net.au>
94
95 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
96 * elfcore.h: Likewise.
97 * elflink.c: Likewise.
98 * elflink.h: Likewise.
99 * elf.c (sym_is_global): Remove INLINE.
100 (align_file_position): Replace INLINE with inline.
101 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
102 (elf_file_p): Replace INLINE with inline.
103
104 2003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
105
106 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
107
108 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
109
110 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
111
112 2003-08-01 H.J. Lu <hongjiu.lu@intel.com>
113
114 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
115 ElfNN_External_Rela instead of Elf64_External_Rela.
116
117 2003-08-01 Nick Clifton <nickc@redhat.com>
118
119 * config.bfd: Add code to catch obsolete configurations and warn
120 about them unless --enable-obsolete is used. Use this to mark
121 vax-vms port as obsolete.
122
123 2003-07-30 Alan Modra <amodra@bigpond.net.au>
124
125 * elf32-ppc.c (ppc_elf_install_value): Tidy.
126 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
127 Formatting.
128 * elfxx-target.h: Remove PARAMS macro. Formatting.
129
130 2003-07-30 Alan Modra <amodra@bigpond.net.au>
131
132 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
133 * elf64-ppc.c (get_fdh): New function, split out from
134 ppc64_elf_edit_opd.
135 (ppc64_elf_check_relocs): Use get_fdh.
136 (func_desc_adjust): Likewise. Tidy.
137 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
138 exit. Use get_fdh. Account for superfluous dynamic relocs.
139 (ppc64_elf_relocate_section): Warning fix.
140
141 2003-07-30 Jason Eckhardt <jle@rice.edu>
142
143 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
144
145 2003-07-30 Jason Eckhardt <jle@rice.edu>
146
147 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
148
149 2003-07-30 Randolph Chung <tausq@debian.org>
150
151 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
152 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
153
154 2003-07-30 Alan Modra <amodra@bigpond.net.au>
155
156 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
157 Replace PTR with void *. Formatting.
158 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
159 (make_mapping): Likewise.
160
161 2003-07-29 Alan Modra <amodra@bigpond.net.au>
162
163 * elf64-ppc.c (func_desc_adjust): Give linker created function
164 descriptor symbols a size and type.
165 (ppc64_elf_relocate_section): Correct lq insn test.
166
167 2003-07-28 Eric Christopher <echristo@redhat.com>
168
169 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
170 (ppc_elf_install_value): New function.
171 (ppc_elf_sort_rela): Remove.
172 (ppc_elf_relax_section): Rewrite. Remove old relaxation
173 and replace with out of range branch stubs.
174 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
175
176 2003-07-29 Alexandre Oliva <aoliva@redhat.com>
177
178 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
179 from input_bfd.
180
181 2003-07-28 Alan Modra <amodra@bigpond.net.au>
182
183 * elf.c (special_sections): Set attributes for .got and .plt.
184
185 2003-07-27 Alan Modra <amodra@bigpond.net.au>
186
187 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
188 on function descriptors.
189 (ELIMINATE_COPY_RELOCS): Expand comment.
190 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
191 Do include ".toc1".
192
193 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
194
195 * elf.c (_bfd_elf_new_section_hook): Set the default section
196 type to SHT_NULL.
197 (elf_fake_sections): Set the section type based on asect->flags
198 if it is SHT_NULL. Don't abort on processor specific section
199 types.
200
201 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
202
203 * bfd-in2.h: Regenerated.
204
205 2003-07-25 H.J. Lu <hongjiu.lu@intel.com>
206
207 * elf-bfd.h (bfd_elf_special_section): New.
208 (elf_backend_data): Add special_sections, a pointer to
209 bfd_elf_special_section.
210 (elf_section_type). New.
211 (elf_section_flags): New.
212 (_bfd_elf_get_sec_type_attr): New.
213
214 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
215 real section type/flags.
216 (special_sections): New.
217 (get_special_section): New.
218 (_bfd_elf_get_sec_type_attr): New.
219 (_bfd_elf_new_section_hook): Check special_section to set
220 elf_section_type and elf_section_flags.
221 (elf_fake_sections): Don't use section name to set ELF section
222 data.
223
224 * elf32-m32r.c (m32r_elf_special_sections): New.
225 (elf_backend_special_sections): Defined.
226
227 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
228 (elf_backend_special_sections): Defined.
229
230 * elf32-mcore.c (mcore_elf_special_sections): New.
231 (elf_backend_special_sections): Defined.
232
233 * elf32-ppc.c (ppc_elf_special_sections): New.
234 (elf_backend_special_sections): Defined.
235
236 * elf32-sh64.c (sh64_elf_special_sections): New.
237 (elf_backend_special_sections): Defined.
238
239 * elf32-v850.c (v850_elf_special_sections): New.
240 (elf_backend_special_sections): Defined.
241
242 * elf32-xtensa.c (elf_xtensa_special_sections): New.
243 (elf_backend_special_sections): Defined.
244
245 * elf64-alpha.c (elf64_alpha_special_sections): New.
246 (elf_backend_special_sections): Defined.
247
248 * elf64-hppa.c (elf64_hppa_special_sections): New.
249 (elf_backend_special_sections): Defined.
250
251 * elf64-ppc.c (ppc64_elf_special_sections): New.
252 (elf_backend_special_sections): Defined.
253
254 * elf64-sh64.c (sh64_elf64_special_sections): New.
255 (elf_backend_special_sections): Defined.
256
257 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
258 (elf_backend_special_sections): Defined.
259
260 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
261
262 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
263 (elf_backend_special_sections): Defined.
264
265 * elfxx-target.h (elf_backend_special_sections): New. Default
266 to NULL.
267 (elfNN_bed): Initialize special_sections.
268
269 * section.c (bfd_abs_section): Remove const.
270 (bfd_und_section): Likewise.
271 (bfd_com_section): Likewise.
272 (bfd_ind_section): Likewise.
273
274 2003-07-24 Nick Clifton <nickc@redhat.com>
275
276 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
277 sections are assigned the LOAD attribute.
278
279 2003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
280
281 * elf32-sh.c: Convert to C90. Replace PTR with void *.
282 * elf32-sh64-com.c: Likewise.
283 * elf32-sh64.c: Likewise.
284 * elf32-sh64.h: Likewise.
285 * elf64-sh64.c: Likewise.
286
287 2003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
288
289 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
290 (allocate_dynrelocs): Likewise.
291 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
292 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
293
294 2003-07-24 Nick Clifton <nickc@redhat.com>
295
296 * po/fr.po: Updated French translation.
297
298 2003-07-23 Bob Wilson <bob.wilson@acm.org>
299
300 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
301 near the beginning of the file. Swap order of arguments. Call
302 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
303 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
304 (elf_xtensa_relocate_section): Likewise.
305 (shrink_dynamic_reloc_sections): Likewise.
306
307 2003-07-23 Bob Wilson <bob.wilson@acm.org>
308
309 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
310 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
311 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
312 first printing an error message.
313 (elf_xtensa_finish_dynamic_sections): Likewise.
314 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
315 discarding literal table entries.
316 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
317 (elf_xtensa_do_asm_simplify): Likewise.
318
319 2003-07-23 Stephane Carrez <stcarrez@nerim.fr>
320
321 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
322 we have a local symbol in common section.
323
324 2003-07-22 H.J. Lu <hongjiu.lu@intel.com>
325
326 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
327 weak symbols.
328
329 2003-07-22 Nick Clifton <nickc@redhat.com>
330
331 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
332 expected RS6000 storage classes.
333
334 2003-07-21 H.J. Lu <hongjiu.lu@intel.com>
335
336 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
337 output_bfd unused to silence gcc.
338
339 2003-07-21 Nick Clifton <nickc@redhat.com>
340
341 * po/sv.po: Updated Swedish translation.
342
343 2003-07-21 Alan Modra <amodra@bigpond.net.au>
344
345 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
346 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
347 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
348 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
349 now done in _bfd_elf_symbol_refs_local_p.
350 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
351 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
352 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
353
354 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
355
356 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
357
358 2003-07-18 H.J. Lu <hongjiu.lu@intel.com>
359
360 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
361 (SYMBOL_CALLS_LOCAL): Likewise.
362
363 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
364 immediately if symbol isn't defined locally.
365
366 2003-07-18 Richard Henderson <rth@redhat.com>
367
368 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
369 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
370 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
371 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
372 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
373 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
374 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
375 Update all callers to provide the relocation being resolved.
376
377 2003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
378
379 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
380 targ_cflags.
381
382 2003-07-17 Nick Clifton <nickc@redhat.com>
383
384 * po/es.po: New Spanish translation.
385 * po/sv.po: New Swedish translation.
386 * po/opcodes.pot: Regenerate.
387
388 2003-07-16 Richard Henderson <rth@redhat.com>
389
390 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
391 * elfxx-ia64.c, targets.c: Likewise.
392
393 2003-07-16 Richard Henderson <rth@redhat.com>
394
395 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
396 for symbols defined locally plus -Bsymbolic. Tidy logic.
397
398 2003-07-15 Richard Sandiford <rsandifo@redhat.com>
399
400 * archures.c (bfd_mach_mips7000): New.
401 * bfd-in2.h: Regenerated.
402 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
403 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
404 (mips_mach_extensions): Add an entry for it.
405
406 2003-07-14 Nick Clifton <nickc@redhat.com>
407
408 * po/tr.po: Update with latest version.
409 * po/SRC-POTFILES.in: Regenerate.
410 * po/bfd.pot: Regenerate.
411 * Makfile.in: Regenerate.
412 * configure: Regenerate.
413
414 2003-07-12 Jeff Baker <jbaker@qnx.com>
415
416 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
417 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
418 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
419 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
420
421 2003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
422
423 * coffcode.h (coff_set_section_contents): Set the
424 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
425
426 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
427
428 * bfd-in.h (bfd_h8300_pad_address): Declare.
429 * bfd-in2.h: Regenerate.
430 * cpu-h8300.c (bfd_h8300_pad_address): New function.
431 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
432 addresses before checking whether they can be relaxed.
433 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
434 Don't complain about overflows in general 8-bit relocations.
435 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
436 Fix handling of R_H8_DIR24A8.
437
438 2003-07-11 Richard Sandiford <rsandifo@redhat.com>
439
440 * elf32-h8300.c: Convert function prototypes and definitions
441 to C90 syntax.
442 * coff-h8300.c: Likewise.
443 * cpu-h8300.c: Likewise.
444
445 2003-07-11 Alan Modra <amodra@bigpond.net.au>
446
447 * po/SRC-POTFILES.in: Regenerate.
448 * po/bfd.pot: Likewise.
449
450 2003-07-10 Bob Wilson <bob.wilson@acm.org>
451
452 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
453 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
454 .xt.lit.plt section.
455 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
456 and allocate memory for it.
457 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
458 section to the .got.loc section.
459 (elf_xtensa_finish_dynamic_sections): Fix up call to
460 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
461 the address of .got.loc.
462 (relax_property_section): Shrink .got.loc to match changes in any
463 literal table section.
464 (xtensa_is_property_section): Change to match
465 xtensa_get_property_section_name.
466 (xtensa_is_littable_section): New.
467
468 2003-07-10 H.J. Lu <hongjiu.lu@intel.com>
469
470 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
471 -1LL.
472
473 2003-07-10 Alan Modra <amodra@bigpond.net.au>
474
475 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
476 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
477 Run "make dep-am".
478 * Makefile.in: Regenerate.
479
480 2003-07-10 Alexandre Oliva <aoliva@redhat.com>
481
482 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
483 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
484 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
485 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
486 * elf32-am33lin.c: Rename global functions.
487 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
488 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
489 * configure.in (bfd_elf32_am33lin_vec): Added.
490 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
491 (elf32-am33lin.lo): List dependencies.
492 * aclocal.m4, configure, Makefile.in: Rebuilt.
493 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
494 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
495 ELF_ARCH was not defined before.
496 (elf_symbol_leading_char): Define if not defined.
497 * elf32-am33lin.c: Override the definitions above.
498 * targets.c (bfd_elf32_am33lin_vec): New.
499
500 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
501
502 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
503 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
504 pcrel_relocs_copied.
505 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
506 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
507 ld-linux.so.2 to ld.so.1.
508 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
509 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
510 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
511 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
512 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
513 .rela.* section contents with bfd_zalloc.
514 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
515 * elf-m10300.c: Added declarations for functions missing them.
516 Merge some shared-library changes from the i386 back-end. Use
517 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
518 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
519 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
520 members of elf_link_hash_entry. Adjusted references.
521 (mn10300_elf_final_link_relocate): dynobj was already loaded
522 into a local variable, use it.
523 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
524 * elf-m10300.c: Add missing function prototypes.
525 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
526 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
527 relocation for dynamic relocations.
528 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
529 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
530 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
531 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
532 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
533 (_bfd_mn10300_elf_create_got_section): ... here, so that its
534 adress is already known at the time we compute relaxations.
535 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
536 and PLT32 to narrower relocations.
537 * libbfd.h, bfd-in2.h: Rebuilt.
538 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
539 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
540 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
541 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
542 BFD_RELOC_MN10300_RELATIVE): New relocs.
543 * libbfd.h, bfd-in2.h: Rebuilt.
544 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
545 (struct elf32_mn10300_link_hash_entry): Added DSO-related
546 fields.
547 (elf_mn10300_howto): Defined new relocation types.
548 (mn10300_reloc_map): Map them.
549 (_bfd_mn10300_elf_create_got_section): New fn.
550 (mn10300_elf_check_relocs): Handle PIC relocs.
551 (mn10300_elf_final_link_relocate): Likewise.
552 (mn10300_elf_relocate_section): Handle DSOs.
553 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
554 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
555 elf_mn10300_pic_plt_entry): New.
556 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
557 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
558 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
559 elf_mn10300_plt_reloc_offset: New macros.
560 (ELF_DYNAMIC_INTERPRETER): Likewise.
561 (_bfd_mn10300_elf_create_dynamic_sections): New function.
562 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
563 (_bfd_mn10300_elf_discard_copies): Likewise.
564 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
565 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
566 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
567 (elf_backend_can_gc_sections,
568 elf_backend_create_dynamic_sections,
569 elf_backend_adjust_dynamic_sections,
570 elf_backend_size_dynamic_sections,
571 elf_backend_finish_dynamic_symbol,
572 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
573 elf_backend_plt_readonly, elf_backend_want_plt_sym,
574 elf_backend_got_header_size, elf_backend_plt_header_size): New
575 macros.
576
577 2003-07-09 Alexandre Oliva <aoliva@redhat.com>
578
579 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
580 * elf-m10300.c (compute_function_info): Account for AM33
581 registers in `movm' when computing stack space for `call' when
582 linking for AM33/2.0 link.
583 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
584 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
585 * bfd-in2.h: Rebuilt.
586 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
587 * elf-m10300.c: Updated.
588 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
589 * archures.c (bfd_mach_am332): Defined.
590 * bfd-in2.h: Rebuilt.
591 * cpu-m10300.c (bfd_am332_arch): Defined.
592 (bfd_am33_arch): Chained with am33-2.
593 * elf-m10300.c (elf_mn10300_mach): Handle am332.
594 (_bfd_mn10300_elf_final_write_processing): Likewise.
595
596 2003-07-09 H.J. Lu <hongjiu.lu@intel.com>
597
598 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
599
600 2003-07-10 Alan Modra <amodra@bigpond.net.au>
601
602 * elf64-ppc.c (bfd_elf64_mkobject): Define.
603 (struct ppc64_elf_obj_tdata): New.
604 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
605 (ppc64_elf_mkobject): New function.
606 (struct got_entry): Add "owner". Move "tls_type".
607 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
608 (ppc64_elf_init_stub_bfd): New function.
609 (create_got_section): Create header .got in dynobj. Create .got
610 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
611 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
612 Look for dynobj .got, and test it.
613 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
614 (update_local_sym_info): Likewise.
615 (ppc64_elf_check_relocs): Likewise.
616 (ppc64_elf_gc_sweep_hook): Likewise.
617 (ppc64_elf_tls_optimize): Likewise.
618 (allocate_dynrelocs): Likewise.
619 (ppc64_elf_size_dynamic_sections): Likewise.
620 (ppc64_elf_relocate_section): Likewise.
621 (ppc64_elf_next_toc_section): Update comment.
622 (toc_adjusting_stub_needed): Remove unneeded cast.
623 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
624 testing section flags.
625 (ppc64_elf_build_stubs): Likewise.
626 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
627 (ppc64_elf_finish_dynamic_sections): Write out got sections.
628 (func_desc_adjust): Copy over dynamic info for undef weaks.
629 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
630 (ppc64_elf_size_stubs): Update prototype.
631 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
632 input sections rather than scanning dynobj.
633
634 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
635
636 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
637 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
638 (mips_elf_create_msym_section): Delete.
639 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
640 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
641 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
642 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
643 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
644 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
645 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
646
647 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
648
649 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
650 symbols protected.
651
652 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
653
654 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
655 of relocations whose offset is -2.
656
657 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
658
659 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
660 forced-local symbols like other locals. Don't create relocations
661 against STN_UNDEF in irix objects.
662
663 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
664
665 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
666 compatible objects, add the values of defined external symbols
667 to the addend.
668
669 2003-07-09 Richard Sandiford <rsandifo@redhat.com>
670
671 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
672 initialize a GOT entry to the symbol's st_value.
673
674 2003-07-08 Alan Modra <amodra@bigpond.net.au>
675
676 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
677 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
678 (ppc_elf_tdata): Define.
679 (elf_local_ptr_offsets): Adjust.
680 (ppc_elf_mkobject): New function.
681 (bfd_elf32_mkobject): Define.
682
683 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
684 * elfcore.h (elf_core_file_p): Likewise.
685 * section.c (bfd_section_init): Remove prototype.
686
687 2003-07-08 Alan Modra <amodra@bigpond.net.au>
688
689 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
690 field.
691 (enum elf_linker_section_enum): Delete.
692 (struct elf_linker_section): Delete.
693 (struct elf_linker_section_pointers): Delete.
694 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
695 Make linker_section_pointers a void**.
696 (elf_local_ptr_offsets, elf_linker_section): Don't define.
697 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
698 of old item in elf-bfd.h.
699 (struct elf_linker_section): Likewise.
700 (struct elf_linker_section_pointers): Likewise.
701 (elf_local_ptr_offsets): Define.
702 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
703 (ppc_elf_link_hash_newfunc): Init it.
704 (struct ppc_elf_link_hash_table): Add sbss.
705 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
706 individual fields.
707 (elf_create_linker_section): Fold into..
708 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
709 Make rela section here if shared.
710 (elf_find_pointer_linker_section): Pass lsect rather than enum.
711 (elf_create_pointer_linker_section): Adjust. zalloc rather than
712 clearing in a loop.
713 (elf_finish_pointer_linker_section): Adjust. Don't make rela
714 section here.
715 (ppc_elf_check_relocs): Adjust.
716 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
717 creating .sbss by hand.
718 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
719
720 2003-07-04 Jakub Jelinek <jakub@redhat.com>
721
722 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
723 complain_overflow_bitfield.
724 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
725 complain_overflow_bitfield.
726
727 2003-07-04 Jakub Jelinek <jakub@redhat.com>
728
729 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
730 true even if -pie.
731
732 2003-07-04 Jakub Jelinek <jakub@redhat.com>
733
734 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
735 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
736 !info->executable.
737 (get_fptr): For -pie create .opd as writable section and create
738 .rela.opd as well.
739 (elfNN_ia64_check_relocs): Change info->shared into
740 !info->executable.
741 (allocate_fptr): Likewise.
742 (allocate_dynrel_entries): Account for a relative reloc for -pie
743 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
744 for undefweak symbol. Account for an IPLT reloc in .rela.opd
745 section if -pie.
746 (set_got_entry): Don't create a relative reloc if -pie
747 want_ltoff_fptr for undefweak symbol.
748 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
749 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
750 @fptr().
751
752 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
753 even if -pie.
754 * elf32-i386.c (elf_i386_relocate_section): Likewise.
755 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
756 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
757 * elf64-s390.c (elf_s390_relocate_section): Likewise.
758 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
759 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
760 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
761 * elf32-s390.c (elf_s390_relocate_section): Likewise.
762 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
763
764 2003-07-04 Paul Clarke <paulc@senet.com.au>
765
766 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
767 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
768 <R_H8_DIR32A16>: Fix type of relocation.
769
770 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
771
772 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
773 sections were created already. Remove unnecessary tests of
774 the previous change.
775
776 2003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
777
778 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
779 bfd_make_section for existing sections.
780
781 2003-07-04 Alan Modra <amodra@bigpond.net.au>
782
783 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
784 create_got_section if we already have done so.
785 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
786 (sh_elf_check_relocs): Likewise.
787 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
788 htab->root.dynobj instead.
789 (sh_elf_check_relocs): Likewise.
790 (sh_elf_finish_dynamic_sections): Likewise.
791
792 * section.c (bfd_make_section): Return NULL for existing section.
793
794 2003-07-04 Alan Modra <amodra@bigpond.net.au>
795
796 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
797 ppc_elf_create_got if we've already done so.
798
799 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
800 (_bfd_elf_find_pointer_linker_section): Likewise.
801 (bfd_elf32_create_pointer_linker_section): Likewise.
802 (bfd_elf32_finish_pointer_linker_section): Likewise.
803 (bfd_elf64_create_pointer_linker_section): Likewise.
804 (bfd_elf64_finish_pointer_linker_section): Likewise.
805 (_bfd_elf_make_linker_section_rela): Likewise.
806 * elfcode.h (elf_create_pointer_linker_section): Don't define.
807 (elf_finish_pointer_linker_section): Likewise.
808 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
809 (_bfd_elf_create_linker_section): Move this function..
810 (_bfd_elf_find_pointer_linker_section): ..and this..
811 * elflink.h (elf_create_pointer_linker_section): ..and this..
812 (elf_finish_pointer_linker_section): ..and this..
813 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
814 calls.
815 (elf_create_linker_section): Convert to C90, tidy.
816 (elf_find_pointer_linker_section): Likewise.
817 (elf_create_pointer_linker_section): Likewise.
818 (elf_finish_pointer_linker_section): Likewise.
819 * elf32-i370.c: Delete #if 0 code.
820
821 2003-07-02 Alan Modra <amodra@bigpond.net.au>
822
823 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
824 _restf* to be satisfied by shared libs, and always force them local.
825 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
826 Correct test for "bl".
827 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
828 primary opcode 31.
829
830 2003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
831
832 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
833 (s390_tls_reloc): New function.
834 (elf_howto_table): Add long displacement relocations R_390_20,
835 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
836 (elf_s390_reloc_type_lookup): Likewise.
837 (elf_s390_check_relocs): Likewise.
838 (elf_s390_gc_sweep_hook): Likewise.
839 (elf_s390_relocate_section): Likewise.
840 * elf64-s390.c: Same changes as for elf32-s390.c.
841 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
842 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
843 BFD_RELOC_390_TLS_GOTIE20.
844 * bfd-in2.h: Regenerate.
845 * libbfd.h: Likewise.
846
847 2003-06-30 Alan Modra <amodra@bigpond.net.au>
848
849 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
850 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
851
852 2003-06-29 Alan Modra <amodra@bigpond.net.au>
853
854 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
855 Replace PTR with void *. Formatting.
856 * archive64.c: Likewise.
857 * archures.c: Likewise.
858 * bfd-in.h: Likewise.
859 * bfd.c: Likewise.
860 * bfdio.c: Likewise.
861 * bfdwin.c: Likewise.
862 * cache.c: Likewise.
863 * corefile.c: Likewise.
864 * format.c: Likewise.
865 * init.c: Likewise.
866 * libbfd-in.h: Likewise.
867 * libbfd.c: Likewise.
868 * linker.c: Likewise.
869 * opncls.c: Likewise.
870 * reloc.c: Likewise.
871 * section.c: Likewise.
872 * simple.c: Likewise.
873 * syms.c: Likewise.
874 * targets.c: Likewise.
875 * bfd-in2.h: Regenerate.
876 * libbfd.h: Regenerate.
877
878 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
879 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
880 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
881 (bfd_getb64): Rewrite without parens.
882 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
883 * cache.c (insert, snip): Remove INLINE.
884 * linker.c (bfd_link_add_undef): Likewise.
885
886 2003-06-29 Andreas Jaeger <aj@suse.de>
887
888 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
889 unnecessary prototypes. Replace PTR with void *.
890 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
891 trim plt entries. Move undefweak non-default visibility test ...
892 (allocate_dynrelocs): ... from here.
893 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
894 Change all callers.
895 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
896 SYMBOL_REFERENCES_LOCAL for dynreloc check.
897 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
898 dynreloc and .got relocs.
899 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
900 for .got relocs.
901
902 2003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
903
904 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
905
906 2003-06-27 Nick Clifton <nickc@redhat.com>
907
908 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
909 bfd_add_gnu_debuglink_section and only create the section, do not
910 fill in its contents.
911 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
912 contents of a .gnu-debuglink section.
913 * bfd-in2.h: Regenerate.
914
915 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
916
917 * elfxx-mips.c: Revert .got alignment to 2**4.
918
919 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
920
921 * elf32-mips.c: Fix addend for _gp_disp special symbol.
922
923 2003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
924
925 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
926 relocation header setup.
927
928 2003-06-25 Alan Modra <amodra@bigpond.net.au>
929
930 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
931 (ppc_elf_reloc_type_lookup): Modify comment.
932 (ppc_elf_info_to_howto): Ditto.
933 (ppc_elf_relocate_section): Ditto.
934 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
935
936 2003-06-25 Alan Modra <amodra@bigpond.net.au>
937
938 * aout-ns32k.c: Correct spelling of "relocatable".
939 * aoutx.h: Likewise.
940 * bfd-in.h: Likewise.
941 * bfd.c: Likewise.
942 * bout.c: Likewise.
943 * coff-a29k.c: Likewise.
944 * coff-alpha.c: Likewise.
945 * coff-arm.c: Likewise.
946 * coff-i386.c: Likewise.
947 * coff-i860.c: Likewise.
948 * coff-i960.c: Likewise.
949 * coff-m68k.c: Likewise.
950 * coff-m88k.c: Likewise.
951 * coff-mcore.c: Likewise.
952 * coff-mips.c: Likewise.
953 * coff-or32.c: Likewise.
954 * coff-ppc.c: Likewise.
955 * coff-rs6000.c: Likewise.
956 * coff-sh.c: Likewise.
957 * coff-tic80.c: Likewise.
958 * coff64-rs6000.c: Likewise.
959 * cofflink.c: Likewise.
960 * cpu-ns32k.c: Likewise.
961 * ecoff.c: Likewise.
962 * ecofflink.c: Likewise.
963 * elf-bfd.h: Likewise.
964 * elf-eh-frame.c: Likewise.
965 * elf-hppa.h: Likewise.
966 * elf-m10200.c: Likewise.
967 * elf-m10300.c: Likewise.
968 * elf.c: Likewise.
969 * elf32-arm.h: Likewise.
970 * elf32-avr.c: Likewise.
971 * elf32-cris.c: Likewise.
972 * elf32-d10v.c: Likewise.
973 * elf32-dlx.c: Likewise.
974 * elf32-fr30.c: Likewise.
975 * elf32-frv.c: Likewise.
976 * elf32-h8300.c: Likewise.
977 * elf32-hppa.c: Likewise.
978 * elf32-i370.c: Likewise.
979 * elf32-i386.c: Likewise.
980 * elf32-i860.c: Likewise.
981 * elf32-i960.c: Likewise.
982 * elf32-ip2k.c: Likewise.
983 * elf32-iq2000.c: Likewise.
984 * elf32-m32r.c: Likewise.
985 * elf32-m68hc11.c: Likewise.
986 * elf32-m68hc1x.c: Likewise.
987 * elf32-m68k.c: Likewise.
988 * elf32-mcore.c: Likewise.
989 * elf32-mips.c: Likewise.
990 * elf32-msp430.c: Likewise.
991 * elf32-openrisc.c: Likewise.
992 * elf32-ppc.c: Likewise.
993 * elf32-s390.c: Likewise.
994 * elf32-sh.c: Likewise.
995 * elf32-sh64.c: Likewise.
996 * elf32-sparc.c: Likewise.
997 * elf32-v850.c: Likewise.
998 * elf32-vax.c: Likewise.
999 * elf32-xstormy16.c: Likewise.
1000 * elf32-xtensa.c: Likewise.
1001 * elf64-alpha.c: Likewise.
1002 * elf64-hppa.c: Likewise.
1003 * elf64-mips.c: Likewise.
1004 * elf64-mmix.c: Likewise.
1005 * elf64-ppc.c: Likewise.
1006 * elf64-s390.c: Likewise.
1007 * elf64-sh64.c: Likewise.
1008 * elf64-sparc.c: Likewise.
1009 * elf64-x86-64.c: Likewise.
1010 * elfcode.h: Likewise.
1011 * elflink.h: Likewise.
1012 * elfn32-mips.c: Likewise.
1013 * elfxx-ia64.c: Likewise.
1014 * elfxx-mips.c: Likewise.
1015 * i386linux.c: Likewise.
1016 * ieee.c: Likewise.
1017 * libcoff-in.h: Likewise.
1018 * linker.c: Likewise.
1019 * m68klinux.c: Likewise.
1020 * pdp11.c: Likewise.
1021 * pe-mips.c: Likewise.
1022 * peXXigen.c: Likewise.
1023 * reloc.c: Likewise.
1024 * reloc16.c: Likewise.
1025 * sparclinux.c: Likewise.
1026 * sunos.c: Likewise.
1027 * syms.c: Likewise.
1028 * versados.c: Likewise.
1029 * vms.c: Likewise.
1030 * xcofflink.c: Likewise.
1031 * bfd-in2.h: Regenerate.
1032 * libcoff.h: Regenerate.
1033 * libbfd.h: Regenerate.
1034
1035 2003-06-24 Alan Modra <amodra@bigpond.net.au>
1036
1037 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1038 local sym errors.
1039
1040 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1041 prototypes and casts. Replace PTR with void *. Formatting.
1042 * elf32-ppc.c: Likewise. Break long strings too.
1043 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1044 (ppc_elf_unhandled_reloc): Internationalize error message.
1045 * elf32-ppc.h: Remove PARAMS.
1046
1047 2003-06-23 Mark Mitchell <mark@codesourcery.com>
1048
1049 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1050 APUinfo slots.
1051 (ppc_elf_final_write_processing): Likewise.
1052
1053 2003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1054
1055 * elflink.h (elf_link_input_bfd): Check raw size when using
1056 kept_section to preserve debug information discarded by
1057 linkonce.
1058
1059 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1060
1061 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1062 (ppc64_elf_setup_section_lists): Set it.
1063 (ppc64_elf_relocate_section): Check sym section id against top_id.
1064 (ppc_build_one_stub): Comment on top_id.
1065
1066 2003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1067
1068 * config.bfd: Add tic4x-*-rtems*.
1069
1070 2003-06-20 Alan Modra <amodra@bigpond.net.au>
1071
1072 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1073 prototypes and casts. Replace PTR with void *. Format copyright.
1074 Mention ABI links.
1075 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1076 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1077 (ppc_type_of_stub): Make r_type an enum.
1078 (ppc64_elf_size_stubs): Likewise.
1079 * elf64-ppc.h: Remove PARAMS macro.
1080
1081 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1082
1083 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1084 elf hash tab fields.
1085
1086 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1087 (ppc64_elf_info_to_howto): Likewise.
1088 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1089 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1090
1091 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1092
1093 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1094 reloc overflow on discarded eh_frame entries.
1095
1096 2003-06-19 Alan Modra <amodra@bigpond.net.au>
1097
1098 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1099 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1100 Return error condition.
1101 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1102 that have has_gp_reloc set.
1103 (struct ppc_link_hash_table): Add stub_count.
1104 (ppc_build_one_stub): Increment it.
1105 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1106 individual fields.
1107 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1108
1109 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1110
1111 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1112 size calculation from addend. Round size up.
1113
1114 2003-06-18 Hans-Peter Nilsson <hp@axis.com>
1115
1116 * elf32-cris.c (cris_elf_relocate_section) <case
1117 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1118 symbol from a normal object or an undefined weak symbol.
1119
1120 2003-06-18 Alan Modra <amodra@bigpond.net.au>
1121
1122 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1123 R_PPC64_TOC relocs.
1124
1125 2003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1126
1127 * section.c (struct sec): Put back kept_section.
1128 (STD_SECTION): Put back kept_section initialization.
1129 * bfd-in2.h: Regenerate.
1130
1131 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1132 sections for relocateable output. Use kept_section to preserve
1133 debug information discarded by linkonce.
1134
1135 2003-06-17 Roland McGrath <roland@redhat.com>
1136
1137 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1138 segment-relative relocation between different segments.
1139
1140 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1141
1142 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1143 optimizations earlier.
1144
1145 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1146 Restore previous input_list type.
1147 (ppc64_elf_link_hash_table_create): Undo last change.
1148 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1149 per output section, but don't bother with bfd_abs_section marker.
1150 (ppc64_elf_next_input_section): Adjust for multiple input section
1151 lists.
1152 (group_sections): Likewise.
1153
1154 2003-06-17 Jakub Jelinek <jakub@redhat.com>
1155
1156 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1157 *r_offset == r_addend for RELATIVE relocs against .got.
1158
1159 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1160
1161 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1162
1163 2003-06-17 Nick Clifton <nickc@redhat.com>
1164
1165 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
1166 in the vtable_entries_used array to allow for the accessing
1167 the largest element.
1168
1169 2003-06-17 Alan Modra <amodra@bigpond.net.au>
1170
1171 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1172 input_list.
1173 (ppc64_elf_link_hash_table_create): Init input_list here.
1174 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1175 per output section. Set toc_off for abs and other standard sections.
1176 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1177 (ppc64_elf_next_input_section): Adjust for single input section list.
1178 Don't set toc_curr from input bfds that haven't set elf_gp.
1179 (group_sections): Adjust for single input section list.
1180
1181 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1182
1183 2003-06-16 Alan Modra <amodra@bigpond.net.au>
1184
1185 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1186 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1187 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1188 got section for RELATIVE relocs. Fix wrong comment. Change condition
1189 under which dynamic relocs update the section contents.
1190
1191 2003-06-13 Robert Millan <zeratul2@wanadoo.es>
1192
1193 * config.bfd: Add i386-netbsd-gnu target.
1194
1195 2003-06-12 Nick Clifton <nickc@redhat.com>
1196
1197 * opncls.c (calc_crc32): Rename to
1198 bfd_calc_gnu_debuglink_crc32 and export.
1199 (GNU_DEBUGLINK): Define and use to replace occurrences of
1200 hard-coded ".gnu_debuglink" in the code.
1201 (get_debug_link_info): Prevent aborts by replacing call to
1202 xmalloc with a call to malloc.
1203 (find_separate_debug_file): Prevent aborts by replacing calls
1204 to xmalloc and xstrdup with calls to malloc and strdup.
1205 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
1206 section to a bfd.
1207 * bfd-in2.h: Regenerate.
1208
1209 2003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
1210
1211 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1212 New target (was i[3-7]86-*-openbsd* before).
1213 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1214 (vax-*-openbsd*): New target.
1215
1216 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1217
1218 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1219 for n32, too.
1220 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1221 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1222 (mips_elf_create_got_section): Likewise.
1223 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1224
1225 2003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1226
1227 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1228 (elf_mips_howto_table_rel): Use it.
1229 (gprel32_with_gp): Move prototype.
1230 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1231 Use mips_elf_generic_reloc.
1232 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1233 Code cleanup.
1234 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1235 zero addend.
1236 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1237 as in the other *_gprel*_reloc functions.
1238 (gprel32_with_gp): Handle partial_inplace properly.
1239 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1240 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1241 Do addend handling directly instead of calling
1242 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1243 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1244 of zero addend. Handle partial_inplace properly.
1245 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1246 addend.
1247 (mips_elf64_gprel16_reloc): Likewise.
1248 (mips_elf64_literal_reloc): Likewise.
1249 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1250 logic as in the other *_gprel*_reloc functions. Handle
1251 partial_inplace properly.
1252 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1253 addend. Handle partial_inplace properly.
1254 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1255 of calling _bfd_mips_elf_gprel16_with_gp.
1256 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1257 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1258 of zero addend.
1259 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1260 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1261 of calling _bfd_mips_elf_gprel16_with_gp.
1262 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1263 partial_inplace properly. Fix wrong addend handling. Fix overflow
1264 check.
1265 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1266 exported.
1267 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1268 (_bfd_mips_elf_relocate_section): Likewise.
1269 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1270 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1271 (_bfd_mips_elf_sign_extend): New prototype.
1272
1273 2003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
1274
1275 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1276 New target (was sparc-*-openbsd* before).
1277 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
1278
1279 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1280 * configure: Regenerate.
1281
1282 2003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1283
1284 * po/Make-in (DESTDIR): New.
1285 (install-data-yes): Support $(DESTDIR).
1286 (uninstall): Likewise.
1287
1288 2003-06-11 Alan Modra <amodra@bigpond.net.au>
1289
1290 * Makefile.am (config.status): Depend on version.h.
1291 Run "make dep-am".
1292 * Makefile.in: Regenerate.
1293 * po/SRC-POTFILES.in: Regenerate.
1294
1295 2003-06-10 Alan Modra <amodra@bigpond.net.au>
1296 Gary Hade <garyhade@us.ibm.com>
1297
1298 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1299
1300 2003-06-10 Richard Sandiford <rsandifo@redhat.com>
1301
1302 * archures.c (bfd_mach_h8300sxn): New architecture.
1303 * bfd-in2.h: Regenerate.
1304 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1305 (h8300sxn_info_struct): New.
1306 (h8300sx_info_struct): Link to it.
1307 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1308 (elf32_h8_final_write_processing): Likewise.
1309
1310 2003-06-08 Alan Modra <amodra@bigpond.net.au>
1311
1312 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1313 elfxx-target.h so that we can use elf_backend_got_header_size.
1314 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1315 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1316 associated macros.
1317 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1318 dst_mask.
1319 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1320 ppc_stub_plt_branch_r2off.
1321 (struct ppc_stub_hash_entry): Reorganize.
1322 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1323 toc_curr, toc_off and emit_stub_syms.
1324 (ppc64_elf_link_hash_table_create): Init them.
1325 (ppc_stub_name): Correct string size.
1326 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1327 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1328 used.
1329 (ppc_type_of_stub): Tweak root.type test.
1330 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1331 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1332 ppc_stub_plt_branch_r2off.
1333 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1334 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1335 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1336 Initialize elf_gp and toc_curr.
1337 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1338 (ppc64_elf_next_input_section): Set toc_off.
1339 (group_sections): Ensure groups have the same TOC.
1340 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1341 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1342 Build new glink stub.
1343 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1344 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1345 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1346 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1347 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1348 (STD_SECTION): Update.
1349 * ecoff.c (bfd_debug_section): Update comment.
1350 * bfd-in2.h: Regenerate.
1351
1352 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1353
1354 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1355 NULL function pointers.
1356
1357 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
1358
1359 * simple.c (bfd_simple_get_relocated_section_contents): Call
1360 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1361
1362 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1363
1364 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1365 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1366 swaptables.
1367 * coff-tic4x.c: Ditto
1368 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1369 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
1370 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1371 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1372 swap tables.
1373 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1374 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1375 * coff-apollo.c: Ditto
1376 * coff-arm.c: Ditto
1377 * coff-h8300.c: Ditto
1378 * coff-h8500.c: Ditto
1379 * coff-i960.c: Ditto
1380 * coff-m68k.c: Ditto
1381 * coff-m88k.c: Ditto
1382 * coff-mcore.c: Ditto
1383 * coff-sh.c: Ditto
1384 * coff-sparc.c: Ditto
1385 * coff-tic80.c: Ditto
1386 * coff-we32k.c: Ditto
1387 * coff-z8k.c: Ditto
1388 * coff-w65.c: Ditto
1389
1390 2003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1391
1392 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1393 initialization bug
1394
1395 2003-06-03 Jakub Jelinek <jakub@redhat.com>
1396
1397 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1398 (bfd_section_from_phdr): Likewise.
1399 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1400 (get_program_header_size): Count with PT_GNU_STACK.
1401 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1402 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1403
1404 2003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1405
1406 * elflink.h (elf_link_input_bfd): Call linker error_handler
1407 for discarded definitions.
1408
1409 2003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1410
1411 * syms.c (decode_section_type): Return 'n' if section flags are
1412 SEC_HAS_CONTENTS && SEC_READONLY.
1413
1414 2003-06-03 Nick Clifton <nickc@redhat.com>
1415
1416 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1417 R_V850_ABS32. Add entry for R_V850_REL32.
1418 (v850_elf_reloc_map): Likewise.
1419 (v850_elf_check_relocs): Likewise.
1420 (v850_elf_perform_relocation): Likewise.
1421 (v850_elf_final_link_relocate): Likewise. Include computation
1422 to make R_V850_REl32 pc-relative.
1423
1424 2003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1425
1426 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1427 and DT_DEBUG dynamic tag even for position independent executables.
1428 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1429
1430 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1431
1432 * config.bfd: Move obsolete entries out of the range of the
1433 targmatch sed script.
1434
1435 2003-06-02 Daniel Jacobowitz <drow@mvista.com>
1436
1437 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1438
1439 2003-05-31 Jakub Jelinek <jakub@redhat.com>
1440
1441 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1442 plt entries, not just 8191.
1443
1444 2003-05-30 Daniel Jacobowitz <drow@mvista.com>
1445
1446 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1447 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1448
1449 2003-05-30 Ulrich Drepper <drepper@redhat.com>
1450 Jakub Jelinek <jakub@redhat.com>
1451
1452 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1453 instead of info->shared where appropriate.
1454 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1455 * elflink.c (_bfd_elf_create_got_section): Likewise.
1456 (_bfd_elf_link_create_dynamic_sections): Likewise.
1457 (_bfd_elf_link_assign_sym_version): Likewise.
1458 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1459 and DT_DEBUG dynamic tag even for position independent executables.
1460 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1461 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1462 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1463 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1464 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1465 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1466 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1467 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1468 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1469
1470 2003-05-30 Kris Warkentin <kewarken@qnx.com>
1471
1472 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1473 signalled thread.
1474 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1475
1476 2003-05-29 Nick Clifton <nickc@redhat.com>
1477
1478 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1479 Tidy up formatting.
1480 * Makefile.am: Add dependency on safe-ctype.h.
1481 * Makefile.in: Regenerate.
1482
1483 2003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1484
1485 * elfxx-mips.c: Don't force symbols local unconditionally.
1486
1487 2003-05-28 Alan Modra <amodra@bigpond.net.au>
1488
1489 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1490 undefined_symbol call.
1491
1492 2003-05-27 Richard Sandiford <rsandifo@redhat.com>
1493
1494 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1495 (mips_elf_link_hash_table): Likewise.
1496
1497 2003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1498
1499 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1500 R_MIPS_GNU_REL16_S2 support.
1501 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1502 (mips_elf64_rtype_to_howto): Use it.
1503 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1504 R_MIPS_GNU_REL16_S2 support.
1505 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1506 (mips_elf_n32_rtype_to_howto): Use it.
1507
1508 2003-05-21 Stuart F. Downing <sdowning@fame.com>
1509
1510 * som.h: Define PA_2_0 before including a.out.h
1511
1512 2003-05-07 Eric Christopher <echristo@redhat.com>
1513 Alexandre Oliva <aoliva@redhat.com>
1514
1515 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1516 pic tests, change to warning.
1517 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1518
1519 2003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1520
1521 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1522 well as shle-...-netbsdelf. Remove duplicate entry.
1523
1524 2003-05-21 Nick Clifton <nickc@redhat.com>
1525
1526 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1527 for X_STORMY16_REL_12 reloc.
1528
1529 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
1530 the type of the hash table in the bfd_link_info structure.
1531 (bfd_elf_get_runpath_list): Likewise.
1532
1533 2003-05-19 Roland McGrath <roland@redhat.com>
1534
1535 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1536 * bfd-in.h: Declare it.
1537 * bfd-in2.h: Regenerated.
1538 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1539 * elf-bfd.h (struct elf_backend_data): New function pointer member
1540 elf_backend_bfd_from_remote_memory.
1541 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1542 Declare them.
1543 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1544 (elfNN_bed): Add that to the initializer.
1545
1546 2003-05-15 Roland McGrath <roland@redhat.com>
1547
1548 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1549
1550 2003-05-20 Jakub Jelinek <jakub@redhat.com>
1551
1552 * elflink.h (elf_link_output_extsym): Only issue error about !=
1553 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1554
1555 2003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1556
1557 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1558 when removing the old definition for symbols with non-default
1559 visibility.
1560
1561 2003-05-18 Jason Eckhardt <jle@rice.edu>
1562
1563 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1564
1565 2003-05-17 Andreas Schwab <schwab@suse.de>
1566
1567 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1568 elf_section_data during processing of pc-relative and absolute
1569 relocations.
1570 (elf_m68k_relocate_section): Use the cached reloc section instead
1571 of computing it again. Fix handling of visibility. Don't modify
1572 addend when copying over a relocation into the output.
1573
1574 2003-05-17 Alan Modra <amodra@bigpond.net.au>
1575
1576 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1577 to trim plt entries. Move undefweak non-default visibility test..
1578 (allocate_dynrelocs): ..from here.
1579 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1580 dynamic_sections_created here. Update comment. Move undefweak
1581 non-default visibility test..
1582 (allocate_dynrelocs): ..from here. Fix comment.
1583 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1584 to trim plt entries. Move undefweak non-default visibility test..
1585 (allocate_dynrelocs): ..from here. Fix comment.
1586 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1587 STV_DEFAULT rather than comparing with zero.
1588 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1589 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1590
1591 2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1592
1593 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1594 pointers.
1595 (_bfd_set_gp_value): Likewise.
1596
1597 2003-05-16 Michael Snyder <msnyder@redhat.com>
1598 From Bernd Schmidt <bernds@redhat.com>
1599 * archures.c (bfd_mach_h8300sx): New.
1600 * bfd-in2.h: Regenerate.
1601 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1602 (h8300sx_info_struct): New.
1603 (h8300s_info_struct): Link to it.
1604 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1605 (elf32_h8_final_write_processing): Likewise.
1606 (elf32_h8_relax_section): Likewise.
1607
1608 2003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1609
1610 * config.bfd: Accept i[3-7]86 variants.
1611 * configure.host: Likewise.
1612 * configure.in: Likewise.
1613 * configure: Regenerate.
1614
1615 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1616
1617 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1618 symbol.
1619
1620 2003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1621
1622 * elflink.h (elf_link_check_versioned_symbol): Also allow
1623 the base version.
1624
1625 2003-05-15 Alan Modra <amodra@bigpond.net.au>
1626 H.J. Lu <hongjiu.lu@intel.com>
1627
1628 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1629 (elf_i386_relocate_section): Likewise.
1630 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1631 (ppc_elf_relocate_section): Likewise.
1632 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1633 (ppc64_elf_relocate_section): Likewise.
1634
1635 2003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1636
1637 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1638
1639 2003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1640
1641 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1642 processor capability, allow merge of HC12 and HCS12 in some cases.
1643 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1644 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1645 (bfd_m68hc12_arch): Link it.
1646 (scan_mach): New function.
1647
1648 2003-05-13 Andrew Haley <aph@redhat.com>
1649
1650 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1651
1652 2003-05-13 Alan Modra <amodra@bigpond.net.au>
1653 H.J. Lu <hongjiu.lu@intel.com>
1654
1655 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1656 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1657 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1658 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1659 (ppc_elf_relocate_section): Likewise.
1660 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1661 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1662 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1663 relocs need no other types.
1664 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1665 dynreloc check.
1666 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1667 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1668 .got relocs.
1669
1670 2003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1671
1672 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1673 copy ELF_LINK_NON_GOT_REF from weakdef.
1674 (allocate_dynrelocs): For undef weak syms with non-default
1675 visibility, a) don't allocate plt entries, b) don't allocate
1676 .got relocs, c) discard dyn rel space
1677 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1678 don't generate dynamic relocs.
1679 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1680 for weakdefs when symbol already adjusted.
1681
1682 2003-05-12 Nick Clifton <nickc@redhat.com>
1683
1684 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1685 overflow detection for R_XSTORMY16_16 reloc.
1686
1687 2003-05-12 Paul Clarke <paulc@senet.com.au>
1688
1689 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1690
1691 2003-05-11 Jason Eckhardt <jle@rice.edu>
1692
1693 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1694 adjust upper bits.
1695 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1696 proper place.
1697 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1698 proper place.
1699
1700 2003-05-11 Andreas Schwab <schwab@suse.de>
1701
1702 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1703 complicated tests for unresolvable relocs with a simple direct
1704 scheme using "unresolved_reloc" var. Report some detail on
1705 bfd_reloc_outofrange and similar errors.
1706
1707 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1708
1709 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1710 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1711 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1712 * elf64-s390.c: Likewise.
1713
1714 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1715
1716 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1717 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1718 ELF_LINK_NON_GOT_REF from weakdef.
1719 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1720 already been adjusted before treating it specially.
1721 * el64-s390.c: Likwise.
1722
1723 2003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1724
1725 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1726 non-default visibility, a) don't make them dynamic, b) discard
1727 space for dynamic relocs.
1728 (elf_s390_relocate_section): Initialize the GOT entries and skip
1729 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1730 symbols with non-default visibility.
1731 * elf64-s390.c: Likewise.
1732
1733 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1734
1735 * cpu-arm.c (arm_check_note): Warning fix.
1736 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1737 to keep relocs if edited.
1738 (iq2000_elf_print_private_bfd_data): Return TRUE.
1739 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1740 ELF64_R_SYM.
1741 (elfNN_ia64_relax_ldxmov): Warning fix.
1742 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1743 * xtensa-modules.c (get_num_opcodes): Warning fix.
1744
1745 2003-05-09 Andrey Petrov <petrov@netbsd.org>
1746
1747 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1748
1749 2003-05-09 Alan Modra <amodra@bigpond.net.au>
1750
1751 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1752 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1753 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1754 (bfd_elf_record_link_assignment): Move from elflink.h.
1755 (_bfd_elf_merge_symbol): Likewise.
1756 (_bfd_elf_add_default_symbol): Likewise.
1757 (_bfd_elf_export_symbol): Likewise.
1758 (_bfd_elf_link_find_version_dependencies): Likewise.
1759 (_bfd_elf_link_assign_sym_version): Likewise.
1760 (_bfd_elf_link_read_relocs): Likewise.
1761 (_bfd_elf_link_size_reloc_section): Likewise.
1762 (_bfd_elf_fix_symbol_flags): Likewise.
1763 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1764 (_bfd_elf_link_sec_merge_syms): Likewise.
1765 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1766 and bed->s->sizeof_rela.
1767 (_bfd_elf_link_output_relocs): Likewise.
1768 * elf-bfd.h (struct elf_size_info): Rename file_align to
1769 log_file_align.
1770 (struct elf_info_failed): Move from elflink.h.
1771 (struct elf_assign_sym_version_info): Likewise.
1772 (struct elf_find_verdep_info): Likewise.
1773 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1774 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1775 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1776 _bfd_elf_link_assign_sym_version,
1777 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1778 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1779 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1780 _bfd_elf_link_sec_merge_syms): Declare.
1781 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1782 (_bfd_elf32_link_read_relocs): Likewise.
1783 (bfd_elf64_link_create_dynamic_sections): Likewise.
1784 (_bfd_elf64_link_read_relocs): Likewise.
1785 * elflink.h: Move lots o' stuff elsewhere.
1786 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1787 (bfd_elf64_record_link_assignment): Likewise.
1788 (bfd_elf_record_link_assignment): Declare.
1789 * bfd-in2.h: Regenerate.
1790 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1791 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1792 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1793 (assign_file_positions_for_segments): Likewise.
1794 (assign_file_positions_except_relocs): Likewise.
1795 (swap_out_syms, elfcore_write_note): Likewise.
1796 * elf-m10200.c: Adjust for changed function names.
1797 * elf-m10300.c: Likewise.
1798 * elf32-arm.h: Likewise.
1799 * elf32-h8300.c: Likewise.
1800 * elf32-hppa.c: Likewise.
1801 * elf32-ip2k.c: Likewise.
1802 * elf32-m32r.c: Likewise.
1803 * elf32-m68hc11.c: Likewise.
1804 * elf32-m68hc1x.c: Likewise.
1805 * elf32-m68k.c: Likewise.
1806 * elf32-mips.c: Likewise.
1807 * elf32-ppc.c: Likewise.
1808 * elf32-sh.c: Likewise.
1809 * elf32-v850.c: Likewise.
1810 * elf32-xtensa.c: Likewise.
1811 * elf64-alpha.c: Likewise.
1812 * elf64-hppa.c: Likewise.
1813 * elf64-mmix.c: Likewise.
1814 * elf64-ppc.c: Likewise.
1815 * elf64-sh64.c: Likewise.
1816 * elfxx-ia64.c: Likewise.
1817 * elfxx-mips.c: Likewise.
1818 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1819 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1820 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1821 * elf64-mips.c (mips_elf64_size_info): Likewise.
1822 * elf64-s390.c (s390_elf64_size_info): Likewise.
1823 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1824
1825 2003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1826
1827 * elflink.h (elf_add_default_symbol): After skipping the
1828 unversioned symbol, go to non-default one.
1829
1830 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1831
1832 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1833 want_plt field.
1834 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1835 for symbols with non-default visibility.
1836
1837 2003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1838
1839 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1840 case that a DSO references a hidden symbol which may be
1841 satisfied by a versioned symbol in another DSO.
1842 (elf_link_output_extsym): Check versioned definition for hidden
1843 symbol referenced by a DSO.
1844
1845 2003-05-07 Nick Clifton <nickc@redhat.com>
1846
1847 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1848 R_XSTORMY16_16 reloc to ignore overflows.
1849
1850 2003-05-06 Alexandre Oliva <aoliva@redhat.com>
1851
1852 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1853 error message for mixing different-endian files. Check for ABI
1854 compatibility of input files with the selected emulation.
1855
1856 2003-05-05 Alan Modra <amodra@bigpond.net.au>
1857
1858 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1859 non-default visibility, a) don't make them dynamic, b) discard
1860 space for dynamic relocs.
1861 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1862
1863 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1864 non-default visibility, a) don't allocate plt entries, b) don't
1865 allocate .got relocs, c) discard dyn rel space,
1866 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1867 don't generate dynamic relocs.
1868 * elf64-ppc.c (allocate_dynrelocs): As above.
1869 (ppc64_elf_relocate_section): As above.
1870
1871 2003-05-05 Andreas Jaeger <aj@suse.de>
1872
1873 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1874 relocation entries for weak undefined symbols with non-default
1875 visibility.
1876 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1877 skip R_386_32/R_386_PC32 for weak undefined symbols with
1878 non-default visibility.
1879
1880 2003-05-04 H.J. Lu <hjl@gnu.org>
1881
1882 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1883 relocation entries for weak undefined symbols with non-default
1884 visibility.
1885 (elf_i386_relocate_section): Initialize the GOT entries and
1886 skip R_386_32/R_386_PC32 for weak undefined symbols with
1887 non-default visibility.
1888
1889 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1890 descriptors for weak undefined symbols with non-default
1891 visibility.
1892 (allocate_dynrel_entries): Don't allocate relocation entries
1893 for symbols resolved to 0.
1894 (set_got_entry): Don't install dynamic relocation for weak
1895 undefined symbols with non-default visibility.
1896 (set_pltoff_entry): Likewise.
1897
1898 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1899 with non-default visibility.
1900 (elf_link_output_extsym): Don't make weak undefined symbols
1901 with non-default visibility dynamic.
1902
1903 2003-05-04 H.J. Lu <hjl@gnu.org>
1904
1905 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1906
1907 2003-05-04 H.J. Lu <hjl@gnu.org>
1908
1909 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1910 symbol dynamic. Check indirection when removing the old
1911 definition for symbols with non-default visibility.
1912 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1913
1914 2003-05-02 Nick Clifton <nickc@redhat.com>
1915
1916 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1917 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1918 unsigned overflow.
1919
1920 2003-05-02 Andreas Jaeger <aj@suse.de>
1921
1922 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1923 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1924 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1925 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1926 ELF_LINK_NON_GOT_REF from weakdef.
1927
1928 2003-05-02 Charles Lepple <clepple@ghz.cc>
1929 Nick Clifton <nickc@redhat.com>
1930
1931 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1932 * aclocal.m4: Regenerate.
1933 * configure: Regenerate.
1934 * Makefile.in: Regenerate.
1935
1936 2003-05-01 Alan Modra <amodra@bigpond.net.au>
1937
1938 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1939 weakdef sym has already been adjusted before treating it specially.
1940 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1941 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1942 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1943 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
1944
1945 2003-04-28 H.J. Lu <hjl@gnu.org>
1946
1947 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1948 the relax finalize pass.
1949
1950 * section.c (struct sec): Add need_finalize_relax and remove
1951 flag11.
1952 (STD_SECTION): Update struct sec initializer.
1953 * bfd-in2.h: Regenerated.
1954
1955 2003-04-28 H.J. Lu <hjl@gnu.org>
1956
1957 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1958 to copy any information related to dynamic linking when we flip
1959 the indirection.
1960
1961 2003-04-27 H.J. Lu <hjl@gnu.org>
1962
1963 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1964 (ELF_LINK_DYNAMIC_WEAK): New.
1965
1966 * elflink.h (elf_merge_symbol): Add one argument to indicate if
1967 a symbol should be skipped. Ignore definitions in dynamic
1968 objects for symbols with non-default visibility.
1969 (elf_add_default_symbol): Adjusted.
1970 (elf_link_add_object_symbols): Check if a symbol should be
1971 skipped. Don't merge the visibility field with the one from
1972 a dynamic object.
1973 (elf_link_check_versioned_symbol): Use undef_bfd.
1974 (elf_link_output_extsym): Warn if a forced local symbol is
1975 referenced from dynamic objects. Make non-weak undefined symbol
1976 with non-default visibility a fatal error.
1977
1978 2003-04-27 Daniel Jacobowitz <drow@mvista.com>
1979
1980 * configure.in: Bump version on HEAD to 2.14.90.
1981 * configure: Regenerated.
1982
1983 2003-04-26 Stephane Carrez <stcarrez@nerim.fr>
1984
1985 PR savannah/3331:
1986 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1987 when we couldn't relax something.
1988
1989 2003-04-25 Alan Modra <amodra@bigpond.net.au>
1990
1991 * elflink.h (elf_merge_symbol): When we find a regular definition
1992 for an indirect symbol, flip the indirection so that the old
1993 direct symbol now points to the new definition.
1994
1995 2003-04-24 Roland McGrath <roland@redhat.com>
1996
1997 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1998
1999 2003-04-24 Alan Modra <amodra@bigpond.net.au>
2000
2001 * elf32-ppc.c: Formatting and comment fixes.
2002 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2003 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2004
2005 2003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
2006
2007 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2008 * bfd-in2.h: Rebuilt.
2009 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
2010 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
2011 & H8300SNMAGIC.
2012 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2013 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2014 (h8300sn_info_struct, h8300hn_info_struct): New.
2015 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2016 (elf32_h8_final_write_processing): Likewise.
2017
2018 2003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2019
2020 * elf32-sh.c (tpoff): New.
2021 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2022 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2023 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
2024 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
2025 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
2026 (dtpoff_base): Fix wrong indentation.
2027 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2028 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2029 R_SH_TLS_TPOFF32 relocations.
2030
2031 2003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2032
2033 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2034 * cpu-sh.c: Likewise.
2035 * elf32-sh.c: Likewise.
2036 * reloc.c (bfd_reloc_code_real): Likewise.
2037 * elf32-sh64-com.c: Change comment to refer to SuperH.
2038 * elf32-sh64.c: Likewise.
2039 * elf64-sh64.c: Likewise.
2040 * bfd-in2.h (enum bfd_architecture): Regenerate.
2041
2042 2003-04-23 Alan Modra <amodra@bigpond.net.au>
2043
2044 From Julien LEMOINE <speedblue@debian.org>
2045 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2046 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2047
2048 2003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2049
2050 * archures.c: Replace references to Mitsubishi M32R with references
2051 to Renesas M32R.
2052 * relocs.c: Likewise.
2053 * bfd-in2.h: Regenerate.
2054
2055 2003-04-21 Richard Henderson <rth@redhat.com>
2056
2057 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2058 executable when a symbol is defined both regular and dynamic.
2059
2060 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2061
2062 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2063 (elf32-m68hc1x.lo): Update dependencies
2064 * configure.in: Add elf32-m68hc1x.lo.
2065 * configure: Rebuild.
2066 * Makefile.in: Rebuild.
2067
2068 2003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2069
2070 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2071 (m68hc11_elf_hash_table_create): New function.
2072 (elf32_m68hc11_link_hash_table_free): New function.
2073 (stub_hash_newfunc): New function.
2074 (m68hc11_add_stub): New function.
2075 (elf32_m68hc11_add_symbol_hook): New function.
2076 (elf32_m68hc11_setup_section_lists): New function.
2077 (elf32_m68hc11_next_input_section): New function.
2078 (elf32_m68hc11_size_stubs): New function.
2079 (elf32_m68hc11_build_stubs): New function.
2080 (m68hc11_get_relocation_value): New function.
2081 (elf32_m68hc11_relocate_section): Call the above to redirect
2082 some relocations to the trampoline code.
2083 (m68hc11_elf_export_one_stub): New function.
2084 (m68hc11_elf_set_symbol): New function.
2085 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2086 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2087 is not yet initialized.
2088
2089 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2090 (elf32_m68hc11_stub_hash_entry): New struct.
2091 (m68hc11_page_info): Add trampoline handler address.
2092 (m68hc11_elf_link_hash_table): Add stubs generation members.
2093 (elf32_m68hc11_add_symbol_hook): Declare.
2094 (elf32_m68hc11_setup_section_lists): Declare.
2095 (elf32_m68hc11_size_stubs): Declare.
2096 (elf32_m68hc11_build_stubs): Declare.
2097
2098 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2099 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2100 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2101 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2102 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2103 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2104 (bfd_elf32_bfd_link_hash_table_create): Define.
2105 (elf_backend_add_symbol_hook): Define.
2106 (m68hc11_elf_bfd_link_hash_table_create): New function.
2107 (m68hc11_elf_build_one_stub): New function.
2108 (m68hc11_elf_size_one_stub): New function.
2109 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2110 (bfd_elf32_bfd_link_hash_table_create): Define.
2111
2112 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2113 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2114 (m68hc12_phys_addr): Ditto.
2115 (m68hc12_phys_page): Ditto.
2116 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2117 (elf32_m68hc11_gc_mark_hook): Likewise.
2118 (elf32_m68hc11_gc_sweep_hook): Likewise.
2119 (elf32_m68hc11_check_relocs): Likewise.
2120 (elf32_m68hc11_relocate_section): Likewise.
2121 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2122 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2123 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2124 (m68hc12_elf_build_one_stub): New function.
2125 (m68hc12_elf_size_one_stub): New function.
2126 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2127 (elf_backend_add_symbol_hook): Define.
2128 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2129
2130 2003-04-18 Nick Clifton <nickc@redhat.com>
2131
2132 * format.c (bfd_check_format_matches): Only check associated
2133 vector if the matching_vector has been created.
2134
2135 2003-04-15 Alexandre Oliva <aoliva@redhat.com>
2136
2137 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2138 2003-04-09's change.
2139
2140 2003-04-15 Brian Ford <ford@vss.fsi.com>
2141
2142 * peicode.h (coff_swap_scnhdr_in): If a section holds
2143 uninitialized data and is from an object file or from an
2144 executable image that has not initialized the s_size field, or if
2145 the physical size is padded, use the virtual size (stored in
2146 s_paddr) instead.
2147
2148 2003-04-15 H.J. Lu <hjl@gnu.org>
2149
2150 * elflink.h (elf_link_add_object_symbols): Properly report
2151 filename for alignment reduction.
2152
2153 2003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2154
2155 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2156 * reloc.c: Likewise.
2157 * coff-h8300.c: Likewise.
2158 * coff-h8500.c: Likewise.
2159 * coff-sh.c: Likewise.
2160 * cpu-h8300.c: Likewise.
2161 * cpu-sh.c: Likewise.
2162 * elf32-h8300.c: Likewise.
2163 * elf32-sh.c: Likewise.
2164 * elf32-sh64-com.c: Likewise.
2165 * elf32-sh64.c: Likewise.
2166 * elf64-sh64.c: Likewise.
2167 * bfd-in2.h: Regenerate.
2168
2169 2003-04-14 H.J. Lu <hjl@gnu.org>
2170
2171 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2172 alignment for common symbols. Warn reducing alignment for
2173 common symbols. Report old filename when symbol size changes.
2174
2175 2003-04-12 Alexandre Oliva <aoliva@redhat.com>
2176
2177 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2178 occurrences of the same test changed in the previous patch.
2179 Optimize.
2180
2181 2003-04-11 Alexandre Oliva <aoliva@redhat.com>
2182
2183 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2184 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2185 GOT_DISP/addend only if the symbol got a global GOT entry.
2186
2187 2003-04-10 Alexandre Oliva <aoliva@redhat.com>
2188
2189 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2190 GOT_PAGE/GOT_OFST referencing overridable symbol to
2191 GOT_DISP/addend.
2192 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2193 global symbol as GOT_DISP.
2194
2195 2003-04-10 Bob Wilson <bob.wilson@acm.org>
2196
2197 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2198 next relocation on an undefined symbol.
2199
2200 2003-04-09 Richard Henderson <rth@redhat.com>
2201
2202 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2203 Ignore relocations against r_symndx == 0.
2204
2205 2003-04-09 H.J. Lu <hjl@gnu.org>
2206
2207 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2208 FALSE for undefined symbols.
2209 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2210
2211 2003-04-09 Alexandre Oliva <aoliva@redhat.com>
2212
2213 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2214 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2215 addr_size.
2216
2217 2003-04-08 Alexandre Oliva <aoliva@redhat.com>
2218
2219 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2220 pointer size from ABI, not arch_bits_per_address.
2221
2222 2003-04-07 Kevin Buettner <kevinb@redhat.com>
2223
2224 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2225 constants for n32 ABI.
2226
2227 2003-04-06 Andrew Cagney <cagney@redhat.com>
2228
2229 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2230 free that leads to GDB vs BFD memory corruption.
2231
2232 2003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2233
2234 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2235 symbols that mark the end of the section.
2236 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2237 converting to a relative branch so that the offset is computed after
2238 the relaxation; also relocate a jsr into a bsr if possible but don't
2239 relax them if they are to a far symbol as we need to call the
2240 trampoline code.
2241 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2242
2243 2003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2244
2245 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2246 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2247 * bfd-in2.h: Regenerate
2248 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2249 * cpu-tic4x.c: Ditto
2250
2251 2003-04-03 Nick Clifton <nickc@redhat.com>
2252
2253 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2254 differently for object files and executables.
2255 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2256 for object files or for executables who have not already
2257 initialised the field.
2258 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2259 the PE format bfd is an executable.
2260
2261 2003-04-03 Alan Modra <amodra@bigpond.net.au>
2262
2263 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2264 here as it's too early to reliably determine locality.
2265 (ppc_elf_gc_sweep_hook): Likewise.
2266 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2267
2268 2003-04-02 Bob Wilson <bob.wilson@acm.org>
2269
2270 * xtensa-modules.c: Remove comment indicating that this is a
2271 generated file.
2272
2273 2003-04-02 Alan Modra <amodra@bigpond.net.au>
2274
2275 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2276
2277 2003-04-01 Bob Wilson <bob.wilson@acm.org>
2278
2279 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2280 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2281 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2282 xtensa-modules.lo.
2283 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2284 xtensa-modules.c.
2285 (cpu-xtensa.lo): New target.
2286 (elf32-xtensa.lo): Likewise.
2287 (xtensa-isa.lo): Likewise.
2288 (xtensa-modules.lo): Likewise.
2289 * Makefile.in: Regenerate.
2290 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2291 (bfd_archures_list): Add bfd_xtensa_arch.
2292 * config.bfd: Handle xtensa-*-*.
2293 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2294 * configure: Regenerate.
2295 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2296 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2297 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2298 (bfd_elf32_xtensa_le_vec): Likewise.
2299 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2300 * cpu-xtensa.c: New file.
2301 * elf32-xtensa.c: Likewise.
2302 * xtensa-isa.c: Likewise.
2303 * xtensa-modules.c: Likewise.
2304 * libbfd.h: Regenerate.
2305 * bfd-in2.h: Likewise.
2306
2307 2003-04-01 Nick Clifton <nickc@redhat.com>
2308
2309 * archures.c (bfd_mach_arm_unknown): Define.
2310 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2311 bfd_arm_get_mach_from_notes): Prototype.
2312 * bfd-in2.h: Regenerate.
2313 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2314 bfd_arm_merge_machines.
2315 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2316 * coffcode.h (coff_set_arch_mach_hook): Call
2317 bfd_arm_get_mach_from_notes.
2318 * coffgen.c (coff_real_object_p): Revert previous delta.
2319 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2320 .note section.
2321 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2322 binaries compiled for different architectures..
2323 (bfd_arm_update_notes): New function: Update an ARM note section.
2324 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2325 number from an ARM note section.
2326 * elf32-arm.h (elf32_arm_object_p): Use
2327 bfd_arm_get_mach_from_notes.
2328 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2329 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
2330
2331 2003-04-01 Ben Elliston <bje@wasabisystems.com>
2332
2333 * dwarf2.c (read_attribute_value): Correct typo in comment.
2334
2335 2003-04-01 Nick Clifton <nickc@redhat.com>
2336
2337 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2338 instead of concat().
2339 (decode_line_info): Only free filename if it is not NULL.
2340 (add_line_info): Make a copy of the filename when storing it into
2341 the info structure.
2342
2343 2003-03-31 Andreas Schwab <schwab@suse.de>
2344 Daniel Jacobowitz <drow@mvista.com>
2345
2346 * simple.c (bfd_simple_get_relocated_section_contents): Add
2347 parameter symbol_table. Optionally use it instead of the symbol
2348 table from the bfd. Save and restore output offsets and output
2349 sections around bfd_get_relocated_section_contents. Fix a memory
2350 leak.
2351 (simple_save_output_info, simple_restore_output_info): New
2352 functions.
2353 * bfd-in2.h: Regenerate.
2354 * dwarf2.c (read_abbrevs): Use
2355 bfd_simple_get_relocated_section_contents instead of
2356 bfd_get_section_contents.
2357 (decode_line_info): Likewise.
2358 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2359 find_rela_addend.
2360 (find_rela_addend): Remove.
2361 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2362 debugging sections.
2363 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2364 not bfd_zalloc.
2365
2366 2003-03-31 David Heine <dlheine@suif.stanford.edu>
2367
2368 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2369 bfd_alloc.
2370 * dwarf2.c (concat_filename): Always allocate space for the
2371 returned filename.
2372 (decode_line_info): Free the allocated filename returned by
2373 concat_filename.
2374 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2375 * elf.c (copy_private_bfd_data): Likewise.
2376 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2377 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2378 * format.c (bfd_check_format_matches): Likewise.
2379 * linker.c (bfd_generic_final_link): Likewise.
2380 * opncls.c (find_separate_debug_info): Likewise.
2381 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
2382
2383 2003-03-28 H.J. Lu <hjl@gnu.org>
2384
2385 * elflink.h (elf_link_add_object_symbols): Correctly combine
2386 visibilities.
2387
2388 2003-03-27 Jakub Jelinek <jakub@redhat.com>
2389
2390 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2391 to -1 before recomputing got offsets.
2392
2393 2003-03-26 Andreas Schwab <schwab@suse.de>
2394
2395 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2396 (elf_m68k_relocate_section): Use it to correctly handle symbols
2397 forced to be local.
2398 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2399 entries for symbols that are forced to be local.
2400
2401 2003-03-25 Alexandre Oliva <aoliva@redhat.com>
2402
2403 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2404 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2405 * elfn32-mips.c, elf64-mips.c: Use it.
2406
2407 2003-03-25 Stan Cox <scox@redhat.com>
2408 Nick Clifton <nickc@redhat.com>
2409
2410 Contribute support for Intel's iWMMXt chip - an ARM variant:
2411
2412 * archures.c: Add bfd_mach_arm_iWMMXt.
2413 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2414 * bfd-in2.h: Regenerate.
2415 * libbfd.h: Regenerate.
2416 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2417 object files to be linked with XScale ones.
2418 (coff_arm_final_link_postscript): Update note section.
2419 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2420 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2421 after identifying a coff binary.
2422 * cpu-arm.c (processors): Add iWMMXt.
2423 (arch_inf): Likewise.
2424 * elf32-arm.h (arm_object_p): Handle note section.
2425 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
2426 be linked with XScale ones.
2427 (elf32_arm_section_flags): New function: Set flags on note section.
2428 (elf32_arm_final_write_processing): Handle note section.
2429
2430 2003-03-21 DJ Delorie <dj@redhat.com>
2431
2432 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2433 _bfd_elf_rela_local_sym.
2434
2435 2003-03-20 H.J. Lu <hjl@gnu.org>
2436
2437 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2438 non-ELF outputs.
2439
2440 2003-03-20 Nick Clifton <nickc@redhat.com>
2441
2442 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2443 $idata5 in case bfd_coff_final_link is not called.
2444
2445 2003-03-19 Jakub Jelinek <jakub@redhat.com>
2446
2447 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2448 field.
2449 (canon_reloc_count): Define.
2450 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2451 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2452 reloc_count.
2453 (sparc64_elf_canonicalize_reloc): New routine.
2454 (bfd_elf64_canonicalize_reloc): Define.
2455
2456 2003-03-18 Jakub Jelinek <jakub@redhat.com>
2457
2458 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2459 againt mergeable sections. Take r_addend into account when caching
2460 trampolines.
2461
2462 2003-03-18 Richard Henderson <rth@redhat.com>
2463
2464 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2465 local symbols that have no dyninfo.
2466
2467 2003-03-14 Gene Smith <gene.smith@siemens.com>
2468
2469 * ieee.c (ieee_write_expression): Handle the case where symbol is
2470 NULL.
2471 General formatting improvements.
2472
2473 2003-03-13 Nick Clifton <nickc@redhat.com>
2474
2475 * configure.in (LINGUAS): Add zh_CN.
2476 * configure: Regenerate.
2477 * po/zh_CN.po: New file.
2478
2479 2003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2480
2481 * aout-cris.c (BYTES_IN_WORD): Don't define.
2482 aout-encap.c: Likewise.
2483 aout-ns32k.c: Likewise.
2484 aout-tic30.c: Likewise.
2485 hp300bsd.c: Likewise.
2486 i386aout.c: Likewise.
2487 i386dynix.c: Likewise.
2488 i386linux.c: Likewise.
2489 i386lynx.c: Likewise.
2490 i386mach3.c: Likewise.
2491 m68k4knetbsd.c: Likewise.
2492 m68klinux.c: Likewise.
2493 m68klynx.c: Likewise.
2494 m68knetbsd.c: Likewise.
2495 m88kmach3.c: Likewise.
2496 mipsbsd.c: Likewise.
2497 newsos3.c: Likewise.
2498 sparclinux.c: Likewise.
2499 sparclynx.c: Likewise.
2500 sparcnetbsd.c: Likewise.
2501 vaxbsd.c: Likewise. Fix comment formatting.
2502
2503 2003-03-12 Alexandre Oliva <aoliva@redhat.com>
2504
2505 * Reverted 2003-03-02's patch.
2506
2507 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2508 overridable.
2509 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2510 mips_elf64_get_dynamic_reloc_upper_bound,
2511 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2512 (bfd_elf64_get_canonicalize_reloc,
2513 bfd_elf64_get_dynamic_reloc_upper_bound,
2514 bfd_elf64_canonicalize_dynamic_reloc): Define.
2515 (mips_elf64_slurp_reloc_table): Support dynamic.
2516 (mips_elf64_slurp_one_reloc_table): Adjust.
2517
2518 2003-03-12 Nick Clifton <nickc@redhat.com>
2519
2520 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2521 'index' to 'offset' in test for zero value.
2522
2523 2003-03-11 Alexandre Oliva <aoliva@redhat.com>
2524
2525 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2526 dynamic relocations pointing to local or section symbols, use the
2527 NULL symbol instead. Document the choice to not emit an
2528 additional R_MIPS_64 relocation.
2529
2530 2003-03-11 Alan Modra <amodra@bigpond.net.au>
2531
2532 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2533 zero index dynamic tls relocs generated for the GOT. Tidy code.
2534 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2535 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2536
2537 2003-03-07 Alan Modra <amodra@bigpond.net.au>
2538
2539 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2540 a tls_get_addr call.
2541
2542 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2543 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2544 ELF_LINK_NON_GOT_REF from weakdef.
2545 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2546 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2547 ELF_LINK_NON_GOT_REF from weakdef.
2548 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2549 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2550 ELF_LINK_NON_GOT_REF from weakdef.
2551
2552 2003-03-06 Jakub Jelinek <jakub@redhat.com>
2553 Andrew Haley <aph@redhat.com>
2554
2555 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2556 output is relocateable.
2557
2558 2003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2559
2560 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2561 R_COMMENT.
2562
2563 2003-03-06 Alan Modra <amodra@bigpond.net.au>
2564
2565 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2566 error messages.
2567 (ELIMINATE_COPY_RELOCS): Define to zero.
2568 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2569 TLSLD relocs. Report reloc types on a number of errors. Optimize
2570 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2571 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2572 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2573 calculating TLSLD relocs. Report reloc types on a number of errors.
2574 Don't capitalize error messages.
2575
2576 2003-03-03 H.J. Lu <hjl@gnu.org>
2577
2578 * elfxx-ia64.c (USE_BRL): Removed.
2579 (oor_ip): Removed.
2580
2581 2003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
2582
2583 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2584 relocation (no special function), and make it non-partial_inplace.
2585 (sh_elf_relax_section): When creating a bsr, use a consistent value
2586 no matter if the symbol is extern or not; set addend to -4.
2587 Don't swap load / non-load instructions for SH4.
2588 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2589 rather than if the symbol is external to determine if adjusting the
2590 offset makes sense. Adjust the addend too if appropriate.
2591 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2592 relocation.
2593
2594 2003-03-03 Nick Clifton <nickc@redhat.com>
2595
2596 * po/da.po: Installed latest translation.
2597
2598 2003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2599
2600 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2601 R_MIPS_PC16 to rightshift 2.
2602 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2603 (bfd_elf32_bfd_reloc_type_lookup): Support
2604 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2605 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2606 R_MIPS_PC16 to rightshift 2.
2607 (mips_elf64_howto_table_rela): Likewise.
2608 (mips_reloc_map): Map to rightshifted BFD reloc.
2609 * elfn32-mips.c: The same as in elf64-mips.c.
2610 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2611 (mips_elf_calculate_relocation): Handle rightshifted addends for
2612 R_MIPS_PC16.
2613 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2614 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2615 * libbfd.h: Regenerate.
2616 * bfd-in2.h: Regenerate.
2617
2618 2003-02-28 Richard Henderson <rth@redhat.com>
2619
2620 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2621 for ltoff22x relaxation.
2622
2623 2003-03-01 Alan Modra <amodra@bigpond.net.au>
2624
2625 * bfd-in.h (_bfd): Don't define.
2626 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2627 * syms.c: Likewise.
2628 * bfd-in2.h: Regenerate.
2629
2630 2003-02-27 Richard Henderson <rth@redhat.com>
2631
2632 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2633 (elfNN_ia64_check_relocs): Set it.
2634 (allocate_global_data_got): Check it.
2635 (allocate_local_got): Likewise.
2636 (allocate_dynrel_entries): Likewise.
2637 (elfNN_ia64_relax_ldxmov): New.
2638 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2639 (elfNN_ia64_choose_gp): Split out from ...
2640 (elfNN_ia64_final_link): ... here.
2641
2642 2003-02-27 Andrew Cagney <cagney@redhat.com>
2643
2644 * bfd.c (struct bfd): Rename "struct _bfd".
2645 * bfd-in.h: Update copyright.
2646 (struct bfd): Rename "struct _bfd".
2647 (_bfd): Define for backward compatibility.
2648 * bfd-in2.h: Regenerate.
2649
2650 2003-02-25 Alan Modra <amodra@bigpond.net.au>
2651
2652 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2653 and rel_hdr2 when initially counting input relocs rather than after
2654 creating output reloc sections.
2655 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2656 sizes.
2657
2658 * Makefile.am: Run "make dep-am".
2659 * Makefile.in: Regenerate.
2660
2661 2003-02-24 Kris Warkentin <kewarken@qnx.com>
2662
2663 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2664 (elfcore_grog_nto_note): New function.
2665 (elfcore_grog_nto_gregs): New function.
2666 (elfcore_grog_nto_status): New function.
2667
2668 2003-02-24 Alan Modra <amodra@bigpond.net.au>
2669
2670 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2671 section flags before concluding that we've already been called.
2672 Don't use register keyword.
2673 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2674 (_bfd_elf_create_linker_section): Formatting.
2675
2676 2003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2677
2678 * coff-h8300.c: Fix typo: intial -> initial.
2679 * coff-ppc.c: Likewise.
2680
2681 2003-02-20 Alan Modra <amodra@bigpond.net.au>
2682
2683 * elf32-ppc.c: Formatting.
2684 (allocate_dynrelocs): LD and GD relocs against the same sym need
2685 separate GOT entries.
2686 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2687 entries per symbol.
2688
2689 2003-02-19 Alan Modra <amodra@bigpond.net.au>
2690
2691 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2692 removal. Localize vars. Remove unnecessary dynobj test.
2693 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2694 of INFO.
2695 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2696 and optimize.
2697 (elf_i386_relocate_section): Likewise.
2698 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2699 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2700 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2701 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2702 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2703 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2704 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2705 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2706 Formatting.
2707
2708 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2709 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2710 test.
2711 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2712 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2713 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2714 and optimize. Use ELIMINATE_COPY_RELOCS.
2715 (ppc64_elf_relocate_section): Likewise.
2716
2717 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2718 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2719 (ELIMINATE_COPY_RELOCS): Define.
2720 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2721 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2722 (MUST_BE_DYN_RELOC): Define.
2723 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2724 and optimize. Trim dyn_relocs.
2725 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2726 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2727 track of pc_rel dyn relocs.
2728 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2729 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2730 allocate_dynrelocs. Don't recalculate "sec".
2731
2732 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2733
2734 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2735 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2736 on invalid LD relocs.
2737 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2738 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2739 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2740
2741 * elf32-ppc.h: New file.
2742 * elf32-ppc.c: Include elf32-ppc.h.
2743 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2744 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2745 Add "tls_mask" field.
2746 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2747 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2748 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2749 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2750 Make use of htab shortcuts throughout file.
2751 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2752 (ppc_elf_link_hash_table_create): Init new fields.
2753 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2754 (ppc_elf_howto_raw): Add tls relocs.
2755 (ppc_elf_reloc_type_lookup): Handle them.
2756 (ppc_elf_unhandled_reloc): New function.
2757 (ppc_elf_create_got): Stash got section pointer in hash table,
2758 return status. Make .rela.got too.
2759 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2760 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2761 NON_GOT_REF set. Don't allocate space in .plt here..
2762 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2763 not allocating plt entries unnecessarily. Allocate got entries here.
2764 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2765 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2766 "info" during allocate_dynrelocs hash traversal. Use htab section
2767 shortcuts rather than searching for named sections. Get rid of
2768 "plt" and "strip" booleans.
2769 (update_local_sym_info, bad_shared_reloc): New functions.
2770 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2771 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2772 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2773 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2774 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2775 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2776 relocs that might use a plt entry. Set NON_GOT_REF too.
2777 Enumerate all do-nothing relocs.
2778 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2779 tls relocs and all plt relocs.
2780 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2781 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2782 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2783 shortcuts.
2784 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2785 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2786 entries and got relocs here. Warn on non-zero got reloc addend.
2787 Split out branch taken/not taken reloc code into a separate switch
2788 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2789 Split out HA reloc adjustments to separate switch statement. Don't
2790 warn on reloc overflow if we've already warned about undefined.
2791 Don't rebuild sym name when reporting errors. Report all possible
2792 errors from _bfd_final_link_relocate.
2793 (bfd_elf32_bfd_final_link): Don't define.
2794
2795 2003-02-18 Alan Modra <amodra@bigpond.net.au>
2796
2797 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2798 rebuild sym name when reporting errors.
2799
2800 2003-02-17 Nick Clifton <nickc@redhat.com>
2801
2802 * elflink.h (elf_link_output_extsym): Only check
2803 allow_shlib_undefined for shared libraries.
2804 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2805 of allow_shlib_undefined.
2806 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2807 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2808 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2809 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2810 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2811 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2812 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2813 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2814 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2815 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2816 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2817 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2818 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2819 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2820 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2821 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2822
2823 2003-02-17 Nick Clifton <nickc@redhat.com>
2824
2825 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2826 address field to use in the comparison.
2827 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
2828
2829 2003-02-14 Bob Wilson <bob.wilson@acm.org>
2830
2831 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2832 backends when checking if the generic ELF target should be used.
2833
2834 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2835 outside of functions, treat values as absolute addresses.
2836
2837 * bfd.c: Change embedded documentation to use consistent indentation
2838 and to split up long lines. Change informal style of description
2839 for functions lacking real documentation.
2840 * coffcode.h: Break up long lines in embedded documentation.
2841 * format.c: Likewise.
2842 * targets.c: Likewise.
2843 * libcoff.h: Regenerate.
2844 * bfd-in2.h: Regenerate.
2845
2846 2003-02-14 Alan Modra <amodra@bigpond.net.au>
2847
2848 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2849 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2850 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2851 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2852 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2853 (group_sections): Don't share a stub section if stubs are for a large
2854 section. Adjust comment.
2855 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2856 !stubs_always_before_branch.
2857 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2858 treat undefined and undefweak specially when processing dyn relocs.
2859
2860 2003-02-13 Jakub Jelinek <jakub@redhat.com>
2861
2862 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2863
2864 2003-02-13 Nick Clifton <nickc@redhat.com>
2865
2866 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2867 in computation of offset to insert into BL instruction.
2868
2869 2003-02-11 Uwe Stieber <uwe@wwws.de>
2870
2871 * config.bfd: Add support for kaOS as cross build target system.
2872
2873 2003-02-11 Alan Modra <amodra@bigpond.net.au>
2874
2875 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2876 .__tls_get_addr too.
2877 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2878
2879 2003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2880
2881 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2882 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2883 (sh_elf_link_hash_newfunc): Remove the initialization of
2884 tls_tpoff32 field.
2885 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2886 for which tls_tpoff32 flag is set.
2887 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2888 of the symbol includes the entry matched with the input_section
2889 and having tls_tpoff32 flag on. When linking statically, set
2890 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2891 is defined in this executable.
2892 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2893
2894 2003-02-10 Jakub Jelinek <jakub@redhat.com>
2895
2896 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2897 even if there is just non-empty .rela.plt.
2898
2899 2003-02-10 Nick Clifton <nickc@redhat.com>
2900
2901 * archures.c (bfd_mach_arm_ep9312): Define.
2902 * bfd-in2.h: Regenerate.
2903 * cpu-arm.c (processors[]): Add ep9312.
2904 (bfd_arm_arch): Add ep9312.
2905 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2906 messages and add test for Maverick floating point support.
2907 (elf32_arm_print_private_bfd_data): Handle
2908 EF_ARM_MAVERICK_FLOAT flag.
2909 (elf32_arm_object_p): New function.
2910 (elf_backend_object_p): Define.
2911
2912 2003-02-10 Alan Modra <amodra@bigpond.net.au>
2913
2914 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2915 variables, structure fields or function params to tls_mask or
2916 similar to better reflect usage.
2917 (struct got_entry): Comment.
2918 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
2919 (get_tls_mask): Rename from get_tls_type.
2920
2921 2003-02-09 Alan Modra <amodra@bigpond.net.au>
2922
2923 * elf64-ppc.c (TLS_GD_LD): Don't define..
2924 (TLS_GD): ..define this instead and update all uses.
2925 (TLS_TPRELGD): Define.
2926 (ppc64_elf_link_hash_table_create): Tweak initialization of
2927 init_refcount and init_offset.
2928 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2929 Mark second slot of GD or LD toc entries.
2930 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2931 from other tls types.
2932 (ppc64_elf_tls_setup): New function, split out from..
2933 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2934 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2935 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2936 return value to properly decide whether toc GD and LD entries can
2937 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2938 to determine GD or LD rather than looking at TLS_LD flag. Don't
2939 attempt to adjust got entry tls_type here..
2940 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2941 look for possible merges.
2942 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2943 optimization.
2944 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2945 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2946 Make use of return value from get_tls_type to properly detect GD and
2947 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2948 handle tls_get_addr removal when looking at REL24 relocs, do it when
2949 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2950 GD or LD.
2951 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2952
2953 2003-02-08 Alan Modra <amodra@bigpond.net.au>
2954
2955 * elf32-hppa.c (group_sections): Don't share a stub section if
2956 stubs are for a large section.
2957
2958 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2959 stubs if !stubs_always_before_branch.
2960
2961 2003-02-07 Nick Clifton <nickc@redhat.com>
2962
2963 * elf.c (swap_out_syms): Generate an error message if an
2964 equivalent output section cannot be found for a symbol.
2965
2966 2003-02-07 Jakub Jelinek <jakub@redhat.com>
2967
2968 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2969 local_got_entries is NULL.
2970
2971 2003-02-06 Andreas Schwab <schwab@suse.de>
2972
2973 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2974 (read_value): Add parameter is_signed, use signed extraction if
2975 the value is signed.
2976 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2977 encoding to read_value.
2978
2979 2003-02-06 Alan Modra <amodra@bigpond.net.au>
2980
2981 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2982 plt info when called to transfer weak sym info.
2983
2984 2003-02-05 Alan Modra <amodra@bigpond.net.au>
2985
2986 * reloc.c: Add PPC and PPC64 TLS relocs.
2987 * libbfd.h: Regenerate.
2988 * bfd-in2.h: Regenerate.
2989 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2990 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
2991 against a 32 bit field.
2992 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2993 (_ppc64_elf_section_data): Add t_symndx and comments.
2994 (ppc64_elf_section_data): Use elf_section_data macro.
2995 (ppc64_elf_new_section_hook): American spelling.
2996 (struct got_entry, struct plt_entry): New.
2997 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2998 (struct ppc_stub_hash_entry): Add "addend" field.
2999 (struct ppc_link_hash_entry): Add "tls_type".
3000 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3001 TLS_EXPLICIT): Define.
3002 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3003 (link_hash_newfunc): Init new fields.
3004 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
3005 init_offset to NULL.
3006 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3007 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3008 there.
3009 (update_local_sym_info, update_plt_info): New functions.
3010 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3011 handling to use got.glist rather than got.refcount. Likewise for PLT.
3012 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3013 (func_desc_adjust): Adjust for new PLT list.
3014 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3015 (get_sym_h, get_tls_type): New functions.
3016 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3017 (ppc64_elf_tls_optimize): New function.
3018 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3019 TLS relocs.
3020 (ppc64_elf_size_dynamic_sections): Likewise.
3021 (ppc_type_of_stub): Adjust for new PLT list.
3022 (ppc_build_one_stub): Likewise.
3023 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3024 calls specially.
3025 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3026 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3027 init GOT entries that have a reloc. Generate GOT relocs here..
3028 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3029 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3030
3031 2003-02-04 Andreas Schwab <schwab@suse.de>
3032
3033 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3034 (elf_m68k_link_hash_traverse): Remove.
3035 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3036 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3037 reduce casting.
3038 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3039 casting.
3040 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3041 instead of elf_m68k_link_hash_traverse.
3042 (elf_m68k_discard_copies): Change first parameter to pointer to
3043 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3044 elf_m68k_link_hash_entry is needed.
3045
3046 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3047
3048 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3049 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3050 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3051 "plt" field.
3052 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3053 Add "init_offset" field.
3054 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3055 (elf_local_got_ents): Declare.
3056 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3057 and "plt".
3058 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3059 (_bfd_elf_link_hash_table_init): Set "init_offset".
3060 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3061 from init_offset.
3062 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3063
3064 * elf.c (bfd_elf_local_sym_name): Split out from..
3065 (group_signature): ..here.
3066 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3067
3068 2003-02-04 Alan Modra <amodra@bigpond.net.au>
3069
3070 * elf-bfd.h (enum elf_link_info_type): Remove.
3071 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3072 to struct sec. Remove linkonce_p field.
3073 (elf_linkonce_p): Delete.
3074 (elf_discarded_section): Update for sec_info_type change.
3075 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3076 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3077 (ELF_INFO_TYPE_NONE): Define.
3078 (ELF_INFO_TYPE_STABS): Define.
3079 (ELF_INFO_TYPE_MERGE): Define.
3080 (ELF_INFO_TYPE_EH_FRAME): Define.
3081 (ELF_INFO_TYPE_JUST_SYMS): Define.
3082 (STD_SECTION): Update struct sec initializer.
3083 * ecoff.c (bfd_debug_section): Likewise.
3084 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3085 * elflink.h: Likewise.
3086 * elf-eh-frame.c: Likewise.
3087 * elf64-alpha.c: Likewise.
3088 * elfxx-ia64.c: Likewise.
3089 * elfxx-mips.c: Likewise.
3090 * bfd-in2.h: Regenerate.
3091
3092 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3093 referring to used_by_bfd.
3094 * elf64-sparc.c (sec_do_relax): Likewise.
3095 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3096 * elfxx-mips.c (mips_elf_section_data): Likewise.
3097 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3098 (ieee_get_section_contents): Likewise.
3099 (ieee_new_section_hook): Formatting.
3100 (ieee_canonicalize_reloc): Remove commented out code.
3101 * mmo.c (mmo_section_data): Define. Use throughout file.
3102 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3103
3104 2003-01-31 Graydon Hoare <graydon@redhat.com>
3105
3106 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3107 * Makefile.in: Regenerate.
3108 * opncls.c (calc_crc32, get_debug_link_info,
3109 seperate_debug_file_exists, find_seperate_debug_file): New
3110 internal functions.
3111 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3112 contained inside a .gnu_debuglink section.
3113 * bfd-in2.h: Regenerate.
3114
3115 2003-01-29 Alexandre Oliva <aoliva@redhat.com>
3116
3117 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3118 entry->abfd when it's NULL.
3119
3120 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3121
3122 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3123 _bfd_elf_section_offset returning -2 the same way as -1.
3124
3125 * elfxx-mips.c (mips_elf_multi_got): New function.
3126 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3127 addend into union along with address and link hash entry.
3128 (struct mips_got_info): Added bfd2got and next.
3129 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3130 (mips_elf_got_section, mips_elf_create_got_section): Use
3131 SEC_EXCLUDE bit to tell whether we really need the got
3132 section. Take boolean arguments to disregard an excluded
3133 section, or to create it as excluded. Adjust all callers.
3134 Use mips_elf_got_section all over.
3135 (mips_elf_local_got_index, mips_elf_got_page,
3136 mips_elf_got16_entry): Take input bfd as argument, and pass it
3137 on to mips_elf_create_local_got_entry.
3138 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3139 Take input bfd as argument, and manage entries in the
3140 appropriate GOT.
3141 (mips_elf_got_offset_from_index): Take input bfd as argument,
3142 and use it to adjust the GP offset of the bfd.
3143 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3144 unreferenced GOT entries of global symbols to the end.
3145 (mips_elf_record_global_got_symbol): Take input bfd as
3146 argument. Add entries to the master GOT hash table.
3147 (struct mips_elf_bfd2got_hash): New.
3148 (struct mips_elf_got_per_bfd_arg): New.
3149 (struct mips_elf_set_global_got_offset_arg): New.
3150 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3151 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3152 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3153 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3154 mips_elf_resolve_final_got_entry,
3155 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3156 mips_elf_got_for_ibfd): New functions.
3157 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3158 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3159 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3160 (mips_elf_got_entry_hash): Take new fields into account. Use
3161 mips_elf_hash_bfd_vma.
3162 (mips_elf_got_entry_eq): Take new fields into account.
3163 (mips_elf_create_got_section): Initialize new fields.
3164 (mips_elf_calculate_relocation): Pass input_bfd to functions
3165 that now take it. Adjust gp for the input_bfd.
3166 (mips_elf_allocate_dynamic_relocation,
3167 mips_elf_create_dynamic_relocation,
3168 _bfd_mips_elf_create_dynamic_sections): Use...
3169 (mips_elf_rel_dyn_section): New function. Borrow code from...
3170 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3171 now take it. Create the got section if needed, even if
3172 excluded, before recording a global got symbol. Move some
3173 code to...
3174 (mips_elf_record_local_got_symbol): New fn.
3175 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3176 Compute multi-got global entries offsets. Move GOT code to...
3177 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3178 if the GOT is too big.
3179 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3180 undefweak symbol to zero. Generate dynamic relocations for
3181 non-primary GOT entries for global symbols.
3182 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3183 case. Generate dynamic relocations for local got entries.
3184 Sort dynamic relocations on N64 too, using...
3185 (sort_dynamic_relocs_64): New fns.
3186 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3187 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3188
3189 2003-01-27 Alexandre Oliva <aoliva@redhat.com>
3190
3191 * bfd.c (struct _bfd): Added id field.
3192 * opncls.c (_bfd_id_counter): New static variable.
3193 (_bfd_new_bfd): Use it.
3194 * bfd-in2.h: Rebuilt.
3195
3196 2003-01-25 Alan Modra <amodra@bigpond.net.au>
3197
3198 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3199
3200 2003-01-25 Jakub Jelinek <jakub@redhat.com>
3201
3202 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3203 (elf32_sparc_rev32_howto): New variable.
3204 (sparc_reloc_map): Add TLS relocs.
3205 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3206 Handle REV32.
3207 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3208 New functions.
3209 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3210 struct elf32_sparc_link_hash_table):
3211 New structures.
3212 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3213 elf32_sparc_hash_table): Define.
3214 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3215 create_got_section, elf32_sparc_create_dynamic_sections,
3216 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3217 functions.
3218 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3219 reference counting.
3220 (elf32_sparc_gc_sweep_hook): Likewise.
3221 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3222 (elf32_sparc_size_dynamic_sections): Likewise.
3223 (elf32_sparc_relocate_section): Likewise.
3224 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3225 New functions.
3226 (elf32_sparc_object_p): Allocate backend private object data.
3227 (bfd_elf32_bfd_link_hash_table_create,
3228 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3229 elf_backend_can_refcount): Define.
3230 (elf_backend_create_dynamic_sections): Define to
3231 elf32_sparc_create_dynamic_sections.
3232 * reloc.c: Add SPARC TLS relocs.
3233 * bfd-in2.h, libbfd.h: Rebuilt.
3234 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3235 (sparc_reloc_map): Likewise.
3236
3237 2003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3238
3239 * bfd-in2.h: Regenerate.
3240 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3241 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3242 (elf_howto_table): Add TLS relocs.
3243 (elf_s390_reloc_type_lookup): Likewise.
3244 (elf_s390_link_hash_entry): Add tls_type.
3245 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3246 New macros.
3247 (elf_s390_link_hash_table): Add tls_ldm_got.
3248 (link_hash_newfunc): Initialize tls_type.
3249 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3250 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3251 (elf_s390_check_relocs): Support TLS relocs.
3252 (elf_s390_gc_sweep_hook): Likewise.
3253 (allocate_dynrelocs): Likewise.
3254 (elf_s390_size_dynamic_sections): Likewise.
3255 (elf_s390_relocate_section): Likewise.
3256 (elf_s390_finish_dynamic_symbol): Likewise.
3257 (bfd_elf32_mkobject): Define for TLS.
3258 * elf64-s390.c: Same changes as for elf32-s390.c.
3259 * libbfd.h: Regenerate.
3260 * reloc.c: Add s390 TLS relocations.
3261
3262 2003-01-24 Charles Lepple <clepple@ghz.cc>
3263
3264 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3265
3266 2003-01-23 Nick Clifton <nickc@redhat.com>
3267
3268 * Add sh2e support:
3269 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
3270 * archures.c (bfd_mach_sh2e): Added.
3271 * bfd-in2.h: Rebuilt.
3272 * cpu-sh.c (arch_info_struct): Added SH2e.
3273 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
3274
3275 2003-01-23 Alan Modra <amodra@bigpond.net.au>
3276
3277 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3278 dynindx to an int. Rearrange for better packing.
3279 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3280 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3281 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3282 (struct _sh64_elf_section_data): New struct.
3283 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3284 * elf32-sh64-com.c: Include elf32-sh64.h.
3285 * elf32-sh64.c: Likewise.
3286 (sh64_elf_new_section_hook): New function.
3287 (bfd_elf32_new_section_hook): Define.
3288 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3289 (sh64_bfd_elf_copy_private_section_data): Likewise.
3290 (sh64_elf_final_write_processing): Likewise.
3291 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3292 (elf32_sparc_new_section_hook): New function.
3293 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3294 (sec_do_relax): Define.
3295 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3296 (elf32_sparc_relocate_section): Likewise.
3297 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3298 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3299 (mmix_elf_section_data): Define. Use throughout file.
3300 (mmix_elf_new_section_hook): New function.
3301 (bfd_elf64_new_section_hook): Define.
3302 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3303 (ppc64_elf_section_data): Define. Use throughout.
3304 (ppc64_elf_new_section_hook): New function.
3305 (bfd_elf64_new_section_hook): Define.
3306 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3307 (sparc64_elf_new_section_hook): New function.
3308 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3309 (sec_do_relax): Define.
3310 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3311 (sparc64_elf_relocate_section): Likewise.
3312 (bfd_elf64_new_section_hook): Define.
3313 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3314 * elfxx-mips.c (struct _mips_elf_section_data): New.
3315 (mips_elf_section_data): Define. Use throughout.
3316 (_bfd_mips_elf_new_section_hook): New function.
3317 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3318 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3319 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3320 * Makefile.am: Run "make dep-am".
3321 * Makefile.in: Regenerate.
3322
3323 2003-01-21 Richard Henderson <rth@redhat.com>
3324
3325 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3326 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3327 (elf64_alpha_adjust_dynamic_symbol): Set them.
3328 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3329 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3330 symbol index when relaxing LDM to TPREL.
3331 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3332 relocs, even if the target isn't locally defined.
3333 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3334 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3335 relocs vs symndx 0 to the tp base.
3336
3337 2003-01-21 Fabio Alemagna <falemagn@aros.org>
3338
3339 * config.bfd: Handle i[3456]86-*-aros*.
3340
3341 2003-01-21 Andreas Schwab <schwab@suse.de>
3342
3343 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3344 (struct ppc_elf_link_hash_entry): Define.
3345 (ppc_elf_hash_entry): New function.
3346 (struct ppc_elf_link_hash_table): Define.
3347 (ppc_elf_hash_table): New function.
3348 (ppc_elf_link_hash_newfunc): New function.
3349 (ppc_elf_link_hash_table_create): New function.
3350 (ppc_elf_copy_indirect_symbol): New function.
3351 (allocate_dynrelocs): New function.
3352 (readonly_dynrelocs): New function.
3353 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3354 relocs and determine DT_TEXTREL.
3355 (ppc_elf_check_relocs): Don't do that here, just count the
3356 dynamic relocs.
3357 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3358 removed section.
3359 (bfd_elf32_bfd_link_hash_table_create): Define.
3360 (elf_backend_copy_indirect_symbol): Define.
3361
3362 2003-01-21 Richard Henderson <rth@redhat.com>
3363
3364 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3365 TPREL also get a reloc if shared. Remove SREL support.
3366 (elf64_alpha_emit_dynrel): New.
3367 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
3368 and GOTTPREL relocs to local symbols against the tp base.
3369 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3370
3371 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3372 use count before clobbering r_type.
3373 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3374 ordering would mean dataflow inspection is necessary.
3375
3376 2003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3377
3378 * coffcode.h (coff_set_flags): Added get/set arch hooks.
3379
3380 2003-01-20 Fabio Alemagna <falemagn@aros.org>
3381
3382 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3383 elfxx-target.h and #undef it before #define'ing it.
3384 * elf32-i386.c: Likewise.
3385 * elf32-sh64.c: Likewise.
3386 * elf64-alpha.c: Likewise.
3387 * elf64-sh64.c: Likewise.
3388
3389 2003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3390
3391 * bfd-in2.h: Regenerate.
3392 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3393 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3394 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3395 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3396 R_390_PLTOFF32 and R_390_PLTOFF64.
3397 (elf_s390_reloc_type_lookup): Likewise.
3398 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3399 of GOTPLT references to a function.
3400 (link_hash_newfunc): Initialize gotplt_refcount.
3401 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3402 and creation of the got section out of the main switch. Add support
3403 for the gotoff, gotplt and pltoff relocations.
3404 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3405 and pltoff.
3406 (elf_s390_adjust_gotplt): New function.
3407 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3408 plt entries.
3409 (allocate_dynrelocs): Add comment.
3410 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3411 for gotoff, gotplt and pltoff relocations.
3412 * elf64-s390.c: Same changes as for elf32-s390.c.
3413 * libbfd.h: Regenerate.
3414 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3415 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3416 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3417 and BFD_RELOC_390_PLTOFF64.
3418
3419 2003-01-18 Jakub Jelinek <jakub@redhat.com>
3420
3421 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3422 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3423
3424 2003-01-16 Jakub Jelinek <jakub@redhat.com>
3425
3426 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3427 self_dtpmod_done and self_dtpmod_offset.
3428 (allocate_global_data_got): Only use one got entry for all
3429 dtpmod relocs against local symbols.
3430 (allocate_dynrel_entries): Only need .rela.got entry for
3431 dtpmod against global symbol.
3432 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3433 Reserve space in .rela.got for the local dtpmod entry.
3434 (set_got_entry): Initialize the common local dtpmod .got entry.
3435 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3436 and R_IA_64_DTPREL64MSB.
3437
3438 2003-01-16 Alan Modra <amodra@bigpond.net.au>
3439
3440 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3441 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3442 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3443 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3444 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3445 relative relocs, not with absolute ones.
3446 * Makefile.am: Run "make dep-am".
3447 * Makefile.in: Regenerate.
3448 * po/SRC-POTFILES.in: Regenerate.
3449
3450 2003-01-15 Andreas Schwab <schwab@suse.de>
3451
3452 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3453 relocation against a non-allocated readonly section.
3454
3455 2003-01-10 Alan Modra <amodra@bigpond.net.au>
3456
3457 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3458 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3459
3460 2002-01-08 Klee Dienes <kdienes@apple.com>
3461
3462 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3463 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3464 * Makefile.in: Regenerate.
3465
3466 2003-01-08 Alexandre Oliva <aoliva@redhat.com>
3467
3468 * elfn32-mips.c (prev_reloc_section): New.
3469 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3470 (SET_RELOC_ADDEND): Parenthesize macro argument.
3471
3472 2003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3473
3474 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3475 adjust addil instructions if the symbol has no section.
3476
3477 2003-01-07 DJ Delorie <dj@redhat.com>
3478
3479 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3480 partial_inplace.
3481
3482 2003-01-07 Andreas Schwab <schwab@suse.de>
3483
3484 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3485 PC relative relocations.
3486 (elf_m68k_discard_copies): Set it here instead.
3487
3488 2002-01-02 Ben Elliston <bje@redhat.com>
3489 Jeff Johnston <jjohnstn@redhat.com>
3490
3491 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3492 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3493 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3494 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3495 (cpu-iq2000.lo): New target.
3496 * Makefile.in: Regenerate.
3497 * config.bfd: Handle iq2000-*-elf.
3498 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3499 (bfd_archures_list): Add bfd_iq2000_arch.
3500 * configure.in: Handle bfd_elf32_iq2000_vec.
3501 * configure: Regenerate.
3502 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
3503 and BFD_RELOC_IQ2000_UHI16.
3504 * targets.c (bfd_elf32_iq2000_vec): Declare.
3505 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3506 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3507 * cpu-iq2000.c: New file.
3508 * elf32-iq2000.c: Likewise.
3509 * libbfd.h: Regenerate.
3510 * bfd-in2.h: Likewise.
3511
3512 2003-01-02 Richard Sandiford <rsandifo@redhat.com>
3513
3514 * elfxx-mips.c: Include libiberty.h.
3515 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3516 (mips_set_isa_flags): New function, split out from...
3517 (_bfd_mips_elf_final_write_processing): ...here. Only call
3518 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3519 (mips_mach_extensions): New array.
3520 (mips_32bit_flags_p): New function.
3521 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3522 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3523 other is 64-bit. When adopting IBFD's architecture, adopt the
3524 bfd_mach as well as the flags.
3525
3526 2003-01-02 Nick Kelsey <nickk@ubicom.com>
3527
3528 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3529 fix internal errors, fix bad code generation, fix incorrect stabs
3530 information, and improve ability to eliminate redundant page
3531 instructions. Added code to ip2k_final_link_relocate to self-verify
3532 the linker relaxation. Fix formatting problems.
3533
3534 2002-12-30 Chris Demetriou <cgd@broadcom.com>
3535
3536 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3537 * archures.c (bfd_mach_mipsisa32r2): New define.
3538 * bfd-in2.h: Regenerate.
3539 * cpu-mips.c (I_mipsisa32r2): New enum value.
3540 (arch_info_struct): Add entry for I_mipsisa32r2.
3541 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3542 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3543 (_bfd_mips_elf_final_write_processing): Add
3544 bfd_mach_mipsisa32r2 case.
3545 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3546 binaries marked as using MIPS32 Release 2.
3547
3548 2002-12-30 Dmitry Diky <diwil@mail.ru>
3549
3550 * Makefile.am: Add msp430 target.
3551 * configure.in: Likewise.
3552 * Makefile.in: Regenerate.
3553 * configure: Regenerate.
3554 * archures.c: Add msp430 architecture vector.
3555 * config.bfd: Likewise.
3556 * reloc.c: Add msp430 relocs.
3557 * targets.c: Add msp320 target.
3558 * cpu-msp430.c: New file: msp430 cpu detection.
3559 * elf32-msp430.c: New file: msp430 reloc processing.
3560 * bfd-in2.h: Regenerate.
3561 * libbfd.h: Regenerate.
3562
3563 2002-12-28 Jakub Jelinek <jakub@redhat.com>
3564
3565 * elf.c (elf_sort_sections): Don't reorder .tbss.
3566 (assign_file_positions_for_segments): Only adjust off/voff
3567 for increased alignment in PT_LOAD or PT_NOTE segment,
3568 but adjust p_filesz for .tbss too. in PT_LOAD consider
3569 .tbss to have zero memory size.
3570 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3571 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3572 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3573 into PT_TLS segment. Never put SHF_TLS sections in
3574 segments other than PT_TLS or PT_LOAD.
3575
3576 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3577 sh_entsize.
3578
3579 2002-12-23 DJ Delorie <dj@redhat.com>
3580
3581 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3582
3583 2002-12-23 Alan Modra <amodra@bigpond.net.au>
3584
3585 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3586
3587 2002-12-23 Nick Clifton <nickc@redhat.com>
3588
3589 * archures.c (bfd_arch_get_compatible): Add third parameter
3590 'accept_unknowns'. Only accept unknown format BFDs if
3591 accept_unknowns is true, or if the format is "binary".
3592 * bfd-in2.h: Regenerate.
3593
3594 2002-12-21 Nick Clifton <nickc@redhat.com>
3595
3596 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3597 that subtracted 8 from pc relative relocations.
3598
3599 2002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3600
3601 * coff-h8300.c: Fix comment typos.
3602 * coffcode.h: Likewise.
3603 * cpu-cris.c: Likewise.
3604 * elf32-vax.c: Likewise.
3605 * genlink.h: Likewise.
3606 * linker.c: Likewise.
3607 * som.c: Likewise.
3608 * tekhex.c: Likewise.
3609 * vms-misc.c: Likewise.
3610
3611 2002-12-20 DJ Delorie <dj@redhat.com>
3612
3613 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3614 * libbfd.h: Regenerate.
3615 * bfd-in2.h: Regenerate.
3616 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3617 (xstormy16_reloc_map): Add R_XSTORMY16_12.
3618
3619 2002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3620
3621 * doc/bfdint.texi: Fix typos.
3622
3623 2002-12-20 Paul Eggert <eggert@twinsun.com>
3624
3625 Port to POSIX 1003.1-2001.
3626 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3627 * configure.in (build-warnings): Likewise.
3628 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3629 * aclocal.m4: Regenerate.
3630 * config.in: Regenerate.
3631 * configure: Regenerate.
3632
3633 2002-12-19 Alan Modra <amodra@bigpond.net.au>
3634
3635 * coff-h8300.c: Include libiberty.h.
3636 (h8300_reloc16_extra_cases): Check the hash table creator before
3637 referencing h8300 specific fields. Stash the hash table pointer
3638 in a local var. Comment typo fixes.
3639 (h8300_bfd_link_add_symbols): Likewise.
3640
3641 * reloc.c (struct reloc_howto_struct): Revise src_mask and
3642 dst_mask comments.
3643 * bfd-in2.h: Regenerate.
3644
3645 2002-12-18 Alan Modra <amodra@bigpond.net.au>
3646
3647 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3648 code a little. Comment on dynamic relocs against section symbols.
3649
3650 2002-12-17 Roger Sayle <roger@eyesopen.com>
3651
3652 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3653 the HP compiler's "long long".
3654
3655 2002-12-16 Andrew MacLeod <amacleod@redhat.com>
3656
3657 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3658 and R_XSTORMY16_HI16) howto entries.
3659 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
3660 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
3661 determine the start of the second reloc table.
3662
3663 2002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3664
3665 * ecofflink.c: Fix the reading of the debugging information
3666 of Tru64/Alpha binaries that are produced by recent Compaq
3667 compilers.
3668 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3669 table.
3670 (lookup_line): Because of the strange information sometimes
3671 generated by Compaq's recent compilers, change how the FDR
3672 table is searched so that PDRs (procedure descriptors) are
3673 correctly found. Note that this change is really more of a hack;
3674 however, I have included extensive documentation as to why
3675 this is the best solution short of an extensive rewrite or
3676 another hack.
3677 (fdrtab_lookup): Add comments to explain the algorithm.
3678
3679 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3680
3681 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3682 initializers to match struct declaration.
3683
3684 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3685
3686 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3687 * elf.c (get_program_header_size): Likewise.
3688 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3689 (m32r_elf_generic_reloc): Likewise.
3690 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3691 * elflink.h (elf_bfd_discard_info): Likewise.
3692
3693 2002-12-12 Alan Modra <amodra@bigpond.net.au>
3694
3695 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3696 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3697 DT_RELSZ adjustment, not output section. Avoid writing tags when
3698 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3699 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3700 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3701 DT_RELASZ adjustment, not output section. Avoid writing tags when
3702 unchanged. Adjust DT_RELA.
3703 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3704 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3705
3706 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3707
3708 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3709 addend by 4.
3710
3711 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
3712
3713 * elfxx-mips.c (struct mips_got_entry): New.
3714 (struct mips_got_info): Added got_entries field.
3715 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3716 (mips_elf_local_got_index, mips_elf_got_page,
3717 mips_elf_got16_entry): Re-implement in terms of new...
3718 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3719 Change return type.
3720 (mips_elf_highest): Warning clean-up.
3721 (mips_elf_create_got_section): Initialize got_entries.
3722 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3723 local got size.
3724 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3725 GOT_PAGE entries, since we now reuse GOT16 entries.
3726
3727 2002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3728
3729 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3730 read-only section that lies after .text and before .data to be
3731 written into the output file and included in a_text.
3732 (translate_to_native_sym_flags): If an otherwise unrepresentable
3733 section was merged with .text, convert its symbols to N_TEXT
3734 symbols.
3735 * libaout.h (aout_section_merge_with_text_p): New macro.
3736
3737 2002-12-08 Alan Modra <amodra@bigpond.net.au>
3738
3739 * bfd-in.h: Comment typo fix. Formatting.
3740 * bfd-in2.h: Regenerate.
3741 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3742 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3743 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3744
3745 2002-12-05 Richard Henderson <rth@redhat.com>
3746
3747 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3748 Only send PCREL21B though the plt. Fix installed reloc type.
3749 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3750 against PCREL22 or PCREL64I; clean up error messages for
3751 branch relocs.
3752
3753 2002-12-04 Kevin Buettner <kevinb@redhat.com>
3754
3755 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3756 New functions.
3757 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3758
3759 2002-12-04 David Mosberger <davidm@hpl.hp.com>
3760
3761 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3762
3763 2002-12-04 H.J. Lu <hjl@gnu.org>
3764
3765 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3766 BFD address when constructing local name.
3767
3768 2002-12-04 Andreas Schwab <schwab@suse.de>
3769
3770 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3771 member.
3772 (elf_m68k_link_hash_table_create): Initialize it.
3773 (elf_m68k_check_relocs): Handle symbols that are forced to be
3774 local due to visibility changes.
3775 (elf_m68k_adjust_dynamic_symbol): Likewise.
3776 (elf_m68k_size_dynamic_sections): Likewise.
3777 (elf_m68k_discard_copies): Likewise.
3778 (elf_m68k_relocate_section): Likewise.
3779
3780 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3781
3782 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3783
3784 2002-12-04 Alan Modra <amodra@bigpond.net.au>
3785
3786 * srec.c (srec_write_symbols): Restore '$' prefix to address
3787 accidentally removed in 2002-04-04 change.
3788 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3789
3790 2002-12-03 Nick Clifton <nickc@redhat.com>
3791
3792 * elf32-ppc.c (apuinfo_list_init): New function.
3793 (apuinfo_list_add): New function: Add a value to the list.
3794 (apuinfo_list_length): New function: Return the number of
3795 values on the list.
3796 (apuinfo_list_element): New function: Return a value on the
3797 list.
3798 (apuinfo_list_finish): New function: Free the resources used
3799 by the list.
3800 (ppc_elf_begin_write_processing): New function. Scan the
3801 input bfds for apuinfo sections.
3802 (ppc_elf_write_section): New function: Delay the creation of
3803 the contents of an apuinfo section in an output bfd.
3804 (ppc_elf_final_write_processing): New function. Create the
3805 contents of an apuinfo section in an output bfd.
3806 (elf_backend_begin_write_processing): Define.
3807 (elf_backend_final_write_processing): Define.
3808 (elf_backend_write_section): Define.
3809
3810 2002-12-03 Richard Henderson <rth@redhat.com>
3811
3812 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3813
3814 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3815
3816 Fix PR savannah/1417:
3817 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3818 branch if it goes to the start of the deleted region.
3819
3820 2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3821
3822 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3823 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3824 bfd_mach_m6812s): Declare.
3825
3826 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3827 (_bfd_m68hc12_elf_set_private_flags): Call it.
3828 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3829 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3830 report microcontroller incompatibilities (HC12 vs HCS12).
3831 (elf_backend_object_p): Update.
3832
3833 2002-11-30 Alan Modra <amodra@bigpond.net.au>
3834
3835 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3836 (enum bfd_boolean, boolean): Delete.
3837 (bfd_boolean): Typedef to an int.
3838 (FALSE, TRUE): Define.
3839 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3840 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3841 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3842 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3843 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3844 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3845 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3846 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3847 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3848 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3849 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3850 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3851 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3852 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3853 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3854 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3855 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3856 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3857 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3858 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3859 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3860 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3861 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3862 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3863 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3864 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3865 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3866 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3867 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3868 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3869 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3870 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3871 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3872 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3873 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3874 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3875 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3876 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3877 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3878 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3879 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3880 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3881 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3882 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3883 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3884 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3885 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3886 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
3887 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
3888 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3889 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3890 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3891 of bfd_boolean vars with TRUE/FALSE. Formatting.
3892 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3893
3894 2002-11-28 Alan Modra <amodra@bigpond.net.au>
3895
3896 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3897 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3898 with Elf_Internal_Rela.
3899 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3900 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3901 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3902 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3903 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3904 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3905 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3906 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3907 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3908 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3909 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3910 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3911 throughout instead.
3912 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3913 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3914 Remove INLINE keyword.
3915 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3916 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3917 as a bfd_byte *.
3918 (elf_write_relocs): Consolidate REL and RELA code.
3919 (elf_slurp_reloc_table_from_section): Simplify REL code.
3920 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3921 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3922 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3923 RELA code.
3924 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3925 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3926 (elf_link_output_relocs): Likewise.
3927 (elf_reloc_link_order): Likewise.
3928 (elf_finish_pointer_linker_section): Likewise.
3929 (struct elf_link_sort_rela): Remove union.
3930 (elf_link_sort_cmp1): Update to suit.
3931 (elf_link_sort_cmp2): Here too.
3932 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3933 over-allocation for int_rels_per_ext_rel != 1 case.
3934 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3935 * elf32-i386.c: Likewise.
3936 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3937 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3938 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3939 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3940 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3941 elf64-sparc.c, elf64-x86-64.c: Likewise.
3942 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3943 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3944 bfd_elf32_swap_reloc_in.
3945
3946 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3947 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3948 (mips_elf64_swap_reloc_in): Zero r_addend.
3949 (mips_elf64_be_swap_reloc_in): Likewise.
3950 (mips_elf64_slurp_one_reloc_table): Simplify.
3951
3952 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3953 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3954 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3955
3956 2002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3957
3958 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
3959 unresolved debugging relocs in dynamic applications.
3960 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3961
3962 2002-11-26 Alan Modra <amodra@bigpond.net.au>
3963
3964 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3965 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3966 on a relocatable link. Comment typos.
3967 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3968 in the order they are declared. Clear elf_hash_value too.
3969 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
3970 eh_info and tls_segment.
3971 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3972 sorted when discarding relocs by turning them into R_*_NONE.
3973
3974 * libbfd.c (warn_deprecated): Comment spelling.
3975 * po/SRC-POTFILES.in: Regenerate.
3976
3977 2002-11-21 Richard Henderson <rth@redhat.com>
3978
3979 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3980 arch's st_other bits when merging visibilities.
3981 (elf_link_output_extsym): Tidy clearing of visibility field.
3982
3983 2002-11-21 Alan Modra <amodra@bigpond.net.au>
3984
3985 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3986 (SWAP_OUT_RELOC_OFFSET): Define.
3987
3988 2002-11-20 Alexandre Oliva <aoliva@redhat.com>
3989
3990 * elf.c (_bfd_elf_link_hash_table_init): Make sure
3991 can_refcount is properly extended to the type of
3992 init_refcount.
3993
3994 2002-11-19 Alexandre Oliva <aoliva@redhat.com>
3995
3996 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3997 (_bfd_mips_elf_relocate_section): Use it.
3998
3999 * elfxx-mips.c (MNAME): New macro.
4000 (_bfd_mips_elf_check_relocs): Use it.
4001 (_bfd_mips_elf_discard_info): Likewise.
4002 (_bfd_mips_elf_final_link): Likewise.
4003
4004 2002-11-19 Alan Modra <amodra@bigpond.net.au>
4005
4006 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4007 rel_hdr.sh_size too.
4008
4009 2002-11-18 Klee Dienes <kdienes@apple.com>
4010
4011 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4012 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4013 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4014 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4015 Add dependencies for bfdwin.c, bfdio.c.
4016 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4017 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4018 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4019 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4020 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4021 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4022 bfd_get_size (moved from libbfd.c and bfd.c).
4023 * bfdwin.c New file. Contains _bfd_window_internal,
4024 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4025 libbfd.c and bfd.c).
4026 * po/SRC-POTFILES.in: Regenerate.
4027 * po/bfd.pot: Regenerate.
4028 * libbfd.h: Regenerate.
4029 * bfd-in2.h: Regenerate.
4030 * aclocal.m4: Regenerate.
4031 * Makefile.in: Regenerate.
4032 * configure: Regenerate.
4033
4034 2002-11-18 Klee Dienes <kdienes@apple.com>
4035
4036 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4037
4038 2002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4039
4040 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4041 jsr after a short jump.
4042 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4043
4044 2002-11-15 Klee Dienes <kdienes@apple.com>
4045
4046 * pef.c (bfd_pef_convert_architecture): Move declaration of
4047 ARCH_POWERPC and ARCH_M68K to the start of the function.
4048
4049 2002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4050
4051 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4052
4053 2002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4054
4055 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4056 For bpo_gregs_section->contents, allocate _raw_size, not
4057 _cooked_size.
4058
4059 2002-11-13 Klee Dienes <kdienes@apple.com>
4060
4061 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4062
4063 2002-11-13 H.J. Lu <hjl@gnu.org>
4064
4065 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4066
4067 2002-11-13 Klee Dienes <kdienes@apple.com>
4068 Alan Modra <amodra@bigpond.net.au>
4069
4070 * bfd.c (struct bfd_preserve): New.
4071 (bfd_preserve_save): New function.
4072 (bfd_preserve_restore): Ditto.
4073 (bfd_preserve_finish): Ditto.
4074 * bfd-in2.h: Regenerate.
4075 * mach-o.c: Formatting.
4076 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4077 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4078 (bfd_mach_o_core_p): Ditto.
4079 (bfd_mach_o_scan): Pass in mdata.
4080 * mach-o.h (bfd_mach_o_scan): Update prototype.
4081 * pef.c: Formatting.
4082 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4083 (bfd_pef_xlib_object_p): Ditto.
4084 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4085 * pef.h (bfd_pef_scan): Update prototype.
4086 * xsym.c: Formatting, K&R fixes.
4087 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4088 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4089 * xsym.h (bfd_sym_scan): Declare.
4090 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
4091 * elfcore.h (elf_core_file_p): Likewise.
4092 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4093
4094 2002-11-12 Nick Clifton <nickc@redhat.com>
4095
4096 * po/da.po: Updated Danish translation.
4097
4098 2002-11-12 Alan Modra <amodra@bigpond.net.au>
4099
4100 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4101 relocatable link too.
4102 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4103 eh_frame and stab sections. Zap deleted relocs.
4104 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4105 (elf_bfd_discard_info): Run for relocatable link too.
4106 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4107 Handle ld -r case.
4108 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4109 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4110
4111 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4112 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4113 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4114 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4115 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4116 (struct elf_link_hash_table): Add eh_info.
4117 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4118 (_bfd_elf_discard_section_eh_frame): Update prototype.
4119 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4120 (_bfd_elf_write_section_eh_frame): Likewise.
4121 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4122 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4123 param. Get "hdr_info" from link hash table.
4124 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4125 header section from link hash table. Save header section to elf_tdata.
4126 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4127 header section from link hash table. Don't alloc hdr_info. Clear
4128 hdr_sec instead of setting "strip".
4129 (_bfd_elf_eh_frame_section_offset): Formatting.
4130 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4131 Get header section from link hash table.
4132 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4133 Get header section from link hash table.
4134 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4135 (get_program_header_size): Likewise.
4136 (_bfd_elf_section_offset): Formatting.
4137 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4138 section pointer in link hash table.
4139 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4140 and _bfd_elf_write_section_eh_frame calls. Update comment about
4141 eh_frame entries.
4142 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4143 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4144
4145 * po/SRC-POTFILES.in: Regenerate.
4146
4147 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4148 relocs for discarded FDEs. Remove dead code.
4149 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4150 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4151 Tidy conditions under which stabs are edited. Formatting.
4152 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4153 from discarded relocs.
4154 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4155 section adjustments after testing magic values.
4156
4157 2002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4158
4159 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4160 references to large plt symbols.
4161
4162 2002-11-12 Klee Dienes <kdienes@apple.com>
4163
4164 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4165 looking for an unused section name.
4166
4167 2002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4168
4169 * coff-h8300.c: Fix formatting.
4170 * elf32-h8300.c: Likewise.
4171 * reloc16.c: Likewise.
4172
4173 2002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4174
4175 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4176 section when dynamic section unused; _bfd_strip_section_from_output
4177 instead.
4178
4179 2002-11-08 Alan Modra <amodra@bigpond.net.au>
4180
4181 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4182 and sym_vec.
4183
4184 * dwarf2.c: Revert last change.
4185
4186 2002-11-07 Michal Ludvig <mludvig@suse.cz>
4187
4188 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
4189 _bfd_dwarf2_find_nearest_line): Use
4190 bfd_simple_get_relocated_section_contents() instead of
4191 bfd_get_section_contents().
4192 * reloc.c (bfd_perform_relocation): Add sanity check.
4193 * simple.c (simple_get_relocated_section_contents): If the section
4194 does not have any relocs associated with it, just return the
4195 unadjusted contents.
4196
4197 2002-11-07 Hans-Peter Nilsson <hp@axis.com>
4198
4199 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4200 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4201 contents, enabling for a non-DSO, for symbols defined in the
4202 program with --export-dynamic.
4203
4204 2002-11-07 Alan Modra <amodra@bigpond.net.au>
4205
4206 * elf64-ppc.c: Comment typo fixes.
4207 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4208
4209 2002-11-07 Nick Clifton <nickc@redhat.com>
4210
4211 * po/da.po: Updated Danish translation.
4212
4213 2002-11-06 Alexandre Oliva <aoliva@redhat.com>
4214
4215 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4216 exactly three internal relocs per external reloc. Set reloc_count
4217 to the external reloc count.
4218
4219 2002-11-06 Klee Dienes <kdienes@apple.com>
4220
4221 * coff-stgo32.c (stub_bytes): Mark as const.
4222 Fix comment formatting.
4223
4224 2002-11-06 Klee Dienes <kdienes@apple.com>
4225
4226 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
4227 xsym.lo.
4228 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4229 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4230 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4231 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4232 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4233 sym.
4234 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
4235 * Makefile.in: Regenerate.
4236 * doc/Makefile.in: Regenerate.
4237 * bfd-in2.h: Regenerate.
4238 * xsym.c: New file. Contains support for the Apple/Metrowerks
4239 xSYM debugging format.
4240 * xsym.h: New file.
4241 * pef.c: New file. Contains support for the Apple Code Fragment
4242 Manager Preferred Executable Format
4243 * pef.h: New file.
4244 * pef-traceback.h: New file. Contains support for parsing PowerPC
4245 traceback tables as used by PEF executables (and perhaps other
4246 systems as well).
4247 * mach-o.c: New file. Contains support for the Mach-O object file
4248 format.
4249 * mach-o.h: New file.
4250 * mach-o-target.c: New file. Declares the mach-o targets
4251 themselves. Included three times by mach-o.c; each time with a
4252 different set of macros set.
4253
4254 2002-11-06 Graeme Peterson <gp@qnx.com>
4255
4256 * Makefile.am: Remove entries for elf32-qnx.[ch].
4257 * Makefile.in: Regenerate.
4258 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4259 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4260 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4261 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4262 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4263 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4264 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4265 * configure: Regenerate.
4266 * elf32-qnx.c: Remove.
4267 * elf32-qnx.h: Remove.
4268 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4269 is_contained_by_filepos, and copy_private_bfd_data_p.
4270 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4271 is_contained_by_filepos, and copy_private_bfd_data_p.
4272 * elf32-i386.c: Remove QNX extended bfd support.
4273 * elf32-ppc.c: Remove QNX extended bfd support.
4274 * elf32-sh.c: Remove QNX extended bfd support.
4275 * elfarm-nabi.c: Remove QNX extended bfd support.
4276 * targets.c: Remove qnx vectors.
4277 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4278 (elf_backend_is_contained_by_filepos): Remove.
4279 (elf_backend_copy_private_bfd_data_p): Remove.
4280 * po/SRC-POTFILES.in: Regenerate.
4281
4282 2002-11-06 David O'Brien <obrien@FreeBSD.org>
4283 Alan Modra <amodra@bigpond.net.au>
4284
4285 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4286 dynamic relocs against section symbols for the output section vma.
4287
4288 2002-11-05 Alan Modra <amodra@bigpond.net.au>
4289
4290 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4291 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4292
4293 2002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4294 Alan Modra <amodra@bigpond.net.au>
4295
4296 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4297 vectors in target_selvecs.
4298 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4299 in target_selvecs.
4300 (sh-*-netbsdelf*): Likewise.
4301 * configure.in (assocvecs): New variable. Handle assocvecs like
4302 selvecs.
4303 * configure: Regenerate.
4304 * format.c (bfd_check_format_matches): Store bfd_target pointers
4305 in matching_vector instead of target names. Select first target
4306 from bfd_associated_vector that matches a list of ambiguous targets.
4307 * targets.c (_bfd_associated_vector): New array.
4308 (bfd_associated_vector): New variable.
4309 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4310 * libbfd-in.h (bfd_associated_vector): Declare.
4311 * libbfd.h: Regenerate.
4312
4313 2002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4314
4315 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4316 non-NULL before dereferencing.
4317
4318 2002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4319
4320 * vms.c (vms_object_p): Restore the start address when returning
4321 NULL.
4322
4323 2002-11-04 Alan Modra <amodra@bigpond.net.au>
4324 Hans-Peter Nilsson <hp@axis.com>
4325
4326 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4327 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4328 Set up a larger symshndxbuf, and write it out. Free it on
4329 exit rather than freeing symbuf twice. Correct section index
4330 on output section symbol loop.
4331 (elf_link_output_sym): Accumulate symbol extension section
4332 indices, reallocating symshndxbuf rather than writing it out.
4333 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4334 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4335 Use bfd_zalloc to clear i_shdrp[0] too.
4336
4337 2002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4338
4339 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4340 _raw_size of cranges section if _cooked_size not yet set.
4341
4342 2002-11-03 Hans-Peter Nilsson <hp@axis.com>
4343
4344 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4345 for bfd_elf32_swap_symbol_out.
4346
4347 2002-10-31 David O'Brien <obrien@FreeBSD.org>
4348
4349 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4350 signed and unsigned in comparison.
4351
4352 2002-10-30 Daniel Jacobowitz <drow@mvista.com>
4353
4354 * coffcode.h: Remove extraneous '\'.
4355
4356 2002-10-28 H.J. Lu <hjl@gnu.org>
4357
4358 * Makefile.am (targets.lo): Depend on Makefile instead of
4359 config.status.
4360 (archures.lo): Likewise.
4361 * Makefile.in: Regenerated.
4362
4363 2002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4364
4365 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4366 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4367 targ_selvecs.
4368
4369 2002-10-25 Jim Wilson <wilson@redhat.com>
4370
4371 * elf64-sh64.c (sh_elf64_relocate_section): Call
4372 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4373 of SHF_MERGE section.
4374
4375 2002-10-25 Hans-Peter Nilsson <hp@axis.com>
4376
4377 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4378
4379 2002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4380
4381 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4382 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4383 unsigned int.
4384 (NAME(aout,final_link)): Cast enum used in assignment.
4385 (aout_link_write_symbols): Cast enums in comparisons, int values to
4386 boolean, enums in assignments to int.
4387 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
4388 (aout_link_input_section_ext): Likewise. Cast enums used in
4389 comparisons with unsigned ints.
4390 (aout_link_reloc_link_order): Cast enum to int in assignment.
4391 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4392 calls to char *.
4393 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4394 assignment.
4395 * bfd-in2.h (bfd_set_section_vma): Likewise.
4396 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4397 * binary.c (bfd_alloc): Cast enum to long.
4398 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4399 * dwarf2.c (read_abbrevs): Add casts to enum types.
4400 (read_attribute_value): Likewise.
4401 (arange_add): Cast result of bfd_zalloc call.
4402 (comp_unit_contains_address): Return true and false.
4403 (comp_unit_find_nearest_line): Cast return to boolean.
4404 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4405 * gen-aout.c: define macro '_' if not defined.
4406 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4407 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4408 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4409 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4410 (bfd_generic_is_local_label_name): Cast return to boolean.
4411 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4412 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4413 struct bfd_hash_entry *.
4414 (_bfd_generic_link_hash_newfunc): likewise.
4415 (_bfd_generic_final_link): Cast enum to unsigned int.
4416 * merge.c (sec_merge_emit): Cast return to boolean.
4417 (merge_strings): Add casts to const unsigned char *.
4418 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4419 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
4420 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4421 to struct bfd_hash_entry *.
4422 (bfd_set_section_content): Add cast to PTR in comparison.
4423 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4424 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4425 simple_dummy_unattached_reloc,
4426 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4427 function definitions.
4428 * srec.c (S3Forced): Initialize to false.
4429 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4430 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4431 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4432 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4433 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4434 comparisons.
4435
4436 2002-10-23 Jakub Jelinek <jakub@redhat.com>
4437
4438 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4439 relocs into shared lib non-allocated reloc sections.
4440
4441 2002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4442
4443 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4444 sorted even when given an out-of-order line sequence.
4445 (lookup_address_in_line_info_table): When an exact VMA match is
4446 not found, return line information with the closest VMA.
4447
4448 2002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4449
4450 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4451 HPUX 11.00 patch PHSS_26559.
4452
4453 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4454
4455 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4456 the options section into a separate section unless IRIX 6
4457 compatibility is enabled.
4458
4459 2002-10-22 Alexandre Oliva <aoliva@redhat.com>
4460
4461 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4462 into arrays.
4463 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4464 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4465 into account.
4466 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4467 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4468
4469 2002-10-21 Graeme Peterson <gp@qnx.com>
4470
4471 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4472
4473 2002-10-21 Alan Modra <amodra@bigpond.net.au>
4474
4475 * targets.c (bfd_target_list): Don't return the default target twice.
4476
4477 2002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4478
4479 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4480 perror with bfd_perror.
4481
4482 2002-10-19 H.J. Lu <hjl@gnu.org>
4483
4484 * elflink.h (elf_link_add_object_symbols): Correctly handle
4485 DT_RPATH and DT_RUNPATH.
4486
4487 2002-10-19 Mark Kettenis <kettenis@gnu.org>
4488
4489 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4490
4491 2002-10-17 Denis Chertykov <denisc@overta.ru>
4492
4493 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4494 for ip2k port.
4495
4496 2002-10-17 Alan Modra <amodra@bigpond.net.au>
4497
4498 * elfxx-target.h (USE_REL): Don't define as 1.
4499 * elf32-arm.h (USE_REL): Provide a default define of 0.
4500 Use #if rather than #ifdef when testing USE_REL.
4501 * elf32-m32r.c: Likewise.
4502
4503 * elf32-arc.c (USE_REL): Define as 1.
4504 * elf32-d10v.c (USE_REL): Likewise.
4505 * elf32-m32r.c (USE_REL): Likewise.
4506 * elf32-m68hc11.c (USE_REL): Likewise.
4507 * elf32-m68hc12.c (USE_REL): Likewise.
4508 * elf32-or32.c (USE_REL): Likewise.
4509 * elfarm-nabi.c (USE_REL): Likewise.
4510
4511 2002-10-16 Jakub Jelinek <jakub@redhat.com>
4512
4513 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4514 (s390x-*-linux*): Add targ_selvecs.
4515
4516 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4517
4518 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
4519 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
4520 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4521 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4522 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4523 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4524 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4525 (SOURCE_HFILES): Add elf32-qnx.h.
4526 (BUILD_HFILES): Add bfdver.h.
4527 Run "make dep-am".
4528 * Makefile.in: Regenerate.
4529 * configure.in Update bfd vector dependencies.
4530 * configure: Regenerate.
4531 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4532 * elf32-i386qnx.c: Likewise.
4533 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4534 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4535 * elf32-sh-lin.c: Likewise.
4536 * elf32-shqnx.c: Likewise.
4537 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4538 * elf32-sh64-nbsd.c: Likewise.
4539 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4540 * elf64-sh64-nbsd.c: Likewise.
4541 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4542 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4543 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4544 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4545 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4546 (elf_backend_is_contained_by_filepos): Likewise.
4547 (elf_backend_copy_private_bfd_data_p): Likewise.
4548 Globalize and move functions to..
4549 * elf32-qnx.c: ..here. New file.
4550 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4551 emit target vectors when INCLUDE_SHMEDIA.
4552 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4553 end of file.
4554 * elf64-sh64.c: Remove ELF_ARCH test.
4555 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4556 * po/BLD-POTFILES.in: Regenerate.
4557 * po/SRC-POTFILES.in: Regenerate.
4558
4559 2002-10-16 Alan Modra <amodra@bigpond.net.au>
4560
4561 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4562 loaded with --just-symbols.
4563
4564 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4565 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4566 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4567 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4568
4569 2002-10-15 Richard Henderson <rth@redhat.com>
4570
4571 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4572 (BFD64_BACKENDS_CFILES): Likewise.
4573 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4574 * elf64-alpha-fbsd.c: Remove file, move code ...
4575 * elf64-alpha.c: ... here.
4576 * Makefile.in, configure: Rebuild.
4577
4578 2002-10-14 Richard Henderson <rth@redhat.com>
4579
4580 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4581 VALUE, not ADDEND.
4582
4583 2002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4584
4585 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4586 datalabel_got_offset with union of datalabel_got
4587 offset and refcount.
4588 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4589 (allocate_dynrelocs): Delete unnecessary code for
4590 STT_DATALABEL type. Create entry in got for
4591 datalabel version of symbol if datalabel_got.refcount > 0.
4592 (sh_elf_relocate_section): Use datalabel_got union.
4593 (sh_elf_gc_sweep_hook): Pull common code to initialize
4594 h and eh out of switch statement. Declare seen_stt_datalabel.
4595 Initialize it. Decrement datalabel_got.refcount for
4596 got relocs when seen_stt_datalabel is true.
4597 Decrement local_got_refcounts entry for datalabel got relocs
4598 of local symbols.
4599 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4600 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4601 Initialize it. When seen_stt_datalabel is true, increment
4602 datalabel_got refcount rather than got.refcount.
4603 (sh_elf_finish_dynamic_symbol): Create relocs to
4604 initialize got entry for datalabel version of symbol.
4605
4606 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4607
4608 * Makefile.am: Run "make dep-am".
4609 (BFD_H_FILES): Remove version.h.
4610 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4611 * version.h: ..to here.
4612 * configure.in (bfd_version_date): Remove.
4613 (AC_OUTPUT): Make bfdver.h from version.h.
4614 * bfd.c: #include "bfdver.h".
4615 * vms-hdr.c: Likewise.
4616 * Makefile.in: Regenerate.
4617 * bfd-in2.h: Regenerate.
4618 * configure: Regenerate.
4619 * po/SRC-POTFILES.in: Regenerate.
4620
4621 2002-10-14 Alan Modra <amodra@bigpond.net.au>
4622
4623 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4624 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4625 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4626 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4627 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4628 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4629 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4630 bfd_mach_ip2022, bfd_mach_ip2022ext,
4631 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4632 * bfd-in2.h: Regenerate.
4633
4634 2002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4635
4636 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4637 endian vector to targ_selvecs.
4638
4639 2002-10-13 Alexandre Oliva <aoliva@redhat.com>
4640
4641 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4642 save_addend argument. Don't apply the 32-bit mask to a
4643 GPREL32 value if it's to be used in another relocation. Don't
4644 use forced-check computation of local_p to decide whether to
4645 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4646 of the addend of a non-in-place GPREL16 relocation.
4647 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4648 mips_elf_calculate_relocation().
4649
4650 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4651
4652 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4653 with symbols in other sections if we relaxed something; the sections
4654 output offsets must be re-computed before.
4655
4656 2002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4657
4658 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4659 handling to use Elf_Internal_Sym.
4660 (m68hc11_elf_relax_delete_bytes): Likewise.
4661
4662 2002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4663
4664 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4665 sh_elf_object_p, dtpoff_base): New functions.
4666 (sh_elf_howto_table): Add TLS relocs.
4667 (sh_reloc_map): Likewise.
4668 (sh_elf_info_to_howto): Support TLS relocs.
4669 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4670 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4671 New macros.
4672 (sh_elf_obj_tdata): New.
4673 (elf_sh_link_hash_table): Add tls_ldm_got.
4674 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4675 (allocate_dynrelocs): Support TLS relocs.
4676 (sh_elf_size_dynamic_sections): Likewise.
4677 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4678 .rela.got section when found already. Return false after printing
4679 error about unresolvable relocation.
4680 (sh_elf_gc_sweep_hook): Support TLS relocs.
4681 (sh_elf_check_relocs): Likewise.
4682 (sh_elf_finish_dynamic_symbol): Likewise.
4683 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4684 * reloc.c: Add SH TLS relocs.
4685 * bfd-in2.h, libbfd.h: Regenerate.
4686
4687 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4688
4689 * Makefile.in: Regenerated.
4690
4691 2002-10-11 Daniel Jacobowitz <drow@mvista.com>
4692
4693 * Makefile.am: Run dep-am.
4694 (BFD_H_DEP): Add simple.c and linker.c.
4695 (BFD32_LIBS): Add simple.lo.
4696 (BFD32_LIBS_CFILES): Add simple.c.
4697 * Makefile.in: Regenerated.
4698 * bfd-in2.h: Regenerated.
4699 * simple.c: New file.
4700
4701 2002-10-11 Alan Modra <amodra@bigpond.net.au>
4702
4703 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4704 (record_thumb_to_arm_glue): Likewise.
4705 * ecoff.c (ecoff_link_add_externals): Likewise.
4706 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4707 (record_thumb_to_arm_glue): Likewise.
4708 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4709 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4710 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4711 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4712 * elf64-ppc.c (func_desc_adjust): Likewise.
4713 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4714 (sh64_elf64_create_dynamic_sections): Likewise.
4715 * elflink.c (_bfd_elf_create_got_section): Likewise.
4716 (_bfd_elf_create_dynamic_sections): Likewise.
4717 (_bfd_elf_create_linker_section): Likewise.
4718 * elflink.h (elf_add_default_symbol): Likewise.
4719 (elf_link_create_dynamic_sections): Likewise.
4720 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4721 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4722 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4723 (_bfd_mips_elf_add_symbol_hook): Likewise.
4724 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4725 * linker.c (generic_link_add_symbol_list): Likewise.
4726 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4727
4728 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4729
4730 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
4731 completely removed. Correct local sym adjustment.
4732
4733 2002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4734
4735 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4736 Correct mistake in calculation of address of .got.
4737 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4738 elf_sh64_pic_plt_entry_le): Likewise.
4739
4740 2002-10-09 Richard Shann <richard.shann@superh.com>
4741 Stephen Clarke <stephen.clarke@superh.com>
4742
4743 * Makefile.am: Add entries for elf32-sh64-lin.c and
4744 elf64-sh64-lin.c. Regenerate.
4745 * Makefile.in: Regenerate.
4746 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
4747 to use sh64 vectors rather than sh vectors.
4748 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4749 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4750 * configure: Regenerate.
4751 * elf32-sh64-lin.c: New file.
4752 * elf64-sh64-lin.c: New file.
4753 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4754 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4755
4756 2002-10-08 H.J. Lu <hjl@gnu.org>
4757
4758 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4759 IE->LE transition for R_386_TLS_IE.
4760
4761 2002-10-08 Alan Modra <amodra@bigpond.net.au>
4762
4763 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4764
4765 2002-10-07 Mark Elbrecht <snowball3@softhome.net>
4766
4767 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4768 sections.
4769
4770 2002-10-07 Alan Modra <amodra@bigpond.net.au>
4771
4772 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4773 code.
4774
4775 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4776
4777 2002-10-06 Alan Modra <amodra@bigpond.net.au>
4778
4779 * opncls.c: Formatting.
4780 (_bfd_new_bfd): Use a smaller section hash table.
4781
4782 2002-10-05 Alexandre Oliva <aoliva@redhat.com>
4783
4784 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4785 of the other two relocations packed with a REL32 to NONE.
4786
4787 2002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4788
4789 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4790 (sh_elf_link_hash_newfunc): Initialize it.
4791 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4792 to got.refcount for symbols that are forced local or when
4793 we have direct got refs.
4794 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4795 to correctly adjust got.refcount and plt.refcount.
4796 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4797 (sh_elf_check_relocs): Increment gotplt_refcount.
4798
4799 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4800
4801 * elf32-i386.c (elf_i386_relocate_section): Fix
4802 movl foo@indntpoff, %eax IE->LE transition.
4803
4804 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4805
4806 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4807 sequence and its transitions.
4808
4809 2002-10-01 Jakub Jelinek <jakub@redhat.com>
4810
4811 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4812 to st_value + addend in non-code sections.
4813 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4814 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4815
4816 2002-09-30 Gavin Romig-Koch <gavin@redhat.com>
4817 Ken Raeburn <raeburn@cygnus.com>
4818 Aldy Hernandez <aldyh@redhat.com>
4819 Eric Christopher <echristo@redhat.com>
4820 Richard Sandiford <rsandifo@redhat.com>
4821
4822 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4823 (bfd_mach_mips5500): New.
4824 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4825 (arch_info_struct): Add corresponding entries here.
4826 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4827 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4828 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4829 bfd_mach_mips5400 and bfd_mach_mips5500.
4830 (_bfd_mips_elf_mach_extends_p): New function.
4831 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4832 the EF_MIPS_MACH flags.
4833 * bfd-in2.h: Regenerate.
4834
4835 2002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4836
4837 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4838 .got sections.
4839
4840 2002-09-28 Alan Modra <amodra@bigpond.net.au>
4841
4842 * elf.c (map_sections_to_segments): Correct test for start of
4843 writable section in the same page as end of read-only section.
4844
4845 2002-09-27 Matt Thomas <matt@3am-software.com>
4846
4847 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4848 local_got_refcounts usage. Remove allocation of got slot.
4849 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4850 Remove de-allocation of got slot.
4851 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4852 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4853 sections to be GC'ed.
4854 (elf_vax_instantiate_got_entries): New function.
4855 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4856 tests that are now handled by elf_vax_instantiate_got_entries.
4857 Assert GOT entry falls within .got section size. Remove redundant
4858 comparisions. Fix comments.
4859
4860 2002-09-27 Jakub Jelinek <jakub@redhat.com>
4861
4862 * reloc.c: Add x86-64 TLS relocs.
4863 * bfd-in2.h, libbfd.h: Rebuilt.
4864 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4865 relocs. Add TLS relocs.
4866 (x86_64_reloc_map): Add TLS relocs.
4867 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4868 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4869 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4870 (elf64_x86_64_hash_entry): Define.
4871 (struct elf64_x86_64_obj_tdata): New.
4872 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4873 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4874 (link_hash_newfunc): Initialize tls_type.
4875 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4876 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4877 (elf64_x86_64_mkobject): New.
4878 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4879 (elf64_x86_64_tls_transition): New.
4880 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4881 Handle TLS relocs.
4882 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4883 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4884 (elf64_x86_64_size_dynamic_sections): Likewise.
4885 (dtpoff_base, tpoff): New.
4886 (elf64_x86_64_relocate_section): Handle TLS relocs.
4887 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4888 entries.
4889 (bfd_elf64_mkobject): Define.
4890
4891 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4892 DF_STATIC_TLS if shared.
4893
4894 2002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4895
4896 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4897 empty relocation sections.
4898
4899 2002-09-26 Alan Modra <amodra@bigpond.net.au>
4900
4901 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4902 (ppc64_elf_build_stubs): Build them here instead.
4903
4904 2002-09-24 Jakub Jelinek <jakub@redhat.com>
4905
4906 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4907 addend into r_addend, not *r_offset.
4908 (elf32_sparc_finish_dynamic_symbol): Likewise.
4909 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4910 R_SPARC_RELATIVE's r_offset.
4911
4912 2002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4913
4914 * dwarf2.c (decode_line_info): Update to correctly decode
4915 the (non-standard DWARF2) out-of-order address sequences
4916 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4917
4918 2002-09-23 Mark Elbrecht <snowball3@softhome.net>
4919
4920 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4921
4922 2002-09-23 Alan Modra <amodra@bigpond.net.au>
4923
4924 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4925 for discarded FDEs. Remove redundant assignment.
4926 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4927
4928 2002-09-22 H.J. Lu <hjl@gnu.org>
4929
4930 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4931 the relocation count between different .reloc sections.
4932
4933 2002-09-21 Alan Modra <amodra@bigpond.net.au>
4934
4935 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4936 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4937 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4938 R_PPC_EMB_RELSDA.
4939
4940 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4941 unsigned. Move "symcount" assignment out of loop.
4942 * Makefile.am: Run "make dep-am".
4943 * Makefile.in: Regenerate.
4944 * configure: Regenerate.
4945 * po/SRC-POTFILES.in: Regnerate.
4946
4947 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4948
4949 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4950 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4951 (e.g. IRIX64).
4952
4953 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4954
4955 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4956 even if generating R_PPC_RELATIVE reloc.
4957 (ppc_elf_relocate_section): Make sure relocation is performed
4958 if skip == -2. Clear memory at r_offset when creating dynamic
4959 relocation.
4960
4961 2002-09-19 Jakub Jelinek <jakub@redhat.com>
4962
4963 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4964 BFD_RELOC_386_TLS_GOTIE): Add.
4965 * bfd-in2.h, libbfd.h: Rebuilt.
4966 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4967 and R_386_TLS_GOTIE.
4968 (elf_i386_reloc_type_lookup): Handle it.
4969 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4970 char instead of enum, change GOT_* into defines.
4971 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4972 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4973 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
4974 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
4975 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4976 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4977 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4978 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4979 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4980 tls_type is GOT_TLS_IE_BOTH.
4981 (elf_i386_size_dynamic_sections): Likewise.
4982 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4983 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4984 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4985 all 4 GOT_TLS_* TLS types.
4986
4987 2002-09-19 Nick Clifton <nickc@redhat.com>
4988
4989 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4990 follow indirect links.
4991
4992 2002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4993
4994 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4995 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4996 on 64 bit machines.
4997 (ecoff_swap_sym_in) <iss>: Likewise.
4998 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4999 ECOFF information: 'ioptMax' refers to the actual *size*
5000 of the optimization symtab, not the number of entries.
5001
5002 2002-09-19 Daniel Jacobowitz <drow@mvista.com>
5003
5004 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5005 ELF_LINK_HASH_NEEDS_PLT logic.
5006
5007 2002-09-18 Daniel Jacobowitz <drow@mvista.com>
5008
5009 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5010 correct relocation count.
5011
5012 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
5013
5014 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5015 * bfd.c (struct _bfd): Add dynsymcount.
5016 * bfd-in2.h: Regenerated.
5017 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5018 abfd->dynsymcount.
5019 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5020 for overflow.
5021
5022 2002-09-17 Stan Cox <scox@redhat.com>
5023
5024 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5025 (mips_elf64_final_gp): Don't make up gp value.
5026 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5027 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5028 .MIPS.options/.options section.
5029
5030 2002-09-17 David O'Brien <obrien@FreeBSD.org>
5031
5032 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5033 It is benign for FreeBSD < 4.1. Minor reformatting.
5034 * elf64-alpha-fbsd.c: Likewise.
5035
5036 2002-09-17 Jakub Jelinek <jakub@redhat.com>
5037
5038 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5039 addend.
5040
5041 2002-09-17 Alan Modra <amodra@bigpond.net.au>
5042
5043 * elf64-alpha.c (alpha_elf_size_info): Make static.
5044
5045 2002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5046
5047 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5048 * cpu-tic4x.c: Ditto.
5049
5050 2002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5051
5052 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5053 duplicate define.
5054
5055 2002-09-16 Bruno Haible <bruno@clisp.org>
5056
5057 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5058 by a target variant implementation.
5059 * elf64-alpha.c: Likewise.
5060 * elf32-i386-fbsd.c: New file.
5061 * elf64-alpha-fbsd.c: New file.
5062 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5063 bfd_elf64_alpha_freebsd_vec.
5064 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5065 bfd_elf64_alpha_freebsd_vec.
5066 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5067 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5068 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5069 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5070 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5071 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5072 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5073
5074 2002-09-12 Jakub Jelinek <jakub@redhat.com>
5075
5076 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5077 NULL.
5078 (elf_i386_relocate_section): Return false after printing error about
5079 unresolvable relocation.
5080
5081 2002-09-12 Nick Clifton <nickc@redhat.com>
5082
5083 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5084 R_ARM_THM_PC11.
5085
5086 2002-09-11 Jeffrey Law <law@redhat.com>
5087
5088 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5089
5090 2002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5091
5092 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5093 line_ptr before deciding we've found a symbol.
5094
5095 2002-09-11 Nick Clifton <nickc@redhat.com>
5096
5097 * po/da.po: New Danish translation file.
5098 * configure.in (LINGUAS): Add 'da'.
5099 * configure: Regenerate.
5100
5101 2002-09-10 Michael Snyder <msnyder@redhat.com>
5102
5103 * irix-core.c (do_sections, do_sections64): New functions.
5104 (irix_core_core_file_p): Call new functions do_sections,
5105 do_sections64, depending on corefile (32-bit or 64-bit).
5106
5107 2002-09-09 Richard Henderson <rth@redhat.com>
5108
5109 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5110 and PCREL21F like PCREL21B.
5111
5112 2002-09-04 Kevin Buettner <kevinb@redhat.com>
5113
5114 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5115 vector.
5116
5117 2002-09-02 Nick Clifton <nickc@redhat.com>
5118
5119 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5120 names instead of cryptically overloaded bfd_reloc error
5121 codes.
5122 (v850_elf_relocate_section): Likewise.
5123 (v850_elf_relax_section): Replace caching of external symbols
5124 with caching of internal symbols obtained from calling
5125 bfd_elf_get_elf_syms().
5126 Fixup problems with freeing cached allocated memory blocks.
5127
5128 2002-09-02 Alan Modra <amodra@bigpond.net.au>
5129
5130 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5131 (bfd_pj_arch): Use bfd_default_scan.
5132 * cpu-v850.c (scan): Remove.
5133 (N): Use bfd_default_scan.
5134 * cpu-z8k.c (scan_mach): Remove.
5135 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5136 first. Use bfd_default_scan.
5137
5138 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5139 bfd_mach constants.
5140 (ecoff_get_magic): Likewise.
5141 * elf32-v850.c (v850_elf_object_p): Likewise.
5142 (v850_elf_final_write_processing): Likewise.
5143 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5144 (MY(write_object_contents)): Likewise.
5145 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5146 * coffcode.h (coff_write_object_contents): Likewise.
5147 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5148 Remove unnecessary "machine" assignments.
5149 (coff_write_relocs): Test for the absolute section sym by testing
5150 section and flags.
5151
5152 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5153 and bfd_mach_i386_i386_intel_syntax.
5154 * pdp11.c (NAME(aout,machine_type)): Likewise.
5155
5156 2002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5157
5158 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5159 * bfd-in2.h (align_power): Likewise.
5160
5161 2002-08-30 Alan Modra <amodra@bigpond.net.au>
5162
5163 * Makefile.am: Run "make dep-am".
5164 * Makefile.in: Regenerate.
5165
5166 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5167 * cpu-powerpc.c (powerpc_compatible): Likewise.
5168 * cpu-rs6000.c (rs6000_compatible): Likewise.
5169
5170 2002-08-28 Catherine Moore <clm@redhat.com>
5171
5172 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
5173 (v850-elf-reloc): Don't resolve pc relative relocs.
5174 (v850_elf_ignore_reloc): New routine.
5175 (v850_elf_final_link_relocate): Handle new relocs.
5176 (v850_elf_relax_delete_bytes ): New routine.
5177 (v850_elf_relax_section): New routine.
5178 (bfd_elf32_bfd_relax_section): Define.
5179 (HOWTO): New entries for new relocs.
5180 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5181 (BFD_RELOC_V850_LONGJUMP): New reloc.
5182 (BFD_RELOC_V850_ALIGN): New reloc.
5183 * archures.c: Remove redundant v850ea architecture.
5184 * cpu-v850.c: Remove redundant v850ea support.
5185 * libbfd.h: Regenerate.
5186 * bfd-in2.h: Regenerated.
5187
5188 2002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5189
5190 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5191 * configure.in: Add tic4x_coff vector files.
5192 * configure: Regenerate.
5193 * Makefile.am: Add tic4x target.
5194 * Makefile.in: Regenerate.
5195
5196 2002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5197
5198 * archures.c: Add the BFD arch type tic4x.
5199 * bfd-in.h: Add BFD_IN_MEMORY flag.
5200 * coff-tic4x.c: New file.
5201 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5202 * cpu-tic4x.c: New file.
5203 * targets.c: Added tic4x- in list of xvecs.
5204 * ticoff.h: New file.
5205 * bfd-in2.h: Regenerate.
5206
5207 2002-08-27 Adam Nemet <anemet@lnxw.com>
5208
5209 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5210 bit of DT_INIT and DT_FINI for Thumb functions.
5211
5212 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5213
5214 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5215
5216 2002-08-26 Alan Modra <amodra@bigpond.net.au>
5217
5218 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5219
5220 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5221
5222 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5223 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5224 Likewise.
5225 (struct elf_sh_pcrel_relocs_copied): Removed.
5226 (struct elf_sh_dyn_relocs): New.
5227 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5228 field with dyn_relocs.
5229 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5230 sections and sym_sec.
5231 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5232 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5233 (sh_elf_create_dynamic_sections): Use create_got_section instead
5234 of _bfd_elf_create_got_section.
5235 (sh_elf_check_relocs): Likewise.
5236 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5237 sections.
5238 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5239 sh_elf_relocate_section, sh_elf_check_relocs,
5240 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5241 Likewise.
5242 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5243 dynamic relocations and avoiding the copy relocation when we
5244 didn't find any dynamic relocations in the section which has
5245 contents or is read-only.
5246 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5247 (sh_elf_size_dynamic_sections): Don't reset the size of
5248 .rela.got section even if dynamic_sections_created flag is off.
5249 Don't use sh_elf_discard_copies. Scan all input bfd and use
5250 allocate_dynrelocs. Call readonly_dynrelocs to determine
5251 whether we need DT_TEXTREL.
5252 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5253 whether the symbol was never referred to.
5254 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5255 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5256 (sh_elf_check_relocs): Call create_got_section if the short-cut
5257 to .got is null. Increment reference counters only instead of
5258 allocating space on dynamic sections here. Don't conditionalize
5259 uninitialized got.offset value when marking the symbol as a
5260 global offset table entry. Keep relocations for symbols satisfied
5261 by a dynamic library to avoid copy relocations for the symbol.
5262 Set dynobj field of an elf hash table if needed.
5263 (sh_elf_finish_dynamic_sections): Handle null section pointer
5264 correctly.
5265 (elf_backend_copy_indirect_symbol): Defined.
5266 (elf_backend_can_refcount): Defined.
5267
5268 2002-08-23 Nick Clifton <nickc@redhat.com>
5269
5270 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5271 previous change. Add comment explaining why.
5272
5273 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5274
5275 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5276 contents of .got.plt[2] to tr0, not address of .got.plt.
5277 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5278 patching absolute plt entry. For shmedia plt entry, set bottom bit
5279 of branch to plt0 as this is a branch to an shmedia instruction.
5280 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5281 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5282 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5283 branch to plt0.
5284 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5285 patching absolute plt entry. For shmedia plt entry, branch to
5286 plt0 is now ptrel, so use relative offset. Set bottom bit of
5287 branch target as it is a branch to an shmedia instruction.
5288
5289 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5290 Richard Shann <richard.shann@superh.com>
5291
5292 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5293 value if .init is an SHmedia function. Similarly for DT_FINI.
5294 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
5295
5296 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5297
5298 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
5299 dynamic section.
5300 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
5301
5302 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5303
5304 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
5305 byte read when reading the return address register column.
5306
5307 2002-08-22 Nick Clifton <nickc@redhat.com>
5308
5309 * config.bfd: Add powepc64-*-*bsd* target.
5310
5311 2002-08-22 Graeme Peterson <gp@qnx.com>
5312
5313 * Makefile.am: Add entries for elf32-shqnx.c
5314 * Makefile.in: Regenerate.
5315 * config.bfd: Add support sh-*-nto* target.
5316 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5317 * configure: Regenerate.
5318 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5319 * elf32-sh.c: Do not include elf32-target.h if
5320 ELF32_SH_C_INCLUDED is defined.
5321 * elf32-shqnx.c: New file: Support for QNX.
5322 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5323
5324 2002-08-22 Nick Clifton <nickc@redhat.com>
5325
5326 * po/tr.po: Updated Turkish translation.
5327
5328 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5329 symbols are not read.
5330
5331 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5332
5333 * elf32-m68hc11.c: Formatting fixes.
5334 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5335 * elf32-m68hc12.c: Formatting fixes.
5336 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5337
5338 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5339
5340 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5341 SEC_DATA.
5342 (pmac_xcoff_vec): Likewise.
5343 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5344 (aix5coff64_vec): Likewise.
5345
5346 2002-08-22 Alan Modra <amodra@bigpond.net.au>
5347
5348 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5349 param to elf_backend_copy_indirect_symbol.
5350 (_bfd_elf_link_hash_copy_indirect): Likewise.
5351 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5352 calls to copy_indirect_symbol.
5353 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5354 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5355 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5356 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5357 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5358 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5359 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5360 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5361 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5362 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5363 test refcounts for "used" values.
5364
5365 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5366
5367 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5368 argument declaration.
5369
5370 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
5371
5372 * archures.c (bfd_mach_ppc_e500): Added.
5373 * bfd-in2.h: Rebuilt.
5374 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5375
5376 2002-08-19 Alan Modra <amodra@bigpond.net.au>
5377
5378 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5379
5380 2002-08-17 Andrew Cagney <ac131313@redhat.com>
5381
5382 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
5383 `bfd_byte'.
5384
5385 2002-08-17 Stan Cox <scox@redhat.com>
5386
5387 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5388 IRIX 6 segment layout for NEWABI.
5389
5390 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5391
5392 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
5393 symbols when looking for section referred to by a relocation.
5394 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
5395
5396 2002-08-15 Alan Modra <amodra@bigpond.net.au>
5397
5398 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5399
5400 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
5401
5402 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5403 missing check for whether the symbol is referenced by DSO before
5404 unexporting it as an unneeded dynamic symbol.
5405
5406 2002-08-14 H.J. Lu <hjl@gnu.org>
5407
5408 * libbfd.h: Regenerate.
5409
5410 2002-08-14 H.J. Lu <hjl@gnu.org>
5411
5412 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5413
5414 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5415
5416 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5417 instructions.
5418 (m68hc11_direct_relax): New to define table of relaxable instructions.
5419 (find_relaxable_insn): New, find a relaxable insn.
5420 (compare_reloc): New to compare two relocs.
5421 (m68hc11_elf_relax_section): New, relax text sections.
5422 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5423 (elf32_m68hc11_check_relocs): New function for GC support.
5424 (elf32_m68hc11_relocate_section): New function for GC support.
5425 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5426 (elf_backend_check_relocs): Likewise.
5427 (elf_backend_relocate_section): Likewise.
5428
5429 2002-08-13 H.J. Lu <hjl@gnu.org>
5430
5431 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5432 definitions in shared objects when checking symbol with
5433 undefined version.
5434
5435 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5436
5437 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5438 (elf32_m68hc11_gc_sweep_hook): Likewise.
5439 (elf_backend_gc_mark_hook): Define for GC section support.
5440 (elf_backend_gc_sweep_hook): Likewise.
5441 (elf_backend_can_gc_sections): Likewise.
5442
5443 * elf32-m68hc12.c: Likewise.
5444
5445 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5446
5447 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5448 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5449 (_bfd_m68hc11_elf_set_private_flags): New function.
5450 Use them to set/check/print ELF flags specific to 68HC11.
5451
5452 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5453 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5454 (_bfd_m68hc12_elf_set_private_flags): New function.
5455 Use them to set/check/print ELF flags specific to 68HC12.
5456
5457 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5458
5459 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5460 fix masks for PC-rel relocs.
5461 (m68hc11_elf_ignore_reloc): New function.
5462
5463 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5464 68HC12 banked addressing relocs.
5465 (m68hc12_phys_addr): New to compute physical address of banked memory.
5466 (m68hc12_phys_page): Likewise for page.
5467 (m68hc12_addr_is_banked): New to see if address is in banked area.
5468 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5469
5470 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5471
5472 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5473 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5474 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5475 * bfd-in2.h: Regenerate.
5476
5477 2002-08-12 H.J. Lu <hjl@gnu.org>
5478
5479 * elflink.h (elf_add_default_symbol): Preserve section across
5480 elf_merge_symbol.
5481
5482 2002-08-09 Graeme Peterson <gp@qnx.com>
5483
5484 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
5485 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5486 * Makefile.in: Regenerate.
5487 * config.bfd: Add support for powerpc{le}-*-nto targets.
5488 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5489 * configure: Regenerate.
5490 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5491 common file "elf32-qnx.h", and now include that file.
5492 * elf32-qnx.h: New file: QNX specific common elf backend.
5493 * elf32-ppc.c: Do not include elf32-target.h if
5494 ELF32_PPC_C_INCLUDED is defined.
5495 * elf32-ppcqnx.c: New file: Support for QNX.
5496 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5497 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5498
5499 2002-08-09 Nick Clifton <nickc@redhat.com>
5500
5501 * po/sv.po: Updated Swedish translation.
5502
5503 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5504
5505 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5506 g->global_gotsym is NULL.
5507
5508 2002-08-08 H.J. Lu <hjl@gnu.org>
5509
5510 * elflink.h (elf_add_default_symbol): Don't warn if a definition
5511 overrides an indirect versioned symbol.
5512
5513 2002-08-08 Jakub Jelinek <jakub@redhat.com>
5514
5515 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5516 for R_386_TLS_TPOFF32 relocs against symndx 0.
5517
5518 2002-08-07 H.J. Lu <hjl@gnu.org>
5519
5520 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5521 with undefined version if needed.
5522 (elf_link_assign_sym_version): Match a default symbol with a
5523 version without definition. No need to hide the default
5524 definition separately.
5525
5526 2002-08-08 Alan Modra <amodra@bigpond.net.au>
5527
5528 * elflink.h (elf_link_output_extsym): Don't output symbols from
5529 SEC_EXCLUDE sections.
5530
5531 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5532
5533 2002-08-07 Alan Modra <amodra@bigpond.net.au>
5534
5535 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5536 entries.
5537
5538 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5539
5540 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5541 mismatch.
5542
5543 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5544
5545 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5546
5547 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5548
5549 * elf32-mips.c (mips_reloc_map): Fix typo.
5550
5551 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5552
5553 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5554
5555 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5556
5557 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5558
5559 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5560
5561 * libxcoff.h: Use PARAMS on function declarations.
5562 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5563 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5564
5565 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5566 addend.
5567 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5568
5569 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5570
5571 * coff-rs6000.c: Formatting fixes.
5572 (xcoff_calculate_relocation): Use PARAMS in declaration.
5573 (xcoff_complain_overflow): Likewise.
5574 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5575 (bfd_xcoff_backend_data): Remove useless comments.
5576 (rs6000coff_vec): Likewise.
5577 (bfd_pmac_xcoff_backend_data): Likewise.
5578 (pmac_xcoff_vec): Likewise.
5579
5580 * coff64-rs6000.c: Formatting fixes.
5581 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5582 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5583 (bfd_xcoff_backend_data): Remove useless comments.
5584 (rs6000coff64_vec): Likewise.
5585 (bfd_xcoff_aix5_backend_data): Likewise.
5586 (aix5coff64_vec): Likewise.
5587
5588 2002-08-06 Alan Modra <amodra@bigpond.net.au>
5589
5590 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5591 mask entries. Use complain_overflow_dont for R_REF.
5592 (xcoff_reloc_type_ba): Revert last change.
5593 (xcoff_reloc_type_br): Likewise.
5594 (xcoff_reloc_type_crel): Likewise.
5595 (xcoff_ppc_relocate_section): Likewise.
5596 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5597 (xcoff64_ppc_relocate_section): Likewise.
5598 (xcoff64_howto_table): Revert some of last change to mask entries.
5599 Use complain_overflow_dont for R_REF.
5600
5601 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5602 relocs with bitsize == 16 have size = 1.
5603 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5604 (xcoff_reloc_type_br): Likewise.
5605 (xcoff_reloc_type_crel): Likewise.
5606 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5607 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5608 dst_mask adjustment.
5609 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5610 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5611 bitsize == 16 have size = 1.
5612
5613 2002-08-01 Denis Chertykov <denisc@overta.ru>
5614
5615 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5616 (struct misc): New field isymbuf. All free_* fields removed.
5617 (symbol_value): Pass in internal syms. No need to swap syms in.
5618 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5619 possibly cached info.
5620 (tidyup_after_error): Removed.
5621 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5622 misc. Use new field.
5623 (adjust_all_relocations): Use internal syms. No need to swap syms
5624 in and out.
5625 (add_page_insn): Don't use removed fields of struct misc.
5626
5627 2002-08-01 Nick Clifton <nickc@redhat.com>
5628
5629 * elf32-arm.h: Revert previous delta.
5630
5631 2002-08-01 Nick Clifton <nickc@redhat.com>
5632
5633 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5634 * configure: Regenerate.
5635
5636 2002-07-31 H.J. Lu <hjl@gnu.org>
5637
5638 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5639 selected.
5640
5641 2002-07-31 H.J. Lu <hjl@gnu.org>
5642
5643 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5644 is selected.
5645
5646 2002-07-31 Jakub Jelinek <jakub@redhat.com>
5647
5648 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5649 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5650
5651 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5652
5653 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5654 There is no 8 byte relocation type for this architecture.
5655 (do_ns32k_reloc): Use bfd_vma instead of native types.
5656 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5657 returns void.
5658 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5659 rely on generic code to do that.
5660 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5661 to all table entries.
5662 (_bfd_ns32k_relocate_contents): put_data returns void.
5663 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5664 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5665 return void.
5666
5667 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5668
5669 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5670 archive object is target dependant.
5671
5672 2002-07-31 Adam Nemet <anemet@lnxw.com>
5673
5674 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5675 (THUMB_PLT_ENTRY_SIZE): New macro.
5676 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5677 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5678 ARM_PLT_ENTRY_SIZE.
5679 (elf32_arm_plt_entry): Likewise.
5680 (elf_backend_plt_header_size): Likewise.
5681 (elf32_thumb_plt0_entry): New global.
5682 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5683 into .plt.thumb.
5684 (elf32_thumb_plt_entry): New global.
5685 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5686 Thumb entries. Set the bottom bit of the corresponding GOT entry
5687 for a Thumb PLT entry.
5688 (struct elf32_arm_plt_entry_info): New structure.
5689 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5690 type.
5691 (elf32_arm_link_hash_newfunc): Initialize new member.
5692 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5693 relocations against the PLT.
5694 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5695 first_rel_type if this is the first time we encounter the symbol.
5696 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5697 Determine if relocation needs a PLT entry. Set first_rel_type if
5698 this is the first time we encounter the symbol
5699 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5700 functions as well.
5701 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5702 (elf32_arm_create_dynamic_sections): New function. Create the
5703 .plt.thumb section.
5704 (elf_backend_create_dynamic_sections): Call it.
5705
5706 2002-07-31 Nick Clifton <nickc@redhat.com>
5707
5708 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5709 'alternative' in order to avoid shadowing global symbol of the
5710 same name.
5711 * bfd-in2.h: Regenerate.
5712 * libbfd.h: Regenerate.
5713 * libcoff.h: Regenerate.
5714
5715 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5716
5717 * Makefile.am: Add n32 ABI support.
5718 * Makefile.in: Regenerate.
5719 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5720 bit vectors for mips*-*-linux targets as optional.
5721 * configure.in: Add n32 ABI vectors.
5722 * configure: Regenerate.
5723 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5724 * elfn32-mips.c: New file, n32 ABI support.
5725 * targets.c: Add n32 ABI vectors.
5726
5727 2002-07-30 Graeme Peterson <gp@qnx.com>
5728
5729 * elfarmqnx-nabi.c: New file: Support for QNX.
5730 * config.bfd: Add support for arm-*-nto target.
5731 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5732 * configure: Regenerate.
5733 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5734 * Makefile.in: Regenerate.
5735 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5736 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5737 * elfarm-nabi.c: Do not include elf32-arm.h if
5738 ELFARM_NABI_C_INCLUDED is defined.
5739 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
5740
5741 2002-07-30 Nick Clifton <nickc@redhat.com>
5742
5743 * po/sv.po: Updated Swedish translation.
5744
5745 2002-07-30 Jakub Jelinek <jakub@redhat.com>
5746
5747 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5748
5749 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5750
5751 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5752 * archive.c (bfd_generic_archive_p): Likewise.
5753 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5754 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5755 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5756 (xcoff64_archive_p): Likewise.
5757 (xcoff64_openr_next_archived_file): Likewise.
5758 (xcoff64_archive_p): Clean up tdata properly on error.
5759 * coffgen.c (coff_real_object_p): Likewise.
5760 (coff_object_p): Release filehdr and opthdr.
5761 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5762 * ieee.c (ieee_archive_p): Likewise.
5763 * ihex.c (ihex_object_p): Likewise.
5764 (ihex_mkobject): Always allocate tdata.
5765 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5766 * srec.c (srec_mkobject): Always allocate tdata.
5767 (srec_object_p): Clean up tdata properly on error.
5768 (symbolsrec_object_p): Likewise.
5769 * versados.c (versados_object_p): Likewise.
5770 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5771 and bfd_realloc instead of realloc.
5772 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5773 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5774 place of bfd_malloc, simplifying error freeing. Free hash table too.
5775 (vms_object_p): Clean up tdata on error.
5776 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5777 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5778
5779 2002-07-30 Alan Modra <amodra@bigpond.net.au>
5780
5781 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5782
5783 2002-07-26 Chris Demetriou <cgd@broadcom.com>
5784
5785 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5786 flags into resulting BFD.
5787
5788 2002-07-26 Alan Modra <amodra@bigpond.net.au>
5789
5790 From John Reiser <jreiser@BitWagon.com>
5791 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5792 tls_ldm_got.refcount.
5793
5794 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5795
5796 * elf64-mips.c: Update TODO comment.
5797 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5798 mips_elf64_gprel16_reloca): Remove prototypes.
5799 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5800 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5801 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5802 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5803 R_MIPS_HIGHEST.
5804 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5805 R_MIPS_GOT16. Remove wrong comments.
5806 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5807 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5808 from elf32-mips.c.
5809 (mips_elf64_hi16_reloc): Fix formatting.
5810 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5811 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5812 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5813 (mips_elf64_gprel16_reloc): Make static. Add check for
5814 partial_inplace.
5815 (mips_elf64_gprel16_reloca): Remove.
5816 (mips_elf64_literal_reloc): New function.
5817 (mips_elf64_gprel32_reloc): Fix formatting.
5818 (mips_elf64_shift6_reloc): Fix comment. Make static.
5819 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5820 elf32-mips.c.
5821 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5822 elf32-mips.c
5823 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5824 specific relocations.
5825 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5826 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5827 (ELF_MAXPAGESIZE): Add comment.
5828
5829 2002-07-25 Nick Clifton <nickc@redhat.com>
5830
5831 * po/sv.po: Updated Swedish translation.
5832 * po/es.po: Updated Spanish translation.
5833 * po/fr.po: Updated French translation.
5834
5835 2002-07-25 Alan Modra <amodra@bigpond.net.au>
5836
5837 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5838 as elf_link_record_local_dynamic_symbol.
5839 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5840 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5841 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5842 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5843 attempt is made to record a symbol in a discarded section, and
5844 return `2' in that case.
5845
5846 2002-07-24 Nick Clifton <nickc@redhat.com>
5847
5848 * po/sv.po: Updated Swedish translation.
5849 * po/es.po: Updated Spanish translation.
5850
5851 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5852
5853 * po/SRC-POTFILES.in: Regenerate.
5854
5855 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5856 immediately. Remove code handling relocatable linking.
5857 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5858 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5859 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
5860 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5861 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5862 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5863 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5864 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5865 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5866 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5867 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5868 * elf32-avr.c (elf_backend_rela_normal): Define.
5869 * elf32-cris.c: Likewise.
5870 * elf32-fr30.c: Likewise.
5871 * elf32-frv.c: Likewise.
5872 * elf32-h8300.c: Likewise.
5873 * elf32-hppa.c: Likewise.
5874 * elf32-ip2k.c: Likewise.
5875 * elf32-sparc.c: Likewise.
5876 * elf32-v850.c: Likewise.
5877 * elf32-vax.c: Likewise.
5878 * elf64-hppa.c: Likewise.
5879 * elf64-sparc.c: Likewise.
5880 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
5881 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
5882 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5883 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5884 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5885 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5886 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5887 * elf-m10200.c (USE_RELA): Don't define.
5888 * elf-m10300.c: Likewise.
5889 * elfarm-oabi.c: Likewise.
5890 * elf32-i370.c: Likewise.
5891 * elf32-ip2k.c: Likewise.
5892 * elf32-m68k.c: Likewise.
5893 * elf32-mcore.c: Likewise.
5894 * elf32-ppc.c: Likewise.
5895 * elf32-s390.c: Likewise.
5896 * elf32-vax.c: Likewise.
5897 * elf64-ppc.c: Likewise.
5898 * elf64-s390.c: Likewise.
5899 * elf64-x86-64.c: Likewise.
5900 * elfxx-ia64.c: Likewise.
5901 * elf32-avr.c (USE_REL): Don't undef.
5902 * elf32-ip2k.c: Likewise.
5903
5904 2002-07-23 Nick Clifton <nickc@redhat.com>
5905
5906 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5907 'want_p_paddr_set_to_zero'.
5908 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5909 to false;
5910 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5911 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5912
5913 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5914
5915 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5916 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5917 show the Copyright string.
5918 Minor formatting tidy ups.
5919
5920 2002-07-23 Nick Clifton <nickc@redhat.com>
5921
5922 * po/fr.po: Updated French translation.
5923 * po/sv.po: Updated Swedish translation.
5924
5925 2002-07-23 Alan Modra <amodra@bigpond.net.au>
5926
5927 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5928 when outputting relocs.
5929
5930 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5931
5932 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5933 DT_PLTGOT into the dynamic section if there is a PLT.
5934
5935 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5936
5937 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5938 elf32-mips.c.
5939 (_bfd_mips_elf_write_section): Likewise.
5940 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5941 (_bfd_mips_elf_write_section): Likewise.
5942 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5943 (elf32_mips_write_section): Likewise.
5944 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5945 (_bfd_mips_elf_write_section): Likewise.
5946
5947 2002-07-19 Alan Modra <amodra@bigpond.net.au>
5948
5949 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5950 PT_IA_64_UNWIND segments for a given section.
5951
5952 2002-07-17 H.J. Lu <hjl@gnu.org>
5953
5954 * Makefile.am: Fix a typo.
5955 * Makefile.in: Regenerate.
5956
5957 2002-07-15 Denis Chertykov <denisc@overta.ru>
5958 Frank Ch. Eigler <fche@redhat.com>
5959 Ben Elliston <bje@redhat.com>
5960 Alan Lehotsky <alehotsky@cygnus.com>
5961 John Healy <jhealy@redhat.com>
5962 Graham Stott <grahams@redhat.com>
5963 Jeff Johnston <jjohnstn@redhat.com>
5964
5965 * Makefile.am: Add support for ip2k.
5966 * Makefile.in: Regenerate.
5967 * doc/Makefile.in: Regenerate.
5968 * archures.c: Add support for ip2k.
5969 * config.bfd: Add support for ip2k.
5970 * configure.in: Add support for ip2k.
5971 * configure: Regenerate.
5972 * reloc.c: Add support for ip2k.
5973 * targets.c: Add support for ip2k.
5974 * bfd-in2.h: Regenerate.
5975 * libbfd.h: Regenerate.
5976 * cpu-ip2k.c: New file.
5977 * elf32-ip2k.c: New file.
5978
5979 2002-07-17 Ian Rickards <irickard@arm.com>
5980
5981 * dwarf2.c (concat_filename): If we can't establish the directory
5982 just return the filename.
5983
5984 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
5985
5986 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5987
5988 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5989
5990 * elflink.h: Formatting fixes, tidy prototypes.
5991 (elf_link_assign_sym_version): Move common code out of loop.
5992
5993 2002-07-16 Alan Modra <amodra@bigpond.net.au>
5994
5995 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5996 reloc section size is zero. Correct reloc output location.
5997
5998 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5999
6000 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6001 the final type for the e_fsel selector when generating PA2.0W code.
6002 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6003 relocations.
6004
6005 2002-07-14 H.J. Lu <hjl@gnu.org>
6006
6007 * elflink.h (elf_link_assign_sym_version): Hide the default
6008 definition if there is a hidden versioned definition.
6009
6010 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
6011
6012 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6013 dynamic reference test in assertion when initializing GOT with
6014 static contents. Just assert that there are either no dynamic
6015 sections, the symbol is defined in the regular objects or that the
6016 symbol is undef weak. Tweak comment.
6017 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6018 only if the symbol isn't defined in the program and isn't undef
6019 weak.
6020 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6021 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6022 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6023 (elf_cris_discard_excess_program_dynamics): Don't consider
6024 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6025
6026 2002-07-11 Alan Modra <amodra@bigpond.net.au>
6027
6028 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6029 unresolved debugging relocs in dynamic applications.
6030 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6031 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6032 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6033 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6034 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6035 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6036
6037 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6038
6039 * elf64-ppc.c (ONES): Define.
6040 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6041 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6042 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6043
6044 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6045 (ppc64_elf_set_private_flags): Delete.
6046 (ppc64_elf_section_from_shdr): Delete.
6047 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6048 (ppc64_elf_fake_sections): Delete.
6049 (bfd_elf64_bfd_set_private_flags): Don't define.
6050 (bfd_elf64_get_symbol_info): Likewise.
6051 (elf_backend_section_from_shdr): Likewise.
6052 (elf_backend_fake_sections): Likewise.
6053
6054 2002-07-10 Marco Walther <Marco.Walther@sun.com>
6055
6056 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6057 when not already set.
6058 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6059 (elf_backend_fake_sections): Define.
6060
6061 2002-07-10 Alan Modra <amodra@bigpond.net.au>
6062
6063 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6064 Formatting.
6065 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6066
6067 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
6068
6069 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6070 NULL sym_hashes to just before use.
6071 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6072 symbol with non-default visibility.
6073 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6074 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6075 Ditto.
6076 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6077 symbol with non-default visibility.
6078 (cris_elf_check_relocs): At tests for local symbol before
6079 increasing h->plt.refcount, also check for non-default
6080 visibility. Ditto when checking for local symbol to eliminate
6081 pc-relative runtime relocs.
6082
6083 2002-07-08 Alan Modra <amodra@bigpond.net.au>
6084
6085 * elf.c: Formatting.
6086 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6087 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6088 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6089 segments.
6090
6091 2002-07-07 Mark Mitchell <mark@codesourcery.com>
6092 Alan Modra <amodra@bigpond.net.au>
6093
6094 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6095 account the impact of relocation count overflow when computing
6096 section offsets.
6097 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6098 or not to apply the PE COFF reloc overflow handling. Fix a
6099 fencepost error in deciding whether or not to use that technique.
6100
6101 2002-07-07 Alan Modra <amodra@bigpond.net.au>
6102
6103 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6104 change type of locsyms.
6105 (bfd_elf_get_elf_syms): Declare.
6106 * elf.c (bfd_elf_get_elf_syms): New function.
6107 (group_signature): Use bfd_elf_get_elf_syms.
6108 (bfd_section_from_r_symndx): Likewise.
6109 * elfcode.h (elf_slurp_symbol_table): Likewise.
6110 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6111 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6112 locality of various data structures. Properly free internal relocs.
6113 (elf_bfd_final_link): Properly free internal relocs.
6114 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6115 (elf_link_input_bfd): Likewise.
6116 (elf_gc_mark): Likewise. Properly free internal relocs.
6117 (elf_gc_sweep): Properly free internal relocs.
6118 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6119 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6120 internal relocs.
6121 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6122 Properly free possibly cached info.
6123 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6124 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6125 symbol swapping code.
6126 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6127 Properly free possibly cached info.
6128 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6129 (mn10300_elf_relax_delete_bytes): Likewise.
6130 (mn10300_elf_symbol_address_p): Likewise.
6131 (mn10300_elf_get_relocated_section_contents): Likewise.
6132 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6133 (elf32_h8_relax_delete_bytes): Likewise.
6134 (elf32_h8_symbol_address_p): Likewise.
6135 (elf32_h8_get_relocated_section_contents): Likewise.
6136 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6137 (m32r_elf_relax_delete_bytes): Likewise.
6138 (m32r_elf_get_relocated_section_contents): Likewise.
6139 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6140 elf_section_data to determine whether cached.
6141 (sh_elf_relax_section): As above for elf-m10200.c.
6142 (sh_elf_relax_delete_bytes): Likewise.
6143 (sh_elf_get_relocated_section_contents): Likewise.
6144 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6145 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6146 reading of local syms.
6147 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6148 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6149 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6150 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6151 relocs.
6152 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6153 free internal relocs and section contents. Don't read symbols.
6154 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6155 (elf32_hppa_size_stubs): Don't free local syms.
6156 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6157 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6158 possibly cached info.
6159 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6160 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6161 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6162 all_local_syms.
6163 (get_local_syms): Delete function.
6164 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6165 on exit.
6166 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6167
6168 2002-07-05 Jim Wilson <wilson@redhat.com>
6169
6170 * syms.c (decode_section_type): New.
6171 (bfd_decode_symclass): Call decode_section_type.
6172
6173 2002-07-04 Jakub Jelinek <jakub@redhat.com>
6174
6175 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6176 section content start.
6177 Reported by Michael Schumacher <mike@hightec-rt.com>.
6178
6179 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6180
6181 * section.c (_bfd_strip_section_from_output): Remove unnecessary
6182 link order code. Don't actually remove the output section here;
6183 Just set a flag for the linker to do so.
6184 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6185 sections when setting up output section dynsyms.
6186
6187 2002-07-04 Alan Modra <amodra@bigpond.net.au>
6188
6189 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6190 fudge.
6191 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6192 libs here instead.
6193
6194 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6195
6196 * elf64-s390.c (create_got_section): Set .got section alignment to
6197 8 bytes.
6198 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6199
6200 2002-07-02 Alan Modra <amodra@bigpond.net.au>
6201
6202 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6203
6204 2002-07-01 Matt Thomas <matt@3am-software.com>
6205
6206 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6207 to EF_VAX_*.
6208
6209 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6210
6211 * elfxx-mips.c (ABI_64_P): Fix comment.
6212 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6213 new section names for N64 ABI.
6214 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6215 (mips_elf_calculate_relocation): Code formatting.
6216 (mips_elf_create_dynamic_relocation): Likewise.
6217 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6218 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6219 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6220 in any NewABI.
6221 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6222 for NewABI.
6223 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6224 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6225 here, too.
6226
6227 2002-07-01 Andreas Schwab <schwab@suse.de>
6228
6229 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6230 R_X86_64_64 to R_X86_64_RELATIVE.
6231
6232 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6233
6234 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6235 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6236 Run "make dep-am".
6237 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6238 host_aout_vec.
6239 * configure.in (vaxbsd_vec): Add.
6240 * targets.c (vaxbsd_vec): Add.
6241 * Makefile.in: Rebuild.
6242 * configure: Rebuild.
6243 * po/SRC-POTFILES.in: Rebuild.
6244
6245 2002-07-01 Alan Modra <amodra@bigpond.net.au>
6246
6247 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6248 examining to gc_mark_hook, rather than the bfd.
6249 (elf_gc_sections): Adjust.
6250 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6251 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6252 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6253 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6254 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6255 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6256 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6257 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6258 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6259 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6260 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6261 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6262 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6263 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6264 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6265 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6266 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6267 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6268 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6269 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6270 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6271 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6272 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6273 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6274 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6275 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6276 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6277 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6278 redundant local sym tests.
6279 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6280 (link_hash_newfunc): Init is_entry.
6281 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6282 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6283 (create_linkage_sections): Use bfd_make_section_anyway rather than
6284 bfd_make_section.
6285 (ppc64_elf_mark_entry_syms): New function.
6286 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6287 up opd entry to function section map.
6288 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6289 relocs that reference the opd section.
6290 (edit_opd): New function.
6291 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6292 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6293 (get_local_syms): Do so here. Exit if we already have local syms.
6294 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6295 read local syms on non-ELF input.
6296 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6297 than duplicating it's function here. Adjust free of internal
6298 relocs to suit.
6299 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6300 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6301 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6302 _bfd_elf32_link_read_relocs rather than duplicating it's function
6303 here. Adjust free of internal relocs to suit.
6304
6305 2002-07-01 Andreas Jaeger <aj@suse.de>
6306
6307 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6308 are not allowed in shared libs code, enforce -fPIC.
6309
6310 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6311
6312 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6313 trailing zero-sequences when there's previous left-over data.
6314
6315 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6316
6317 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6318 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6319 and opd_rel_sec in order for starting rela section. Check _raw_size.
6320 (elf_backend_reloc_type_class): Define.
6321
6322 2002-06-27 Kevin Buettner <kevinb@redhat.com>
6323
6324 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6325 DWARF2 formats.
6326
6327 2002-06-27 Alan Modra <amodra@bigpond.net.au>
6328
6329 * cpu-powerpc.c: Comment on ordering of arch_info.
6330 * elf32-ppc.c (ppc_elf_object_p): New function.
6331 (elf_backend_object_p): Define.
6332 * elf64-ppc.c (ppc64_elf_object_p): New function.
6333 (elf_backend_object_p): Define.
6334
6335 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6336
6337 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6338 * configure: Regenerate.
6339
6340 2002-06-25 Jason Eckhardt <jle@rice.edu>
6341
6342 * dwarf2.c (decode_line_info): Check unit->addr_size
6343 to read in the proper number of prologue bytes.
6344
6345 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6346
6347 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6348 aix5coff64_vec if 64-bit bfd support has been enabled.
6349 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6350 been enabled.
6351
6352 * targets.c (_bfd_target_vector[]): Only include
6353 aix5coff64_vec if 64-bit bfd support has been enabled.
6354
6355 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6356
6357 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6358 * elf32-hppa.c (hppa_add_stub): Likewise.
6359 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6360 * elflink.h (elf_add_default_symbol): Fix comment typo.
6361 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6362 (elf_link_add_object_symbols): Likewise.
6363 (elf_link_assign_sym_version): Likewise.
6364 * hash.c (bfd_hash_lookup): Likewise.
6365 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6366 * section.c (bfd_get_unique_section_name): Likewise.
6367 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6368 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6369 (assign_section_numbers): Likewise.
6370 (_bfd_elfcore_make_pseudosection): Likewise.
6371 (elfcore_grok_lwpstatus): Likewise.
6372 (elfcore_grok_win32pstatus): Likewise.
6373 (elfcore_write_note): Constify input params. Use PTR instead of
6374 void *. Include terminating NUL in namesz. Correct padding.
6375 Support NULL "name" param. Use memcpy instead of strcpy.
6376 (elfcore_write_prpsinfo): Constify input params.
6377 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6378 (elfcore_write_lwpstatus): Likewise.
6379 (elfcore_write_pstatus): Likewise.
6380 (elfcore_write_prfpreg): Likewise.
6381 (elfcore_write_prxfpreg): Likewise.
6382 * elf-bfd.h (elfcore_write_note): Update declaration.
6383 (elfcore_write_prpsinfo): Likewise.
6384 (elfcore_write_prstatus): Likewise.
6385 (elfcore_write_pstatus): Likewise.
6386 (elfcore_write_prfpreg): Likewise.
6387 (elfcore_write_prxfpreg): Likewise.
6388 (elfcore_write_lwpstatus): Likewise.
6389
6390 2002-06-25 Jason Eckhardt <jle@rice.edu>
6391
6392 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6393 symbols of type stProc and stStaticProc.
6394
6395 2002-06-25 Nick Clifton <nickc@redhat.com>
6396
6397 * ecoff.c: VArious formatting fixes.
6398
6399 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6400
6401 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6402
6403 2002-06-25 Alan Modra <amodra@bigpond.net.au>
6404
6405 * aout-adobe.c: Don't compare against "true" or "false.
6406 * aout-target.h: Likewise.
6407 * aoutx.h: Likewise.
6408 * archive.c: Likewise.
6409 * bout.c: Likewise.
6410 * cache.c: Likewise.
6411 * coff-a29k.c: Likewise.
6412 * coff-alpha.c: Likewise.
6413 * coff-i386.c: Likewise.
6414 * coff-mips.c: Likewise.
6415 * coff-or32.c: Likewise.
6416 * coff64-rs6000.c: Likewise.
6417 * coffcode.h: Likewise.
6418 * coffgen.c: Likewise.
6419 * cpu-ns32k.c: Likewise.
6420 * ecoff.c: Likewise.
6421 * ecofflink.c: Likewise.
6422 * elf.c: Likewise.
6423 * elf32-arm.h: Likewise.
6424 * elf32-cris.c: Likewise.
6425 * elf32-d30v.c: Likewise.
6426 * elf32-i386.c: Likewise.
6427 * elf32-mcore.c: Likewise.
6428 * elf32-ppc.c: Likewise.
6429 * elf32-sh.c: Likewise.
6430 * elf32-sh64.c: Likewise.
6431 * elf32-v850.c: Likewise.
6432 * elf64-alpha.c: Likewise.
6433 * elf64-sh64.c: Likewise.
6434 * elfcode.h: Likewise.
6435 * elfcore.h: Likewise.
6436 * elflink.h: Likewise.
6437 * elfxx-mips.c: Likewise.
6438 * i386os9k.c: Likewise.
6439 * ieee.c: Likewise.
6440 * libbfd.c: Likewise.
6441 * linker.c: Likewise.
6442 * mmo.c: Likewise.
6443 * nlm32-alpha.c: Likewise.
6444 * nlm32-i386.c: Likewise.
6445 * nlm32-ppc.c: Likewise.
6446 * nlm32-sparc.c: Likewise.
6447 * nlmcode.h: Likewise.
6448 * oasys.c: Likewise.
6449 * pdp11.c: Likewise.
6450 * peicode.h: Likewise.
6451 * reloc.c: Likewise.
6452 * som.c: Likewise.
6453 * srec.c: Likewise.
6454 * tekhex.c: Likewise.
6455 * vms.c: Likewise.
6456 * xcofflink.c: Likewise.
6457 * elf64-sparc.c: Edit comment to not use "== false".
6458
6459 * aoutf1.h: Don't use "? true : false".
6460 * ecoff.c: Likewise.
6461 * format.c: Likewise.
6462 * ieee.c: Likewise.
6463 * linker.c: Likewise.
6464 * mmo.c: Likewise.
6465 * oasys.c: Likewise.
6466
6467 2002-06-23 H.J. Lu <hjl@gnu.org>
6468
6469 * elflink.h (elf_link_add_archive_symbols): For the default
6470 version, check references with only one `@' first.
6471
6472 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6473
6474 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6475 function.
6476 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
6477 symbol table.
6478 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6479 (elf64_hppa_size_dynamic_sections): Revise to use
6480 elf64_hppa_mark_milli_and_exported_functions.
6481 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6482 symbols out of dynamic symbol table.
6483
6484 2002-06-23 Alan Modra <amodra@bigpond.net.au>
6485
6486 * Makefile.in: Regenerate.
6487 * libbfd.h: Regenerate.
6488 * bfd-in2.h: Regenerate.
6489 * configure: Regenerate.
6490 * po/SRC-POTFILES.in: Regenerate.
6491
6492 * elflink.h: Comment typo fixes.
6493
6494 2002-06-23 H.J. Lu <hjl@gnu.org>
6495
6496 * elf-bfd.h (elf_link_loaded_list): New structure.
6497 (elf_link_hash_table): Add "loaded".
6498 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6499 * elflink.h (elf_link_check_versioned_symbol): New function.
6500 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6501
6502 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6503
6504 * elflink.h (size_dynamic_sections): If the target does not
6505 support an ELF style hash table, return true, indicating that
6506 nothing needed to be done, rather than false, indicating that the
6507 section's size could not be computed.
6508
6509 2002-06-18 Dave Brolley <brolley@redhat.com>
6510
6511 From Catherine Moore, Michael Meissner, Dave Brolley:
6512 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6513 * targets.c: Support bfd_elf32_frv_vec.
6514 * reloc.c: Add FRV relocs.
6515 * configure.in: Add support for bfd-elf32-frv-vec.
6516 * config.bfd (targ_cpu): Add support for frv-*-elf.
6517 * archures.c: Add frv arch and machines.
6518 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6519 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6520 (BFD32_BACKENDS): Add elf32-frv.lo.
6521 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6522 (cpu-frv.lo): New target.
6523 (elf32-frv.lo): New target.
6524 * cpu-frv.c: New file.
6525 * elf32-frv.c: New file.
6526
6527 2002-06-18 Jakub Jelinek <jakub@redhat.com>
6528
6529 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6530 e_shnum == 0.
6531 Only read the first section header if e_shoff is non-zero.
6532 Don't consider e_shstrndx if there are no sections.
6533
6534 2002-06-17 Tom Rix <trix@redhat.com>
6535
6536 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
6537 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
6538 complain_overflow_bitfield.
6539
6540 2002-06-17 Alan Modra <amodra@bigpond.net.au>
6541
6542 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6543 (bfd_fdopenr): Likewise.
6544 (bfd_openstreamr): Likewise.
6545 (bfd_openw): Likewise.
6546
6547 * targets.c: Sort target vecs.
6548 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6549 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6550 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6551 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6552 * configure.in: Sort target vecs. Add m88kmach3_vec.
6553 * configure: Regenerate.
6554
6555 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6556
6557 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6558 bpo_reloc_no to break sort order ties, not address of items.
6559
6560 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6561
6562 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6563 Skip excluded sections in determing __gp value.
6564 (elf_hppa_final_link_relocate): Use the symbol's address in
6565 R_PARISC_FPTR64 relocations that don't need an opd entry.
6566 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6567 (elf64_hppa_finalize_dynreloc): Likewise.
6568 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6569 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6570
6571 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6572
6573 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6574 alignment for .bss, .data and .text sections so that sse and sse2
6575 code will work.
6576 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6577
6578 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
6579
6580 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6581 sh[1234]*-elf*.
6582
6583 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6584
6585 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6586 dynamic sections.
6587
6588 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6589 for a symbol that has no output section.
6590 (allocate_dynrel_entries): Correct comment.
6591 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6592 unless we want one.
6593 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6594 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6595 with no section. Remove unnecessary parentheses.
6596
6597 2002-06-11 Tom Rix <trix@redhat.com>
6598
6599 * coffcode.h (coff_compute_section_file_positions): Add data
6600 section to AIX loader alignment check.
6601
6602 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
6603 alignment to 4 bytes.
6604 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6605 power accessor macro.
6606 (do_shared_object_padding): Remove invalid assertion.
6607
6608 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
6609
6610 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6611 for removed output sections.
6612
6613 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
6614
6615 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6616 htab_alloc.
6617 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6618
6619 2002-06-08 H.J. Lu <hjl@gnu.org>
6620
6621 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6622 work around a long long bug in gcc 2.96 on mips.
6623
6624 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6625
6626 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6627 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6628 Regenerate dependency lists.
6629 * Makefile.in: Regenerate.
6630 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6631 vax1knetbsd_vec to targ_selvecs.
6632 * configure.in: Add vax1knetbsd_vec.
6633 * configure: Regenerate.
6634 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6635 * vax1knetbsd.c: New file.
6636 * vaxnetbsd.c: Update copyright years.
6637 (TARGET_PAGE_SIZE): Set to 0x1000.
6638 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6639
6640 2002-06-08 Matt Thomas <matt@3am-software.com>
6641
6642 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6643
6644 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6645
6646 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6647
6648 2002-06-08 Alan Modra <amodra@bigpond.net.au>
6649
6650 * Makefile.am: Run "make dep-am".
6651 * Makefile.in: Regenerate.
6652
6653 * armnetbsd.c: Replace CONST with const.
6654 * corefile.c: Likewise.
6655 * elf32-dlx.c: Likewise.
6656 * elf64-mips.c: Likewise.
6657 * mmo.c: Likewise.
6658 * ns32knetbsd.c: Likewise.
6659
6660 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6661 table is elf64-sparc.
6662
6663 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6664
6665 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6666 Fix RELA addends to get not shifted in the result. Don't do special
6667 handling of R_MIPS_64 for NewABI.
6668
6669 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6670
6671 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6672 (NAME(aout,slurp_reloc_table)): Likewise.
6673 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6674 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6675 (xcoff_write_archive_contents_big): Likewise.
6676 (xcoff_generate_rtinit): Likewise.
6677 (xcoff_generate_rtinit): Likewise, and check error return.
6678 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6679 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6680 (coff_get_normalized_symtab): Likewise.
6681 (coff_make_empty_symbol): Likewise.
6682 (bfd_coff_set_symbol_class): Likewise.
6683 * cofflink.c (coff_link_add_symbols): Likewise.
6684 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6685 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6686 (bfd_ecoff_write_accumulated_debug): Likewise.
6687 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6688 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6689 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6690 * ieee.c (do_with_relocs): Use bfd_zalloc.
6691 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6692 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6693 (NAME(aout,slurp_reloc_table)): Likewise.
6694 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6695 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6696 * som.c (som_build_and_write_symbol_table): Likewise.
6697 (som_slurp_string_table): Likewise.
6698 (som_slurp_symbol_table): Likewise.
6699 (som_bfd_ar_write_symbol_stuff): Likewise.
6700 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6701 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6702 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6703 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6704 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6705
6706 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6707
6708 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6709 "group" union.
6710 (elf_group_name): Update.
6711 (elf_group_id): Define.
6712 (bfd_elf_set_group_contents): Declare.
6713 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6714 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6715 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6716 that sym for the signature.
6717 (_bfd_elf_compute_section_file_positions): Don't call
6718 set_group_contents for "ld -r" case.
6719 (swap_out_syms): Use bfd_zalloc.
6720 * elflink.h (elf_link_add_archive_symbols): Likewise.
6721 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6722 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6723
6724 2002-06-07 Alan Modra <amodra@bigpond.net.au>
6725
6726 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6727 relocs in opd for non-shared too.
6728
6729 2002-06-06 Jeffrey Law <law@redhat.com>
6730
6731 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6732 relocations.
6733
6734 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6735
6736 * merge.c: Include libiberty.h.
6737 * elf-strtab.c: Include libiberty.h.
6738
6739 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6740
6741 * peXXigen.c (pe_print_idata): Remove unused variable.
6742
6743 2002-06-06 David Heine <dlheine@tensilica.com>
6744
6745 * elf.c (assign_file_positions_for_segments): Remove unallocated
6746 sections from the section to segment mapping for PT_LOAD segments.
6747 Update comment about empty loadable segments.
6748
6749 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
6750
6751 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6752 is within the .stabstr section.
6753
6754 2002-06-06 Alan Modra <amodra@bigpond.net.au>
6755
6756 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6757 are "const PTR", not "const PTR *".
6758 (bfd_elf32_swap_symbol_in): Likewise.
6759 (bfd_elf64_swap_symbol_in): Likewise.
6760 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6761 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6762 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6763 (elf_link_add_object_symbols): Likewise.
6764 (elf_link_record_local_dynamic_symbol): Likewise.
6765 (elf_link_input_bfd): Likewise.
6766 (elf_gc_mark): Likewise.
6767 (elf_reloc_symbol_deleted_p): Likewise.
6768 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6769 (mn10200_elf_relax_delete_bytes): Likewise.
6770 (mn10200_elf_symbol_address_p): Likewise.
6771 (mn10200_elf_get_relocated_section_contents): Likewise.
6772 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6773 (mn10300_elf_relax_section): Likewise.
6774 (mn10300_elf_relax_delete_bytes): Likewise.
6775 (mn10300_elf_symbol_address_p): Likewise.
6776 (mn10300_elf_get_relocated_section_contents): Likewise.
6777 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6778 (elf32_h8_relax_delete_bytes): Likewise.
6779 (elf32_h8_symbol_address_p): Likewise.
6780 (elf32_h8_get_relocated_section_contents): Likewise.
6781 * elf32-hppa.c (get_local_syms): Likewise.
6782 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6783 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6784 * elf32-sh.c (sh_elf_relax_section): Likewise.
6785 (sh_elf_relax_delete_bytes): Likewise.
6786 (sh_elf_get_relocated_section_contents): Likewise.
6787 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6788 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6789 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6790 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6791 * elf64-ppc.c (get_local_syms): Likewise.
6792 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6793 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6794
6795 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
6796
6797 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6798
6799 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6800
6801 * elf.c (group_signature): Swap in the whole symbol, and handle
6802 extracting section symbol names.
6803 (setup_group): Add comment.
6804 (set_group_contents): When called from objcopy or ld, arrange for
6805 section contents to be written. Write group member output section
6806 indices to allow objcopy to reorganize sections.
6807 (_bfd_elf_copy_private_section_data): Copy group info.
6808
6809 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6810 (bfd_elf32_swap_symbol_in): Update prototype.
6811 (bfd_elf64_swap_symbol_in): Likewise.
6812 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6813 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6814 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6815 (elf_link_add_object_symbols): Likewise.
6816 (elf_link_record_local_dynamic_symbol): Likewise.
6817 (elf_link_input_bfd): Likewise.
6818 (elf_gc_mark): Likewise.
6819 (elf_reloc_symbol_deleted_p): Likewise.
6820 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6821 (mn10200_elf_relax_delete_bytes): Likewise.
6822 (mn10200_elf_symbol_address_p): Likewise.
6823 (mn10200_elf_get_relocated_section_contents): Likewise.
6824 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6825 (mn10300_elf_relax_section): Likewise.
6826 (mn10300_elf_relax_delete_bytes): Likewise.
6827 (mn10300_elf_symbol_address_p): Likewise.
6828 (mn10300_elf_get_relocated_section_contents): Likewise.
6829 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6830 (elf32_h8_relax_delete_bytes): Likewise.
6831 (elf32_h8_symbol_address_p): Likewise.
6832 (elf32_h8_get_relocated_section_contents): Likewise.
6833 * elf32-hppa.c (get_local_syms): Likewise.
6834 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6835 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6836 * elf32-sh.c (sh_elf_relax_section): Likewise.
6837 (sh_elf_relax_delete_bytes): Likewise.
6838 (sh_elf_get_relocated_section_contents): Likewise.
6839 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6840 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6841 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6842 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6843 * elf64-ppc.c (get_local_syms): Likewise.
6844 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6845 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6846 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6847 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6848 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6849 * elf64-mips.c (mips_elf64_size_info): Likewise.
6850 * elf64-s390.c (s390_elf64_size_info): Likewise.
6851 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6852
6853 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6854
6855 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6856 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6857 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6858 _bfd_mips_elf_ignore_discarded_relocs.
6859 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6860
6861 2002-06-05 H.J. Lu <hjl@gnu.org>
6862
6863 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6864 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6865 the SEC_MERGE section.
6866
6867 2002-06-05 Alan Modra <amodra@bigpond.net.au>
6868
6869 * coff-alpha.c: Update copyright date.
6870 * coff-mips.c: Likewise.
6871 * xcoff-target.h: Likewise.
6872
6873 * bfd-in.h: Remove "taken from the source" comment.
6874 * libbfd-in.h: Likewise.
6875 * libcoff-in.h: Likewise.
6876 * bfd-in2.h: Regenerate.
6877 * libbfd.h: Regenerate.
6878 * libcoff.h: Regenerate.
6879
6880 * elf.c (bfd_elf_discard_group): Return true.
6881 * elf-bfd.h (bfd_elf_discard_group): Declare.
6882 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6883 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6884 * bfd.c (bfd_discard_group): Define.
6885 * targets.c (struct bfd_target): Add _bfd_discard_group.
6886 (BFD_JUMP_TABLE_LINK): Here too.
6887 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6888 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6889 * aout-target.h (MY_bfd_discard_group): Define.
6890 * aout-tic30.c (MY_bfd_discard_group): Define.
6891 * binary.c (binary_bfd_discard_group): Define.
6892 * bout.c (b_out_bfd_discard_group): Define.
6893 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6894 * coffcode.h (coff_bfd_discard_group): Define.
6895 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6896 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6897 * i386msdos.c (msdos_bfd_discard_group): Define.
6898 * i386os9k.c (os9k_bfd_discard_group): Define.
6899 * ieee.c (ieee_bfd_discard_group): Define.
6900 * ihex.c (ihex_bfd_discard_group): Define.
6901 * mmo.c (mmo_bfd_discard_group): Define.
6902 * nlm-target.h (nlm_bfd_discard_group): Define.
6903 * oasys.c (oasys_bfd_discard_group): Define.
6904 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6905 * som.c (som_bfd_discard_group): Define.
6906 * srec.c (srec_bfd_discard_group): Define.
6907 * tekhex.c (tekhex_bfd_discard_group): Define.
6908 * versados.c (versados_bfd_discard_group): Define.
6909 * vms.c (vms_bfd_discard_group): Define.
6910 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6911 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6912 (aix5coff64_vec): Likewise.
6913 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6914
6915 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6916
6917 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6918 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6919 (elf32-sh64-com.lo): New dependency list.
6920 * Makefile.in: Regenerate.
6921 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6922 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6923 elf32-sh64-com.lo.
6924 * configure: Regenerate.
6925 * elf32-sh64.c (sh64_address_in_cranges)
6926 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6927 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6928 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6929 * elf32-sh64-com.c: ...here. New file.
6930
6931 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6932
6933 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6934 ATTRIBUTE_UNUSED on used params.
6935 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6936 before calling bfd_section_from_elf_index on local syms.
6937 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6938
6939 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6940
6941 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6942 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6943 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6944 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6945 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6946 * Makefile.in: Regenerate.
6947 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6948 (sh64-*-netbsd*): New targets.
6949 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6950 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6951 * configure: Regenerate.
6952 * elf32-sh64-nbsd.c: New file.
6953 * elf64-sh64-nbsd.c: New file.
6954 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6955 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6956 bfd_elf64_sh64lnbsd_vec.
6957
6958 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6959
6960 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6961 (bfd_section_from_shdr): Likewise. Set section name of group
6962 sections from signature.
6963 (group_signature): Split out from setup_group. Ensure symbol table
6964 is available.
6965 (bfd_elf_discard_group): New function.
6966 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6967 .gnu.linkonce* sections if they are members of a group.
6968 (set_group_contents): Set GRP_COMDAT flag.
6969 * section.c (bfd_discard_group): New function.
6970 * bfd-in.h (bfd_elf_discard_group): Declare.
6971 * bfd-in2.h: Regenerate.
6972 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6973 (elf_linkonce_p): Define.
6974
6975 2002-06-04 Alan Modra <amodra@bigpond.net.au>
6976
6977 * elf.c (bfd_section_from_shdr): Make "name" const.
6978 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6979 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6980 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6981 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6982 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6983 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6984 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6985 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6986 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6987 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6988 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6989
6990 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6991
6992 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6993 ABI.
6994
6995 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
6996
6997 * elf32-arc.c: Fix formatting.
6998 * elf32-arm.h: Likewise.
6999 * elf32-cris.c: Likewise.
7000 * elf32-dlx.c: Likewise.
7001 * elf32-hppa.c: Likewise.
7002 * elf32-i386.c: Likewise.
7003 * elf32-i386qnx.c: Likewise.
7004 * elf32-or32.c: Likewise.
7005 * elf32-s390.c: Likewise.
7006 * elf32-sh64.c: Likewise.
7007 * elf32-vax.c: Likewise.
7008 * elf32-xstormy16.c: Likewise.
7009 * elf64-alpha.c: Likewise.
7010 * elf64-mmix.c: Likewise.
7011 * elf64-ppc.c: Likewise.
7012 * elf64-s390.c: Likewise.
7013 * elf64-sh64.c: Likewise.
7014 * elf64-x86-64.c: Likewise.
7015
7016 2002-06-02 Richard Henderson <rth@redhat.com>
7017
7018 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7019 null when there are no got entries for a symbol.
7020 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7021 uninitialized variable warning.
7022
7023 2002-06-01 Richard Henderson <rth@redhat.com>
7024
7025 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7026 undefined symbols here.
7027 (elf64_alpha_relax_section): Do it here. Also test for not
7028 defined in the current module.
7029 (elf64_alpha_relocate_section_r): Split out of ...
7030 (elf64_alpha_relocate_section): ... here. Don't dereference
7031 NULL when looking up local got entries.
7032
7033 2002-06-01 Richard Henderson <rth@redhat.com>
7034
7035 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7036 symbols from JSR relaxation.
7037 (elf64_alpha_size_plt_section_1): New.
7038 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7039 (elf64_alpha_size_rela_got_1): ... here.
7040 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7041 (elf64_alpha_size_rela_got_section): ... here.
7042 (elf64_alpha_size_plt_section): New.
7043 (elf64_alpha_relax_section): Call them.
7044 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7045 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7046
7047 2002-06-01 Richard Henderson <rth@redhat.com>
7048
7049 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7050 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7051 in shared libraries. Fix DTPRELHI and TPRELHI value.
7052 (INSN_ADDQ, INSN_RDUNIQ): New.
7053 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7054 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7055 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7056 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7057 Handle GOTDTPREL and GOTTPREL relocations.
7058 (elf64_alpha_relax_gprelhilo): New.
7059 (elf64_alpha_relax_tls_get_addr): New.
7060 (elf64_alpha_relax_find_tls_segment): New.
7061 (elf64_alpha_relax_section): Handle TLS relocations.
7062 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7063 (elf64_alpha_check_relocs): Set it.
7064
7065 2002-06-01 Richard Henderson <rth@redhat.com>
7066
7067 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7068
7069 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7070 check; don't suppress dynamic relocs for non-allocated sections.
7071
7072 * elf64-alpha.c: Remove dead code.
7073
7074 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7075
7076 * bfd-in2.h: Regenerate.
7077 * libbfd.h: Regenerate.
7078 * po/SRC-POTFILES.in: Regenerate.
7079
7080 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7081 space for bss .plt.
7082
7083 2002-05-31 Graeme Peterson <gp@qnx.com>
7084
7085 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7086 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7087 Run "make dep-am".
7088 * Makefile.in: Regenerate.
7089 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7090 * configure.in: Add bfd_elf32_i386qnx_vec support.
7091 * configure: Regenerate.
7092 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7093 is_contained_by_filepos, and copy_private_bfd_data_p.
7094 * elf.c (assign_file_positions_for_segments): Call backend
7095 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7096 (IS_CONTAINED_BY_FILEPOS): Define.
7097 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7098 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7099 Fix non-K&R call to _bfd_error_handler.
7100 (_bfd_elf_copy_private_section_data): Use backend
7101 copy_private_bfd_data_p.
7102 * elf32-i386.c: Don't include elfxx-target.h when
7103 ELF32_I386_C_INCLUDED is defined.
7104 * elf32-i386qnx.c: New QNX elf backend file.
7105 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7106 elf_backend_is_contained_by_filepos, and
7107 elf_backend_do_copy_private_bfd_data.
7108 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7109
7110 2002-05-31 Alan Modra <amodra@bigpond.net.au>
7111
7112 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7113 Move other similar defines to start of file.
7114
7115 2002-05-30 Tom Rix <trix@redhat.com>
7116
7117 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7118 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7119
7120 2002-05-30 Richard Henderson <rth@redhat.com>
7121
7122 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7123 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7124 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7125 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7126 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7127 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7128 n_local_got_entries to total_got_size and local_got_size.
7129 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7130 (alpha_got_entry_size): New.
7131 (elf64_alpha_relax_with_lituse): Use it.
7132 (elf64_alpha_relax_without_lituse): Likewise.
7133 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7134 (get_got_entry): New.
7135 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7136 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7137 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7138 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7139 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7140 (elf64_alpha_calc_got_offsets): Likewise.
7141 (alpha_dynamic_entries_for_reloc): New.
7142 (elf64_alpha_calc_dynrel_sizes): Use it.
7143 (elf64_alpha_size_dynamic_sections): Likewise.
7144 (elf64_alpha_relocate_section): Handle TLS relocations.
7145 * reloc.c: Add Alpha TLS relocations.
7146 * bfd-in2.h, libbfd.h: Rebuild.
7147
7148 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7149
7150 * peXXigen.c (pe_print_idata): Remove double printed
7151 import table lines; add Bound-To comment.
7152
7153 2002-05-29 Matt Thomas <matt@3am-software.com>
7154
7155 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7156 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7157 (elf32-vax.lo): New rule.
7158 * Makefile.in: Regenerate.
7159 * configure.in (bfd_elf32_vax_vec)
7160 (vaxnetbsd_vec): New vectors.
7161 * configure: Regenerate.
7162 * config.bfd (vax-*-netbsdelf*)
7163 (vax-*-netbsdaout*)
7164 (vax-*-netbsd*): New targets.
7165 * elf32-vax.c: New file.
7166 * reloc.c: Add VAX relocations.
7167 * bfd-in2.h: Regenerate.
7168 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7169
7170 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7171
7172 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7173 and bfd_elf32_bigarm_vec to targ_selvecs.
7174
7175 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7176
7177 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7178 with auto-imported symbols.
7179
7180 2002-05-29 Adam Nemet <anemet@lnxw.com>
7181
7182 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7183 sections only record bfd.
7184 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
7185 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
7186 * bfd-in2.h: Regenerate.
7187
7188 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7189
7190 * syms.c (_bfd_stab_section_find_nearest_line): Move
7191 declaration and initialisation of saw_line and saw_func out of
7192 for loop.
7193
7194 2002-05-29 Alan Modra <amodra@bigpond.net.au>
7195
7196 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7197 (bfd_elf64_get_symbol_info): Define.
7198 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7199
7200 2002-05-29 Andrey Volkov <avolkov@transas.com>
7201
7202 * cpu-h8300.c: Make default h8300 machine first in machine list.
7203
7204 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7205
7206 * config.bfd: Added DLX configuraton.
7207 * Makefile.am: Added DLX configuraton.
7208 * configure.in: Added DLX configuraton.
7209 * archures.c: Add DLX architecure.
7210 * reloc.c: Add DLX relocs.
7211 * targets.c: Added DLX target vector.
7212 * configure: Regenerate.
7213 * Makefile.in: Regenreate.
7214 * bfd-in2.h: Regenreate.
7215 * elf32-dlx.c: New file: Support DLX target.
7216 * cpu-dlx.c: New file: Support DLX target.
7217
7218 2002-05-25 Alan Modra <amodra@bigpond.net.au>
7219
7220 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7221
7222 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7223 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7224 strings to point inside function code sym string.
7225 (func_desc_adjust): Likewise.
7226 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7227
7228 2002-05-24 Michal Ludvig <mludvig@suse.cz>
7229
7230 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7231 (elf64_x86_64_grok_psinfo): Added.
7232
7233 2002-05-24 TAMURA Kent <kent@netbsd.org>
7234
7235 * config.bfd: Add a target for i386-netbsdpe.
7236
7237 2002-05-24 Alan Modra <amodra@bigpond.net.au>
7238
7239 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7240 and is_func_descriptor.
7241 (func_desc_adjust): Hide function code sym in shared libs unless
7242 there is a matching exported function descriptor sym.
7243
7244 2002-05-23 Jakub Jelinek <jakub@redhat.com>
7245
7246 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7247 for symbols from SHF_TLS section.
7248 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7249 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7250 (map_sections_to_segments): Build PT_TLS segment if necessary.
7251 (assign_file_positions_for_segments): Likewise.
7252 (get_program_header_size): Account for PT_TLS segment.
7253 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7254 SEC_THREAD_LOCAL sections to STT_TLS.
7255 * reloc.c: Add 386 and IA-64 TLS relocs.
7256 * section.c (SEC_THREAD_LOCAL): Define.
7257 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7258 Remove.
7259 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7260 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7261 unconditionally.
7262 (struct elf_final_link_info): Add first_tls_sec.
7263 (elf_bfd_final_link): Set first_tls_sec.
7264 Compute elf_hash_table (info)->tls_segment.
7265 (elf_link_output_extsym): Handle STT_TLS symbols.
7266 (elf_link_input_bfd): Likewise.
7267 * syms.c (BSF_THREAD_LOCAL): Define.
7268 * bfd-in2.h: Rebuilt.
7269 * libbfd.h: Rebuilt.
7270 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7271 elf_i386_mkobject, elf_i386_object_p): New functions.
7272 (elf_howto_table): Add TLS relocs.
7273 (elf_i386_reloc_type_lookup): Support TLS relocs.
7274 (elf_i386_info_to_howto_rel): Likewise.
7275 (struct elf_i386_link_hash_entry): Add tls_type.
7276 (struct elf_i386_obj_tdata): New.
7277 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7278 New macros.
7279 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7280 (link_hash_newfunc): Clear tls_type.
7281 (elf_i386_check_relocs): Support TLS relocs.
7282 (elf_i386_gc_sweep_hook): Likewise.
7283 (allocate_dynrelocs): Likewise.
7284 (elf_i386_size_dynamic_sections): Likewise.
7285 (elf_i386_relocate_section): Likewise.
7286 (elf_i386_finish_dynamic_symbol): Likewise.
7287 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7288 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7289 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7290 want_tprel, want_dtpmod, want_dtprel.
7291 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7292 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7293 R_IA64_LTOFF_TPREL22.
7294 (elf_code_to_howto_index): Add TLS relocs.
7295 (elfNN_ia64_check_relocs): Support TLS relocs.
7296 (allocate_global_data_got): Account for TLS .got data.
7297 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7298 (elfNN_ia64_install_value): Supprt TLS relocs.
7299 (set_got_entry): Support TLS relocs.
7300 (elfNN_ia64_relocate_section): Likewise.
7301
7302 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7303
7304 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7305 BLX reloc round the relocation up rather than down.
7306 * coff-arm.c (coff_arm_relocate_section): Likewise.
7307
7308 2002-05-21 H.J. Lu (hjl@gnu.org)
7309
7310 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7311 definition.
7312
7313 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7314
7315 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7316 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7317
7318 2002-05-22 Alan Modra <amodra@bigpond.net.au>
7319
7320 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7321 unresolved relocs.
7322 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7323
7324 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7325
7326 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
7327 non-ELF targets.
7328
7329 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7330
7331 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7332 an error value.
7333 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7334 return with false on error.
7335 (elf_link_input_bfd): Check reloc_emitter return value.
7336
7337 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7338
7339 * config.bfd (armeb-*-netbsdelf*): New target.
7340
7341 2002-05-20 Alan Modra <amodra@bigpond.net.au>
7342
7343 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7344 at the plt call stub.
7345
7346 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7347
7348 * cpu-mips.c (mips_compatible): Don't try to check machine
7349 compatibility.
7350
7351 2002-05-18 Tom Rix <trix@redhat.com>
7352
7353 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
7354
7355 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7356
7357 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7358 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7359 we've already warned about an undefined symbol. Report more
7360 detail on reloc errors.
7361
7362 2002-05-17 Alan Modra <amodra@bigpond.net.au>
7363
7364 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7365 * configure.in: Invoke AM_INSTALL_LIBBFD.
7366 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7367 (install_libbfd): .. New target.
7368 (uninstall_libbfd): Likewise.
7369 (install-bfdlibLTLIBRARIES): Likewise.
7370 (uninstall-bfdlibLTLIBRARIES): Likewise.
7371 (bfdlibdir): New.
7372 (bfdincludedir): New.
7373 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7374 * aclocal.m4: Regenerate.
7375 * configure: Regenerate.
7376 * Makefile.in: Regenerate.
7377
7378 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
7379
7380 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7381 hash loop.
7382
7383 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7384
7385 * config.bfd: Add targets for sh64-linux (little endian and
7386 big endian).
7387
7388 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7389
7390 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7391 is located in the same section as the import table. Instead
7392 check, and if necessary load the section containing the thunk.
7393
7394 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7395
7396 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
7397 bfd_bread.
7398 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7399 with bfd_bread.
7400
7401 2002-05-15 Alan Modra <amodra@bigpond.net.au>
7402
7403 * aix5ppc-core.c: Warning fixes.
7404 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7405 * aout-target.h (MY_bfd_link_just_syms): Define.
7406 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7407 * bfd.c (bfd_link_just_syms): Define.
7408 * binary.c (binary_bfd_link_just_syms): Define.
7409 * bout.c (b_out_bfd_link_just_syms): Define.
7410 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7411 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7412 * coffcode.h (coff_bfd_link_just_syms): Define.
7413 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7414 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7415 (_bfd_elf_link_just_syms): Declare.
7416 * elf.c (_bfd_elf_link_just_syms): New function.
7417 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7418 sections haven't already been discarded by the linker.
7419 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7420 sections and SEC_MERGE sections.
7421 (elf_bfd_discard_info): Similarly here.
7422 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7423 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7424 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7425 * ieee.c (ieee_bfd_link_just_syms): Define.
7426 * ihex.c (ihex_bfd_link_just_syms): Define.
7427 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7428 (_bfd_generic_link_just_syms): Declare.
7429 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7430 * linker.c (_bfd_generic_link_just_syms): New function.
7431 * mmo.c (mmo_bfd_link_just_syms): Define.
7432 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7433 * oasys.c (oasys_bfd_link_just_syms): Define.
7434 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7435 * som.c (som_bfd_link_just_syms): Define.
7436 * srec.c (srec_bfd_link_just_syms): Define.
7437 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7438 (BFD_JUMP_TABLE_LINK): And here.
7439 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7440 * versados.c (versados_bfd_link_just_syms): Define.
7441 * vms.c (vms_bfd_link_just_syms): Define.
7442 * libbfd.h: Regenerate.
7443 * bfd-in2.h: Regenerate.
7444
7445 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7446
7447 * elf32-mips.c: Remove superfluous definitions copied from
7448 elfxx-mips.c.
7449 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7450 SGIish vectors to check the special case.
7451 (mips_elf_hi16_reloc): Fix comment.
7452 (mips_elf_got16_reloc): Likewise.
7453 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7454 (elf_reloc_map): Code cleanup.
7455 (mips_reloc_map): Add comment.
7456 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7457 (mips_elf32_rtype_to_howto): Likewise.
7458 (mips_elf32_discard_info): Likewise.
7459 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7460 lead to IRIX compatibility now.
7461
7462 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7463
7464 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7465
7466 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7467
7468 * config.bfd (shle-*-netbsdelf*): Add target which includes
7469 sh64 support.
7470
7471 2002-05-13 David Edelsohn <edelsohn@gnu.org>
7472
7473 * configure.in: Revert 2002-04-07. Instead, auto-configure
7474 HAVE_ST_C_IMPL.
7475 * configure: Regenerate.
7476 * config.in: Regenerate.
7477 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7478 or AIX_5_CORE.
7479
7480 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7481
7482 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7483 corefiles as well.2
7484 * configure: Regenerate.
7485
7486 2002-05-13 Alan Modra <amodra@bigpond.net.au>
7487
7488 * Makefile.am (install-data-local): Install headers to
7489 $(exec_prefix)/include.
7490 * Makefile.in: Regenerate.
7491
7492 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7493 Daniel Jacobowitz <drow@mvista.com>
7494
7495 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7496 map BFD_RELOC_RVA.
7497
7498 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7499
7500 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7501 hppa*-*-openbsd*): New targets.
7502 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7503 * configure: Regenerate.
7504
7505 2002-05-10 Tom Rix <trix@redhat.com>
7506
7507 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
7508 xcoff64_ppc_relocate_section.
7509 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7510 * libxcoff.h: Common xcoff_reloc_type function declaration.
7511
7512 2002-05-10 Alan Modra <amodra@bigpond.net.au>
7513
7514 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
7515 added in 2002-05-09 commit.
7516
7517 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7518 don't look for stubs on all undefined syms.
7519
7520 2002-05-09 Alan Modra <amodra@bigpond.net.au>
7521
7522 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7523 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7524 pcrel_offset.
7525
7526 * elf32-i386.c (elf_howto_table): Comments.
7527 (elf_i386_relocate_section): Handle more relocs for relocatable
7528 linking and against SEC_MERGE sections.
7529
7530 2002-05-08 Alan Modra <amodra@bigpond.net.au>
7531
7532 * elf32-ppc.c (ppc_elf_create_got): New function.
7533 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
7534 _bfd_elf_create_dynamic_sections. Correct .plt flags.
7535 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7536 _bfd_elf_create_got_section.
7537
7538 2002-05-07 Alan Modra <amodra@bigpond.net.au>
7539
7540 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7541 * elfxx-target.h (elf_backend_rela_normal): Define.
7542 (elfNN_bed): Init rela_normal.
7543 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7544 for section symbols here if rela_normal. Simplify abs section test.
7545 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7546 return immediately. Remove code handling relocatable linking.
7547 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7548 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7549 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7550 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7551 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7552 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7553 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7554 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7555 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7556 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7557 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7558 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7559 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7560 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7561 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7562 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7563 * elf-m10200.c (elf_backend_rela_normal): Define.
7564 * elf-m10300.c (elf_backend_rela_normal): Define.
7565 * elf32-fr30.c (elf_backend_rela_normal): Define.
7566 * elf32-i370.c (elf_backend_rela_normal): Define.
7567 * elf32-i860.c (elf_backend_rela_normal): Define.
7568 * elf32-m68k.c (elf_backend_rela_normal): Define.
7569 * elf32-mcore.c (elf_backend_rela_normal): Define.
7570 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7571 * elf32-ppc.c (elf_backend_rela_normal): Define.
7572 * elf32-s390.c (elf_backend_rela_normal): Define.
7573 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7574 * elf64-ppc.c (elf_backend_rela_normal): Define.
7575 * elf64-s390.c (elf_backend_rela_normal): Define.
7576 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7577 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7578 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7579 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7580
7581 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7582
7583 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7584 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7585
7586 2002-05-06 Alan Modra <amodra@bigpond.net.au>
7587
7588 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7589 when not relocatable. Fix reloc_emitter call for K&R.
7590
7591 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7592
7593 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7594 reloading local sym addend mistakenly removed in 2002-05-01 change.
7595
7596 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7597 (read_abbrevs): Change "offset" param to bfd_vma.
7598 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7599 Change "abbrev_offset" to bfd_vma.
7600 (read_indirect_string): Use correct conversion chars in error
7601 message format string, cast bfd_vma's to unsigned long.
7602 (read_abbrevs): Likewise.
7603 (read_attribute_value): Likewise.
7604 (decode_line_info): Likewise.
7605 (scan_unit_for_functions): Likewise.
7606 (parse_comp_unit): Likewise.
7607
7608 2002-05-04 Tom Rix <trix@redhat.com>
7609
7610 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7611 (coff_swap_reloc_out): Same.
7612 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7613 (xcoff_swap_reloc_out): Same.
7614 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7615 case some 16 bit relocs. Add reloc value to output.
7616 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
7617 R_RBR. Improve names.
7618 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7619 (bfd_xcoff_backend_data): Update with new reloc swap names.
7620 (bfd_pmac_xcoff_backend_data) : Same.
7621 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7622 (xcoff64_swap_reloc_out): Same.
7623 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
7624 R_POS. Add reloc value to output.
7625 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7626 bit R_RBR. Improve names, masks.
7627 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7628 (bfd_xcoff_backend_data): Update with new reloc swap names.
7629 (bfd_xcoff_aix5_backend_data) : Same.
7630
7631 2002-05-04 Alan Modra <amodra@bigpond.net.au>
7632
7633 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7634 bfd_count top_index, input_list, all_local_syms.
7635 (elf32_hppa_setup_section_lists): New function, split from
7636 elf32_hppa_size_stubs.
7637 (elf32_hppa_next_input_section): Likewise.
7638 (group_sections): Likewise.
7639 (get_local_syms): Likewise.
7640 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7641 stubs on undefined syms too.
7642 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
7643 Only access htab elf fields when we have an elf hash table.
7644 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7645 (elf32_hppa_next_input_section): Declare.
7646
7647 2002-05-04 Bob Byrnes <byrnes@curl.com>
7648
7649 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7650 _bfd_new_bfd.
7651
7652 2002-05-03 H.J. Lu (hjl@gnu.org)
7653
7654 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7655 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7656 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7657 to hide a global symbol.
7658 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
7659 forced_local to true.
7660
7661 2002-05-02 Richard Henderson <rth@redhat.com>
7662
7663 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7664 vs SHN_UNDEF to zero.
7665
7666 2002-05-02 Alan Modra <amodra@bigpond.net.au>
7667
7668 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7669 16 bit reloc.
7670 <R_PPC64_SECTOFF_DS>: Likewise.
7671 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7672 SECTOFF reloc.
7673 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7674 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7675 SECTOFF reloc.
7676
7677 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7678 (ppc64_elf_ha_reloc): New function.
7679 (ppc64_elf_brtaken_reloc): New function.
7680 (ppc64_elf_sectoff_reloc): New function.
7681 (ppc64_elf_sectoff_ha_reloc): New function.
7682 (ppc64_elf_toc_reloc): New function.
7683 (ppc64_elf_toc_ha_reloc): New function.
7684 (ppc64_elf_toc64_reloc): New function.
7685 (ppc64_elf_unhandled_reloc): New function.
7686 (ppc64_elf_howto_raw): Use the above.
7687 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7688 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7689 <R_PPC64_SECTOFF_DS>: Likewise.
7690 (IS_ABSOLUTE_RELOC): Update.
7691 (struct ppc_link_hash_table): Add have_undefweak.
7692 (ppc64_elf_link_hash_table_create): Init.
7693 (func_desc_adjust): Set have_undefweak.
7694 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7695 add the .sfpr blr when have_undefweak.
7696 (ppc64_elf_setup_section_lists): Check hash table flavour.
7697 (ppc64_elf_next_input_section): Move output_section->owner test to
7698 ppc64elf.em.
7699 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7700 and relocatable test. Return TOCstart and don't set elf_gp.
7701 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7702 offset calculation. Add assert on weak sym branch tweaks.
7703 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7704 (ppc64_elf_toc): Declare.
7705 (ppc64_elf_next_input_section): Update.
7706
7707 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7708
7709 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7710 file_name.
7711
7712 2002-05-01 Alan Modra <amodra@bigpond.net.au>
7713
7714 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7715 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7716 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7717 call branches. Correct undefined weak destination.
7718 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7719 .sfpr, and correct case where either only savef* or restf* is
7720 needed.
7721
7722 Long branch stubs, multiple stub sections.
7723 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7724 (ppc64_elf_next_input_section): Declare.
7725 * elf64-ppc.c: Move linker-only prototypes.
7726 (STUB_SUFFIX): Define.
7727 (enum ppc_stub_type): New.
7728 (struct ppc_stub_hash_entry): New.
7729 (struct ppc_branch_hash_entry): New.
7730 (struct ppc_link_hash_entry): Add stub_cache, oh.
7731 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7732 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7733 Rename plt_overflow to stub_error.
7734 (ppc_stub_hash_lookup): Define.
7735 (ppc_branch_hash_lookup): Define.
7736 (stub_hash_newfunc): New function.
7737 (branch_hash_newfunc): New function.
7738 (link_hash_newfunc): Init new fields.
7739 (ppc64_elf_link_hash_table_create): Likewise.
7740 (ppc64_elf_link_hash_table_free): New function.
7741 (ppc_stub_name): New function.
7742 (ppc_get_stub_entry): New function.
7743 (ppc_add_stub): New function.
7744 (create_linkage_sections): Use bfd_make_section_anyway. Create
7745 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7746 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7747 and set up for plt call stubs. Link func and func desc syms.
7748 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7749 (func_desc_adjust): Avoid hash lookup when func desc sym available
7750 via shortcut, and set links when processing.
7751 (ppc64_elf_hide_symbol): Likewise.
7752 (allocate_dynrelocs): Don't allocate stub section here.
7753 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7754 Remove sstub code.
7755 (ppc_type_of_stub): New function.
7756 (build_one_stub): Delete.
7757 (ppc_build_one_stub): New function.
7758 (ppc_size_one_stub): New function.
7759 (ppc64_elf_setup_section_lists): New function.
7760 (ppc64_elf_next_input_section): New function.
7761 (group_sections): New function.
7762 (get_local_syms): New function.
7763 (ppc64_elf_size_stubs): Rewrite.
7764 (ppc64_elf_build_stubs): Rewrite.
7765 (ppc64_elf_relocate_section): Look up stub entry for REL24
7766 relocs. Don't propagate REL14* to dynamic objects. Look for long
7767 branch stubs if REL14* or REL24 relocs won't reach.
7768 (bfd_elf64_bfd_link_hash_table_free): Define.
7769
7770 2002-04-30 Mark Mitchell <mark@codesourcery.com>
7771
7772 * config.bfd: Add support for powerpc-*-windiss.
7773
7774 2002-04-30 Tom Rix <trix@redhat.com>
7775
7776 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7777 symbol names into the hash table.
7778
7779 2002-04-28 Tom Rix <trix@redhat.com>
7780
7781 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
7782 calulating relocations.
7783 (xcoff_complain_overflow) : Function table for relocation errors.
7784 (xcoff_ppc_relocate_section): Use relocation and complain function
7785 tables.
7786 (xcoff_complain_overflow_unsigned_func): New complain function.
7787 (xcoff_complain_overflow_signed_func): Same.
7788 (xcoff_complain_overflow_bitfield_func): Same.
7789 (xcoff_complain_overflow_dont_func): Same.
7790 (xcoff_reloc_type_crel): New recot function.
7791 (xcoff_reloc_type_br): Same.
7792 (xcoff_reloc_type_ba): Same.
7793 (xcoff_reloc_type_toc): Same.
7794 (xcoff_reloc_type_rel): Same.
7795 (xcoff_reloc_type_neg): Same.
7796 (xcoff_reloc_type_pos): Same.
7797 (xcoff_reloc_type_fail): Same.
7798 (xcoff_reloc_type_noop): Same.
7799 * libxcoff.h : Declare common parts for xcoff64.
7800 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
7801 and complain function tables.
7802
7803 2002-04-28 Alan Modra <amodra@bigpond.net.au>
7804
7805 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7806 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7807
7808 2002-04-26 Alan Modra <amodra@bigpond.net.au>
7809
7810 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7811 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7812
7813 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7814 same as the output before calling elf_link_input_bfd.
7815
7816 * coffcode.h (coff_compute_section_file_positions): Set
7817 section_tail after shuffling section list.
7818
7819 2002-04-24 Christian Groessler <chris@groessler.org>
7820
7821 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7822 addresses are 23bit with a special layout, not plain 32bit
7823 values. Prevent relocation of immediate values.
7824
7825 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7826
7827 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7828 MIPS-16 ASE flags are set, print something to indicate that.
7829
7830 2002-04-23 Alan Modra <amodra@bigpond.net.au>
7831
7832 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7833 under which a plt call stub is used.
7834 (final_link_relocate): Similarly.
7835 (allocate_plt_static): Clear h-plabel except when plt entry is
7836 exclusively used for a plabel.
7837 (allocate_dynrelocs): Use the above to simplify plt sizing.
7838 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7839 (elf32_hppa_link_hash_table_create): Init.
7840 (BL22_RP): Define.
7841 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7842 (elf32_hppa_check_relocs): Set has_22bit_branch.
7843
7844 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7845 (final_link_relocate): Likewise.
7846
7847 2002-04-22 Jakub Jelinek <jakub@redhat.com>
7848
7849 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7850 search table if some FDE is DW_EH_PE_aligned encoded either.
7851 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7852
7853 2002-04-22 Richard Smith <richard@ex-parrot.com>
7854 Jakub Jelinek <jakub@redhat.com>
7855
7856 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7857 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7858 encoded personality.
7859 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7860 for CIE/FDE removal.
7861
7862 2002-04-20 Tom Rix <trix@redhat.com>
7863
7864 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7865
7866 2002-04-20 Alan Modra <amodra@bigpond.net.au>
7867
7868 * archures.c (bfd_lookup_arch): Move the list order comment..
7869 (struct bfd_arch_info): ..to where it belongs.
7870 * bfd-in2.h: Regenerate.
7871
7872 * archures.c (bfd_lookup_arch): Add comment on list order.
7873 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7874 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7875 is always at head of list.
7876
7877 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7878
7879 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7880 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7881 definition of these functions for ARM_WINCE builds as they are
7882 not used.
7883 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7884 for ARM_WINCE builds.
7885
7886 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7887
7888 * coff-arm.c (bfd_arm_process_before_allocation):
7889
7890 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
7891
7892 * cpu-sh.c (scan_mach): Delete.
7893 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7894 (bfd_sh_arch): Likewise.
7895
7896 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7897
7898 * ihex.c (ihex_write_object_contents): Fix check for records
7899 crossing 64K boundaries.
7900
7901 2002-04-16 Alan Modra <amodra@bigpond.net.au>
7902
7903 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7904 type rather than just assuming entries are ELF.
7905 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7906 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7907 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7908 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7909 rather than elf_link_hash_entry.
7910
7911 2002-04-15 Richard Henderson <rth@redhat.com>
7912
7913 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7914 n32 binaries.
7915
7916 2002-04-15 Michael Snyder <msnyder@redhat.com>
7917
7918 * opncls.c (bfd_close): Write contents if writeable.
7919 Minor formatting tidy-ups.
7920
7921 2002-04-15 Alan Modra <amodra@bigpond.net.au>
7922
7923 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7924
7925 2002-04-12 Michael Snyder <msnyder@redhat.com>
7926
7927 * bfd-in.h (bfd_get_section_lma): New access macro.
7928 Minor white-space fix-up.
7929
7930 2002-04-12 Alan Modra <amodra@bigpond.net.au>
7931
7932 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7933 header pad.
7934
7935 2002-04-09 DJ Delorie <dj@redhat.com>
7936
7937 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7938
7939 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7940
7941 * coffcode.h (coff_read_word): New.
7942 (coff_compute_checksum): New.
7943 (coff_apply_checksum): New.
7944 (coff_write_object_contents): Call coff_apply_checksum () to
7945 apply checksum to PE image.
7946
7947 2002-04-08 Randolph Chung <tausq@debian.org>
7948
7949 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7950 (elf32_hppa_final_link): Split out sorting logic to..
7951 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7952 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7953
7954 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7955
7956 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7957 pattern.
7958 * configure: Re-generate.
7959
7960 2002-04-07 Andrew Cagney <ac131313@redhat.com>
7961
7962 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7963 is greater or equal to 4.3.3.
7964 * configure: Regenerate.
7965 Fix PR gdb/344.
7966
7967 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
7968
7969 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7970 R_CRIS_32_PCREL>: Fix typo in name.
7971 (cris_elf_check_relocs): Always create .rela.got here when
7972 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7973 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7974 assume it's created.
7975
7976 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
7977
7978 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7979 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7980 define.
7981 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7982 * bfd.c (bfd_link_hash_table_free): Define.
7983 * binary.c (binary_bfd_link_hash_table_free): Define.
7984 * bout.c (b_out_bfd_link_hash_table_free): Define.
7985 * coff-rs6000.c (rs6000coff_vec): Include
7986 _bfd_generic_link_hash_table_free.
7987 (pmac_xcoff_vec): Likewise.
7988 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7989 (aix5coff64_vec): Likewise.
7990 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7991 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7992 (bfd_elf32_bfd_link_hash_table_free): Define.
7993 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7994 (bfd_elf32_bfd_link_hash_table_free): Define.
7995 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7996 define.
7997 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7998 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7999 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8000 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8001 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8002 (_bfd_generic_link_hash_table_free): Add prototype.
8003 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8004 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8005 * linker.c (_bfd_generic_link_hash_table_free): New function.
8006 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8007 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8008 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8009 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8010 * som.c (som_bfd_link_hash_table_free): Define.
8011 * srec.c (srec_bfd_link_hash_table_free): Define.
8012 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8013 * versados.c (versados_bfd_link_hash_table_free): Define.
8014 * vms.c (vms_bfd_link_hash_table_free): New function.
8015 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8016
8017 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8018 instead of bfd_alloc.
8019 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8020 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8021 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8022 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8023 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8024 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8025 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8026 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8027 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8028 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8029 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8030 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8031 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8032 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8033 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8034 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8035 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8036 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8037 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8038 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8039 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8040 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8041 * m68klinux.c (linux_link_hash_table_create): Likewise.
8042 * sparclinux.c (linux_link_hash_table_create): Likewise.
8043 * sunos.c (sunos_link_hash_table_create): Likewise.
8044 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8045
8046 * targets.c: Add _bfd_link_hash_table_free to xvec.
8047
8048 * bfd-in2.h: Regenerate.
8049 * libbfd.h: Regenerate.
8050 * libcoff.h: Regenerate.
8051
8052 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8053
8054 * dep-in.sed: Cope with absolute paths.
8055 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8056 Run "make dep-am".
8057 * Makefile.in: Regenerate.
8058 * coff-arm.c: Fix copyright date.
8059 * cpu-h8300.c: Likewise.
8060 * cpu-i370.c: Likewise.
8061 * cpu-s390.c: Likewise.
8062 * cpu-mips.c: Likewise.
8063 * po/SRC-POTFILES.in: Regenerate.
8064
8065 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8066
8067 * Makefile.am: Add elfxx-mips.c to the known backends.
8068 (elf32-mips.lo): remove dependency to coff/external.h.
8069 * Makefile.in: Regenerate.
8070 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8071 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8072 accordingly.
8073 * configure: Regenerate.
8074 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8075 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8076 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8077 MIPS specific backend functions.
8078 * elf32-mips.c: Moved most code to elfxx-mips.c.
8079 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8080 static.
8081 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8082 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8083 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8084 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8085 interface to allow selection of the right REL or RELA howto table.
8086 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8087 static. Let it refuse n32 objects.
8088 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8089 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8090 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8091 (elf32_mips_ignore_discarded_relocs): Rename from
8092 _bfd_elf32_mips_ignore_discarded_relocs.
8093 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8094 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8095 (elf_mips_howto_table_rela): Remove.
8096 * elf64-mips.c: Moved most code to elfxx-mips.c.
8097 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8098 (mips_elf64_rtype_to_howto): New function.
8099 (mips_elf64_object_p): Likewise.
8100 (elf64_mips_irix_compat): Likewise.
8101 * elfxx-mips.c: New file containing common code merged together from
8102 elf32-mips.c and elf64-mips.c.
8103 * elfxx-mips.h: New file containing MIPS specific prototypes from
8104 elf-bfd.h.
8105 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8106 elf_backend_mips_rtype_to_howto.
8107
8108 2002-04-04 Alan Modra <amodra@bigpond.net.au>
8109
8110 * srec.c (MAXCHUNK, Chunk): Revise comments.
8111 (srec_write_record): Correct buffer size.
8112 (srec_write_header): Do without intermediate buffer.
8113 (srec_write_section): Validate Chunk.
8114 (srec_write_terminator): Pass NULL instead of dummy buffer.
8115 (srec_write_symbols): Pass file and symbol names directly to
8116 bfd_bwrite so sprintf won't overflow buffer.
8117
8118 2002-04-03 Jakub Jelinek <jakub@redhat.com>
8119
8120 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8121 PC relative relocs against hidden symbols.
8122 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8123
8124 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8125
8126 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8127 LMAs, loop over segments until p_vaddr and p_memsz specify an
8128 extent enclosing the section.
8129
8130 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8131
8132 * ihex.c (ihex_write_object_contents): Do not allow records to
8133 cross a 64K boundary - wrap if necessary.
8134
8135 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8136
8137 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8138 which caused the returned LWP ID to always be 0.
8139
8140 2002-04-01 Richard Henderson <rth@redhat.com>
8141
8142 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8143 (elf32_sparc_relocate_section): Use it to figure out when to
8144 initialize .got entries.
8145 * elf64-sparc.c: Similarly.
8146
8147 2002-03-28 Alan Modra <amodra@bigpond.net.au>
8148
8149 * linker.c (link_action): Ignore duplicate warning syms.
8150 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8151 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8152 (elf_adjust_dynamic_symbol): Likewise.
8153 (elf_export_symbol): Likewise.
8154 (elf_link_find_version_dependencies): Likewise.
8155 (elf_link_assign_sym_version): Likewise.
8156 (elf_link_sec_merge_syms): Likewise.
8157 (elf_link_output_extsym): Likewise.
8158 (elf_gc_sweep_symbol): Likewise.
8159 (elf_gc_propagate_vtable_entries_used): Likewise.
8160 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8161 (elf_gc_allocate_got_offsets): Likewise.
8162 (elf_collect_hash_codes): Likewise.
8163 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8164 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8165 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8166 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8167 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8168 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8169 (elf_cris_discard_excess_dso_dynamics): Likewise.
8170 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8171 (mark_PIC_calls): Likewise.
8172 (allocate_plt_static): Likewise.
8173 (allocate_dynrelocs): Likewise.
8174 (readonly_dynrelocs): Likewise.
8175 * elf32-i386.c (allocate_dynrelocs): Likewise.
8176 (readonly_dynrelocs): Likewise.
8177 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8178 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8179 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8180 (mips_elf_sort_hash_table_f): Likewise.
8181 (mips_elf_check_mips16_stubs): Likewise.
8182 * elf32-s390.c (allocate_dynrelocs): Likewise.
8183 (readonly_dynrelocs): Likewise.
8184 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8185 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8186 (xstormy16_relax_plt_realloc): Likewise.
8187 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8188 (elf64_alpha_output_extsym): Likewise.
8189 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8190 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8191 (mips_elf64_check_mips16_stubs): Likewise.
8192 (mips_elf64_output_extsym): Likewise.
8193 * elf64-ppc.c (func_desc_adjust): Likewise.
8194 (allocate_dynrelocs): Likewise.
8195 (readonly_dynrelocs): Likewise.
8196 * elf64-s390.c (allocate_dynrelocs): Likewise.
8197 (readonly_dynrelocs): Likewise.
8198 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8199 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8200 (readonly_dynrelocs): Likewise.
8201 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8202 * aoutx.h (aout_link_write_other_symbol): Likewise.
8203 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8204 (_bfd_coff_write_global_sym): Likewise.
8205 * i386linux.c (linux_tally_symbols): Likewise.
8206 * m68klinux.c (linux_tally_symbols): Likewise.
8207 * sparclinux.c (linux_tally_symbols): Likewise.
8208 * pdp11.c (aout_link_write_other_symbol): Likewise.
8209 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8210 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8211 (xcoff_write_global_symbol): Likewise.
8212
8213 * cofflink.c (_bfd_coff_final_link): Formatting.
8214 * cpu-mips.c (mips_compatible): Make static, prototype.
8215 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8216 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8217 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8218 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8219 (mips_elf64_final_link): Likewise.
8220 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8221 prototype.
8222
8223 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8224
8225 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8226 (SWAP_OUT_RELOC_OFFSET): Define.
8227
8228 2002-03-27 Gregory Steuck <greg@nest.cx>
8229
8230 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8231 terminating NULL if empty symbol table.
8232 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8233
8234 2002-03-26 H.J. Lu (hjl@gnu.org)
8235
8236 * elflink.h (elf_link_input_bfd): Revert the last change since
8237 the gcc exception handling isn't fixed yet.
8238
8239 2002-03-26 H.J. Lu (hjl@gnu.org)
8240
8241 * elflink.h (elf_link_input_bfd): Complain about relocations
8242 against local symbols in discarded sections.
8243
8244 2002-03-26 Alan Modra <amodra@bigpond.net.au>
8245
8246 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8247
8248 2002-03-23 Alan Modra <amodra@bigpond.net.au>
8249
8250 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8251 section file offset for !SEC_LOAD sections.
8252
8253 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
8254
8255 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8256 <case R_ARM_GOT>): Handle relocations to Thumb functions.
8257
8258 2002-03-21 Alan Modra <amodra@bigpond.net.au>
8259
8260 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8261 Whitespace changes.
8262 * archive.c: Update copyright date.
8263 * bfd-in2.h: Regenerate.
8264 * libbfd.h: Regenerate.
8265 * Makefile.am: Run "make dep-am"
8266 * Makefile.in: Regenerate.
8267 * po/SRC-POTFILES.in: Regenerate.
8268
8269 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
8270
8271 * dwarf2.c (struct funcinfo): Move up.
8272 (lookup_address_in_function_table): New argument function_ptr.
8273 Set it.
8274 (lookup_address_in_line_table): New argument function. If function
8275 is non-NULL, use it to handle ``addr'' before the first line note of
8276 the function.
8277 (comp_unit_find_nearest_line): Update and swap calls to
8278 lookup_address_in_function_table and lookup_address_in_line_table.
8279 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8280 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8281
8282 2002-03-20 Tom Rix <trix@redhat.com>
8283
8284 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
8285 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
8286 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
8287
8288 2002-03-19 Tom Rix <trix@redhat.com>
8289
8290 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
8291 dynamic objects in archives.
8292
8293 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8294
8295 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8296 STT_NOTYPE symbols to STT_OBJECT.
8297
8298 2002-03-18 Jan Hubicka <jh@suse.cz>
8299
8300 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8301
8302 2002-03-18 Tom Rix <trix@redhat.com>
8303
8304 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8305 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8306 * coff-rs6000 (do_pad) : New function for archive padding.
8307 (do_copy) : New function for object file copying in archives.
8308 (do_shared_object_padding) : New function for padding shared
8309 objects to their text section alignment in archives.
8310 (bfd_xcoff_ar_achive_set_magic) : Stub.
8311 (xcoff_write_armap_big) : Use do_copy and do_pad.
8312 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8313 do_copy and do_pad.
8314 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
8315 bfd_xcoff_magic_number.
8316 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8317 fop.
8318 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8319 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8320 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8321 * rs6000-core.c : Update copyright date.
8322 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
8323 csectpp.
8324 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8325 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8326 (coff_set_flags) : Use bfd_xcoff_magic_number.
8327 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8328 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8329 * Makefile.am : Same.
8330 * config.bfd : Same.
8331 * targets.c : Same.
8332 * configure : Regnerate.
8333 * Makefile.in : Same.
8334 * bfd-in2.h : Same.
8335
8336 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8337
8338 * po/fr.po: Updated version.
8339
8340 2002-03-18 Alan Modra <amodra@bigpond.net.au>
8341
8342 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8343 * libbfd.h: Regenerate.
8344 * archive.c (coff_write_armap): Pass on failures from
8345 bfd_write_bigendian_4byte_int.
8346
8347 2002-03-14 H.J. Lu <hjl@gnu.org>
8348
8349 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8350 error to bfd_error_nonrepresentable_section for reinit_array
8351 section in DSO.
8352
8353 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8354
8355 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8356 OR it in rather than replacing previously selected flags.
8357
8358 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8359 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8360
8361 2002-03-14 Alan Modra <amodra@bigpond.net.au>
8362
8363 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8364 (N): Use the above.
8365 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8366 ensure reloc size matches before calling elf_link_input_bfd.
8367 Add an assert to check reloc size when counting output relocs.
8368
8369 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8370
8371 * mmo.c (mmo_get_loc): Return NULL rather than false.
8372
8373 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8374
8375 * po/fr.po: Updated version.
8376
8377 2002-03-13 Alan Modra <amodra@bigpond.net.au>
8378
8379 * archures.c (bfd_default_compatible): Test bits_per_word.
8380 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8381 bfd_default_compatible.
8382 * cpu-i370.c (i370_compatible): Likewise.
8383 * cpu-sparc.c (sparc_compatible): Likewise.
8384 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8385
8386 * elflink.h: Formatting fixes.
8387 (elf_link_output_extsym): Merge undefined and undef weak cases.
8388
8389 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8390 when word size of input matches output word size.
8391
8392 2002-03-12 Andreas Jaeger <aj@suse.de>
8393
8394 * cpu-i386.c (i386_compatible): New. Use it instead of
8395 bfd_default_compatible.
8396
8397 2002-03-07 H.J. Lu (hjl@gnu.org)
8398
8399 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8400 as the type for bfd_reloc_val.
8401
8402 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8403
8404 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8405 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8406 (elf_hppa_final_link_relocate): Correct relocations for indirect
8407 references to local data through the DLT. Fix .opd creation for
8408 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8409 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8410 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8411 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8412 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8413 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8414 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8415
8416 2002-03-05 Jakub Jelinek <jakub@redhat.com>
8417
8418 * merge.c (_bfd_merge_sections): Don't segfault if there
8419 is nothing to merge due to GC.
8420
8421 2002-03-05 Alan Modra <amodra@bigpond.net.au>
8422
8423 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8424 symbols that have been forced local.
8425
8426 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8427 to output forced local syms for non-shared link.
8428 (elf_link_output_extsym): Tweak condition for calling backend
8429 adjust_dynamic_symbol so that previous behaviour is kept.
8430 Whitespace changes throughout file.
8431
8432 2002-03-04 H.J. Lu <hjl@gnu.org>
8433
8434 * elf.c (bfd_section_from_shdr): Handle special sections,
8435 .init_array, .fini_array and .preinit_array.
8436 (elf_fake_sections): Likewise.
8437
8438 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8439 DT entry only if the section is in output for .init_array,
8440 .fini_array and .preinit_array. Complain about .preinit_array
8441 section in DSO.
8442 (elf_bfd_final_link): Warn zero size for .init_array,
8443 .fini_array and .preinit_array sections.
8444
8445 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8446 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8447 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8448 .preinit_array.
8449
8450 2002-03-04 Alan Modra <amodra@bigpond.net.au>
8451
8452 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8453 * configure: Regenerate.
8454
8455 2002-03-02 Tom Rix <trix@redhat.com>
8456
8457 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8458 symbolic equiv.
8459 * coff-rs6000.c (xcoff_howto_table): Same.
8460
8461 2002-03-01 David Mosberger <davidm@hpl.hp.com>
8462
8463 * elflink.h (size_dynamic_sections): If section named
8464 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8465 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8466 ".init_array" and ".fini_array".
8467 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8468 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8469 DT_FINI_ARRAY.
8470
8471 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
8472
8473 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8474 dynsyms.
8475
8476 2002-02-25 Alan Modra <amodra@bigpond.net.au>
8477
8478 * elf64-hppa.h: Update copyright date.
8479
8480 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8481 (ppc64_elf_relocate_section): Don't generate power4 style branch
8482 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8483
8484 2002-02-22 Jakub Jelinek <jakub@redhat.com>
8485
8486 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8487 last patch.
8488 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8489
8490 2002-02-21 Andreas Jaeger <aj@suse.de>
8491
8492 * elf64-x86-64.c: Major rework that introduces all recent changes
8493 to the x86-64 backend. Get a closer match to elf32-i386.
8494 (struct elf64_x86_64_dyn_relocs): Rename from
8495 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8496 all users.
8497 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8498 sections.
8499 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8500 remove casts, initialize new hash members.
8501 (create_got_section): New.
8502 (elf64_x86_64_create_dynamic_sections): New.
8503 (elf64_x86_64_copy_indirect_symbol): New.
8504 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8505 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8506 Reference count possible .plt and .got entries. Don't test input
8507 section SEC_READONLY here to try to avoid copy relocs, and keep
8508 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8509 DF_TEXTREL here. Delay setting of variables until needed. Cache
8510 pointer to "sreloc" section in elf_section_data. Tweak condition
8511 under which .got created. Report files with bad relocation
8512 section names.
8513 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8514 Reference count possible .plt entries. Don't deallocate .got and
8515 .relgot space here.
8516 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8517 do copy reloc processing for weakdefs. Remove redundant casts and
8518 aborts. Delay setting of vars until needed. Move creation of
8519 dynamic symbols and allocation of .plt and .rela.plt to
8520 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8521 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8522 (allocate_dynrelocs): New.
8523 (readonly_dynrelocs): New.
8524 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8525 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8526 Zero out the dynamic allocated content space.
8527 (elf64_x86_64_discard_copies): Removed.
8528 (elf64_x86_64_relocate_section): Make use of dynamic section
8529 short-cuts. Localise vars, and delay setting. Better error
8530 reporting, replace BFD_ASSERT with abort. Check
8531 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8532 regular object file and tread the weak definition as the normal
8533 one. Don't discard relocs for undefweak or undefined symbols and
8534 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8535 relocs.
8536 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8537 symbols that have been forced local. Use same test to decide if
8538 we can use a relative reloc for got as relocate_section. Expand
8539 SHN_UNDEF comment. Move expressions out of function calls.
8540 Replace BFD_ASSERT with abort.
8541 (bfd_elf64_bfd_final_link): Removed.
8542 (elf_backend_copy_indirect_symbol): Define.
8543
8544 2002-02-20 Tom Rix <trix@redhat.com>
8545
8546 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8547 (_bfd_xcoff_reloc_type_lookup): Use it.
8548 * coff64-rs6000.c (xcoff64_howto_table): Same.
8549 (xcoff64_reloc_type_lookup): Same.
8550
8551 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8552
8553 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
8554 little endian.
8555
8556 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8557
8558 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8559 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8560 * bfd-in2.h: Regenerate.
8561 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8562 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8563 with "s390:64-bit".
8564 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8565 (elf_s390_reloc_type_lookup): Likewise.
8566 (elf_s390_check_relocs): Likewise.
8567 (elf_s390_gc_sweep_hook): Likewise.
8568 (elf_s390_relocate_section): Likewise.
8569 (elf_s390_object_p): Use renamed architecture define.
8570 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8571
8572 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
8573
8574 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8575
8576 2002-02-19 Jakub Jelinek <jakub@redhat.com>
8577
8578 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8579 absptr -> pcrel optimization for shared libs.
8580 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8581 library cannot be converted to pcrel.
8582 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8583 relative.
8584 * elf32-i386.c (elf_i386_relocate_section): If
8585 _bfd_elf_section_offset returned -2, skip, but make sure the
8586 relocation is installed.
8587 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8588 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8589 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8590 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8591 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8592 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8593 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8594 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8595 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8596 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8597 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8598 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
8599 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8600 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8601 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8602 _bfd_elf_section_offset returning -2 the same way as -1.
8603 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8604 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8605 and BFD_ASSERT.
8606 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8607
8608 2002-02-18 Tom Rix <trix@redhat.com>
8609
8610 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8611 (bfd_xcoff_size_dynamic_sections): Same.
8612 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8613 (bfd_xcoff_size_dynamic_sections): Same.
8614 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8615 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8616 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8617 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8618 * bfd-in2.h: Regenerate.
8619
8620 2002-02-18 Alan Modra <amodra@bigpond.net.au>
8621
8622 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8623 (struct ppc_link_hash_table): Add sfpr.
8624 (ppc64_elf_link_hash_table_create): Init it.
8625 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8626 .glink out to..
8627 (create_linkage_sections): ..here. Make .sfpr too.
8628 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8629 dynobj early.
8630 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8631 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8632 ._restf* functions, and create as needed.
8633 (func_desc_adjust): Only force_local for shared libs.
8634
8635 2002-02-18 David O'Brien <obrien@FreeBSD.org>
8636
8637 * configure.in: Bump version number post 2.12 branching.
8638 * configure: Regenerate.
8639
8640 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8641
8642 * mmo.c: Correct and improve comments.
8643 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8644 zero-pad. Use input to fill up non-empty bfd buffer.
8645 (mmo_flush_chunk): New function.
8646 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8647 changed. Don't emit location specifier if VMA is same as
8648 *LAST_VMAP after omitting leading zero contents. Call
8649 mmo_flush_chunk before emitting location specifier.
8650 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8651 with mmo_write_loc_chunk calls.
8652 (mmo_internal_write_section): Call mmo_flush_chunk after
8653 mmo_write_chunk.
8654 (mmo_write_symbols_and_terminator): Move :Main to first position
8655 in symbol array. Add faked one if it does not exist if there are
8656 other symbols. Don't add it if there are no symbols at all. Move
8657 out test for value of :Main from symbol loop. Rename table
8658 fakemain to maintable and variable mainsym to fakemain.
8659
8660 2002-02-15 Richard Henderson <rth@redhat.com>
8661
8662 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8663 section with no got matches any got. Simplify error generaion.
8664
8665 2002-02-15 Alan Modra <amodra@bigpond.net.au>
8666
8667 Support arbitrary length fill patterns.
8668 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8669 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8670 Call default_data_link_order.
8671 (default_fill_link_order): Delete.
8672 (default_data_link_order): New function.
8673 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8674 of bfd_fill_link_order with bfd_data_link_order.
8675 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8676 * elf64-mips.c (mips_elf64_final_link): Likewise.
8677
8678 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8679 Correct value returned in "end" for "0x<non-hex>".
8680
8681 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8682
8683 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8684 (scan): Test against 'mach' field in info structure.
8685
8686 2002-02-14 Alan Modra <amodra@bigpond.net.au>
8687
8688 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8689
8690 2002-02-14 Matt Fredette <fredette@netbsd.org>
8691
8692 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8693 EF_M68000.
8694
8695 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8696
8697 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
8698 non-zero physical addresses when adjusting the LMAs of new
8699 sections.
8700
8701 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8702
8703 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8704 from _bfd_elf_hppa_gen_reloc_type.
8705 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8706 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8707 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8708 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8709
8710 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
8711
8712 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8713 loading its contents if there's nothing to do in it.
8714
8715 2002-02-12 Alan Modra <amodra@bigpond.net.au>
8716
8717 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8718 64k boundary.
8719
8720 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8721 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8722 (ppc64_elf_finish_dynamic_sections): Set values for them.
8723
8724 2002-02-11 Michael Snyder <msnyder@redhat.com>
8725
8726 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8727 * elf.c (elfcore_grok_pstatus): Add prototype.
8728 (elfcore_grok_lwpstatus): Add prototype.
8729 (elfcore_write_lwpstatus): New function.
8730 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8731
8732 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
8733
8734 * elf32-sh.c: Added missing prototypes.
8735 * elf32-sh64.c: Likewise.
8736 (sh_elf_align_loads): Mark unused args as such.
8737 * elf64-sh64.c: Added missing prototypes.
8738 (struct elf_sh64_link_hash_entry): Fix typo.
8739 (sh_elf64_relocate_section): Fix info argument passed to
8740 _bfd_elf_section_offset.
8741
8742 2002-02-11 Alan Modra <amodra@bigpond.net.au>
8743
8744 * Makefile.am: "make dep-am".
8745 * Makefile.in: Regenerate.
8746 * aclocal.m4: Regenerate.
8747 * config.in: Regenerate.
8748 * configure: Regenerate.
8749
8750 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
8751
8752 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8753 variable warnings.
8754 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8755 comparison warning.
8756 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8757 cast warnings for the common case.
8758
8759 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8760
8761 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8762 vectors.
8763 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8764 vectors.
8765
8766 2002-02-09 Richard Henderson <rth@redhat.com>
8767
8768 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8769 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8770 (elf64_alpha_relocate_section): Likewise.
8771 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8772 * bfd-in2.h, libbfd.h: Rebuild.
8773
8774 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8775
8776 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8777 that base-plus-offset reloc accounting is consistent.
8778 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8779 up to date for undefined symbols.
8780
8781 2002-02-08 Eric Christopher <echristo@redhat.com>
8782
8783 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8784
8785 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8786 sections for the O32 ABI.
8787
8788 2002-02-08 Chris Demetriou <cgd@broadcom.com>
8789
8790 * elf32-arm.h: Fix formatting of _("...").
8791 * elf32-d10v.c: Likewise.
8792 * elf32-m68k.c: Likewise.
8793 * elf32-mips.c: Likewise.
8794
8795 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
8796
8797 * coff-or32.c: Fix compile time warning messages.
8798
8799 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
8800
8801 Contribute sh64-elf.
8802 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8803 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8804 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8805 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8806 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8807 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8808 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8809 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8810 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8811 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8812 New relocs.
8813 * libbfd.h, bfd-in2.h: Rebuilt.
8814 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8815 (sh_reloc_map): Map them.
8816 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8817 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8818 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8819 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8820 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8821 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8822 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8823 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8824 datalabel_got_offset.
8825 (sh_elf_link_hash_newfunc): Initialize it.
8826 (sh_elf_relocate_section): Augment the scope of
8827 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
8828 GOT and GOTOFF handling to new SHmedia relocation types. Support
8829 GOT_BIAS.
8830 (sh_elf_check_relocs): Likewise.
8831 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8832 PLT entries using movi_shori_putval. Support GOT_BIAS.
8833 (sh_elf_finish_dynamic_sections): Likewise.
8834 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8835 relocation, it's now done by the caller.
8836 (GOT_BIAS): New.
8837 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8838 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8839 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8840 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8841 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8842 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8843 sh64_elf64_hash_table): New.
8844 (sh_elf64_howto_table): Introduce new relocs.
8845 (sh_elf64_info_to_howto): Accept new PIC relocs.
8846 (sh_elf64_relocate_section): Augment the scope of
8847 seen_stt_datalabel. Support new PIC relocs.
8848 (sh_elf64_check_relocs): Support new PIC relocs.
8849 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8850 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8851 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8852 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8853 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8854 movi_shori_putval, movi_3shori_putval,
8855 sh64_elf64_create_dynamic_sections,
8856 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8857 sh64_elf64_size_dynamic_sections,
8858 sh64_elf64_finish_dynamic_symbol,
8859 sh64_elf64_finish_dynamic_sections): New.
8860 (elf_backend_create_dynamic-sections,
8861 bfd_elf64_bfd_link_hash_table_create,
8862 elf_backend_adjust_dynamic_symbol,
8863 elf_backend_size_dynamic_sections,
8864 elf_backend_finish_dynamic_symbol,
8865 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8866 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8867 elf_backend_got_header_size, elf_backend_plt_header_size):
8868 Define.
8869 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8870 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8871 match official numbers and names; moved unmaching ones to the
8872 range 0xf2-0xff.
8873 * elf32-sh64.c, elf64-sh64.c: Likewise.
8874 2001-03-12 DJ Delorie <dj@redhat.com>
8875 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8876 sections.
8877 2001-03-12 DJ Delorie <dj@redhat.com>
8878 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8879 be aligned.
8880 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
8881 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
8882 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8883 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8884 .cranges section with SEC_SORT_ENTRIES set.
8885 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8886 incoming sorted .cranges section.
8887 (sh64_bfd_elf_copy_private_section_data): New.
8888 (sh64_elf_final_write_processing): Only sort .cranges and modify
8889 start address if called by linker.
8890 2001-01-08 Ben Elliston <bje@redhat.com>
8891 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
8892 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
8893 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
8894 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8895 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8896 line. Add comments before all entries.
8897 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8898 comment.
8899 (sh_elf64_reloc): Correct head comment.
8900 (sh_elf64_relocate_section): Correct spacing.
8901 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8902 instead call reloc_dangerous callback.
8903 <case R_SH_SHMEDIA_CODE>: New case.
8904 (sh_elf64_gc_mark_hook): Correct spacing.
8905 (sh_elf64_check_relocs): Ditto.
8906 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8907 New case.
8908 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8909 functions.
8910 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8911 clarify describing comment. Add comments before all entries.
8912 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8913 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
8914 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
8915 Sort .cranges section in final link. Prepare to set bit 0 on
8916 entry address.
8917 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8918 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8919 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8920 .cranges section.
8921 (sh64_backend_section_from_shdr): New, to recognize
8922 SHT_SH5_CR_SORTED on incoming .cranges section.
8923 (elf_backend_section_from_shdr): Define.
8924 (sh64_elf_final_write_processing): Sort outgoing .cranges
8925 section. (New, temporarily disabled:) Set bit 0 on entry address
8926 according to ISA type.
8927 (sh64_find_section_for_address): New.
8928 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8929 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8930 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8931 bfd_malloc, not xmalloc.
8932 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8933 global.
8934 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8935 temporarily disabled) setting bit 0 on entry address.
8936 (elf_backend_final_write_processing): Define.
8937 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
8938 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8939 be a proper relocation for PTA and PTB rather than a marker.
8940 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8941 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8942 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8943 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8944 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8945 Zero src_mask.
8946 * elf64-sh64.c: Ditto.
8947 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8948 * elf32-sh64.c: Include opcodes/sh64-opc.h
8949 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8950 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8951 parameters. No unused parameters. Caller changed.
8952 <case R_SH_PT_16>: New case.
8953 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8954 * Makefile.in: Regenerate.
8955 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
8956 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8957 all code sections.
8958 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8959 (sh64_elf_merge_private_data): Ditto.
8960 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8961 to access stored section flags.
8962 (sh64_elf_final_write_processing): Return immediately unless
8963 called by linker. Use sh64_elf_section_data (cranges) to get size
8964 of linker-generated cranges entries.
8965 (sh64_elf_copy_private_data): Add missing "return true".
8966 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8967 (sh_elf64_merge_private_data): Ditto.
8968 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
8969 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8970 elf64-sh64.c:sh64_elf_fake_sections.
8971 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
8972 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
8973 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8974 (sh64_elf_final_write_processing): New.
8975 (elf_backend_final_write_processing): Define.
8976 (sh64_elf_fake_sections): Get header flags from tdata field.
8977 (sh64_elf_copy_private_data): Do not call
8978 sh64_elf_copy_private_data_internal, just copy e_flags field.
8979 (sh64_elf_merge_private_data): Do not call
8980 sh64_elf_copy_private_data_internal.
8981 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
8982 Remove EF_SH64_ABI64, let ELF size make difference.
8983 Remove SH64-specific BFD section flag.
8984 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8985 containing SHmedia through elf_section_data (asect)->tdata
8986 non-zero, not using a BFD section flag.
8987 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8988 (sh64_elf_merge_private_data): Similar.
8989 (elf_backend_section_flags): Don't define.
8990 (sh64_elf_backend_section_flags): Delete.
8991 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8992 not EF_SH64_ABI64.
8993 (sh_elf64_merge_private_data): Similar.
8994 * section.c (Section flags definitions): Don't define
8995 SEC_SH_ISA_SHMEDIA.
8996 (bfd-in2.h): Regenerate.
8997 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
8998 Make DataLabel references work with partial linking.
8999 * elf32-sh64.c: Fix formatting.
9000 (sh64_elf_link_output_symbol_hook): New.
9001 (elf_backend_link_output_symbol_hook): Define to
9002 sh64_elf_link_output_symbol_hook.
9003 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9004 undefined if partial linking. Adjust sanity check.
9005 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9006 (elf_backend_link_output_symbol_hook): Define to
9007 sh64_elf64_link_output_symbol_hook.
9008 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9009 undefined if partial linking. Adjust sanity check.
9010 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
9011 Implement semantics for inter-file DataLabel references.
9012 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9013 (sh64_elf64_add_symbol_hook): New.
9014 (sh_elf64_relocate_section): If passing an indirect symbol with
9015 st_type STT_DATALABEL on the way to a symbol with st_other
9016 STO_SH5_ISA32, do not bitor 1 to the relocation.
9017 (elf_backend_add_symbol_hook): Define to
9018 sh64_elf64_add_symbol_hook.
9019 * elf64-sh32.c: Tweak comments.
9020 (DATALABEL_SUFFIX): Define.
9021 (sh64_elf_add_symbol_hook): New.
9022 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9023 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9024 symbol with st_type STT_DATALABEL on the way to a symbol with
9025 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9026 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
9027 Pass through STT_DATALABEL.
9028 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9029 (elf_backend_get_symbol_type): Define.
9030 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9031 (elf_backend_get_symbol_type): Define.
9032 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
9033 * elf32-sh64.c: Tweak comments.
9034 (sh64_elf_copy_private_data_internal): Add prototype.
9035 (bfd_elf32_bfd_set_private_flags): Define.
9036 (sh64_elf_copy_private_data_internal): Compare machine name, not
9037 textual BFD target name, to check whether to copy section flag
9038 SHF_SH5_ISA32.
9039 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9040 Tweak section-contents-type-mismatch message.
9041 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9042 Validize reloc-types.
9043 * elf64-sh64.c: New file.
9044 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9045 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9046 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9047 Regenerate dependencies.
9048 * Makefile.in: Regenerate.
9049 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9050 bfd_elf64_sh64l_vec.
9051 * configure.in: Handle bfd_elf64_sh64_vec and
9052 bfd_elf64_sh64l_vec.
9053 * configure: Regenerate.
9054 * po/POTFILES.in: Regenerate.
9055 * po/bfd.pot: Regenerate.
9056 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
9057 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9058 anything else but EF_SH64 and EF_SH64_ABI64.
9059 (sh64_elf_merge_private_data): Emit error for anything else but
9060 EF_SH64 and EF_SH64_ABI64.
9061 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9062 from targ_selvecs.
9063 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9064 bfd_elf32_sh64l_vec as a temporary measure.
9065 * configure: Regenerate.
9066 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
9067 * cpu-sh.c (arch_info_struct): Include sh5 item
9068 unconditionalized.
9069 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9070 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9071 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9072 * elf32-sh64.c: Tweak comments.
9073 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9074 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9075 (sh64_elf_copy_private_data_internal): Wrap long line.
9076 (sh64_elf_merge_private_data): Rewrite to allow objects from
9077 SH64 subsets to be linked together.
9078 (INCLUDE_SHMEDIA): Define.
9079 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9080 Parenthesize plus-expression inside or-expression.
9081 <global symbol>: Ditto.
9082 (sh_elf_set_mach_from_flags): Remove code refusing
9083 deleted EF_SH64_32BIT_ABI flag.
9084 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
9085 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9086 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9087 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9088 (sh_elf_relocate_section) <local symbol>: Or 1 in
9089 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9090 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9091 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9092 relocation.
9093 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
9094 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9095 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9096 Regenerate dependencies.
9097 * Makefile.in: Regenerate.
9098 * archures.c: Add bfd_mach_sh5.
9099 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9100 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9101 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9102 * configure: Regenerate.
9103 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9104 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9105 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9106 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9107 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9108 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9109 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9110 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9111 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9112 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9113 in item for SH5.
9114 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9115 for SHmedia relocs.
9116 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9117 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9118 shmedia_prepare_reloc, goto final_link_relocate if it returns
9119 non-zero, else fail as before.
9120 (sh_elf_set_mach_from_flags): Provide function only if not defined
9121 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9122 (sh_elf_set_private_flags): Provide function only if not defined
9123 as a macro.
9124 (sh_elf_copy_private_data): Similar.
9125 (sh_elf_merge_private_data): Similar.
9126 * section.c (SEC_SH_ISA_SHMEDIA): New.
9127 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9128 * elf32-sh64.c: New file.
9129 * libbfd.h: Regenerate.
9130 * bfd-in2.h: Regenerate.
9131 * po/POTFILES.in: Regenerate.
9132 * po/bfd.pot: Regenerate.
9133 * bfd-in2.h: Regenerate.
9134 * libbfd.h: Regenerate.
9135
9136 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
9137
9138 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9139 been included, not drag it in.
9140 * bfd-in2.h: Regenerate.
9141
9142 2002-02-06 H.J. Lu (hjl@gnu.org)
9143
9144 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9145 the mach and ISA fields if necessary.
9146
9147 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9148
9149 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9150 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9151 be sure exactly which architecture this represents.
9152
9153 2002-02-05 Nick Clifton <nickc@redhat.com>
9154
9155 * po/tr.po: Updated translation.
9156
9157 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9158
9159 From Jimi X <jimix@watson.ibm.com>
9160 * archures (bfd_mach_ppc64): Define.
9161 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9162 (bfd_powerpc_arch): Define.
9163 * bfd-in2.h: Regenerate.
9164 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9165 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9166 (bfd_powerpc_archs): Add default powerpc64 arch.
9167
9168 2002-02-05 Alan Modra <amodra@bigpond.net.au>
9169
9170 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9171 against section syms in readonly sections. Don't do the global
9172 sym check if we find one.
9173 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9174 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
9175 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
9176 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9177 (elf_s390_grok_prstatus): Add missing prototype.
9178
9179 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9180
9181 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9182 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9183 Call bfd_get_section_by_name only once. Initialize
9184 bpodata->n_bpo_relocs_this_section.
9185 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9186 referring to DSOs.
9187 (bpo_reloc_request_sort_fn): Don't use difference of values as
9188 return-value.
9189
9190 2002-02-02 David O'Brien <obrien@FreeBSD>
9191
9192 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9193 version 4.5 and later the same as 5-CURRENT.
9194 * configure: Re-generate.
9195
9196 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9197
9198 * config.bfd (hppa*-*-netbsd*): New target.
9199
9200 2002-01-31 Philipp Thomas <pthomas@suse.de>
9201
9202 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9203 to front of message. Unify messages with elf32-arm.h. Use
9204 commas where neccessary.
9205 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9206 ERROR in messages. Unify messages with coff-arm.c. Correct
9207 VFP/FPA error message.
9208 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9209 APCS-32 for translation.
9210
9211 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9212
9213 Perform on-demand global register allocation from
9214 R_MMIX_BASE_PLUS_OFFSET relocs.
9215 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9216 bpo_reloc_request, struct bpo_greg_section_info): New.
9217 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9218 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9219 _bfd_mmix_check_all_relocs,
9220 _bfd_mmix_prepare_linker_allocated_gregs,
9221 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9222 (elf_mmix_howto_table): Correct src_mask for most relocs.
9223 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9224 case.
9225 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9226 case. Fix typo in comment. New label do_mmix_reloc.
9227 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9228 store first object file with a base-plus-offset reloc. Call
9229 mmix_elf_check_common_relocs for the part common with mmo.
9230 (mmix_elf_final_link): Write out linker-allocated register
9231 contents section.
9232 (elf_backend_gc_sweep_hook): Define.
9233 (bfd_elf64_bfd_relax_section): Define.
9234
9235 * mmo.c: Don't include <ctype.h>
9236 (mmo_init): Correct init-once logic.
9237
9238 2002-02-01 Tom Rix <trix@redhat.com>
9239
9240 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9241
9242 2002-02-01 Alan Modra <amodra@bigpond.net.au>
9243
9244 * Makefile.am: Run "make dep-am"
9245 * Makefile.in: Regenerate.
9246
9247 2002-01-31 David O'Brien <obrien@FreeBSD>
9248
9249 * configure.in: Recognize the differences in core files from FreeBSD
9250 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9251 5-CURRENT.
9252 * configure: Regenerate.
9253
9254 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
9255
9256 * coff-or32.c: New file.
9257 * cpu-or32.c: New file.
9258 * elf32-or32.c: New file.
9259 * archures.c: Add support for or32.
9260 * targets.c: Add support for or32.
9261 * bfd-in2.h: Regenerate.
9262 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
9263 coff_write_object_contents): Add support for or32.
9264 * config.bfd: Add target.
9265 * configure.in: Add support for or32.
9266 * configure: Regenerate.
9267 * Makefile.am: Add support for or32.
9268 * Makefile.in: Regenerate.
9269 * po/SRC-POTFILES.in: Add or32 files.
9270 * po/bfd.pot: Regenerate.
9271
9272 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9273 Don Lindsay <lindsayd@cisco.com>
9274
9275 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9276 false' with a return of a bfd_reloc_ error code.
9277
9278 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
9279
9280 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9281 unexport unreferenced symbols when --export-dynamic. Call
9282 _bfd_elf_strtab_delref when unexporting.
9283
9284 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
9285
9286 * bfd-in.h: Include <stdbool.h> if it is available.
9287 * bfd-in2.h: Regenerated.
9288
9289 2002-01-31 Alan Modra <amodra@bigpond.net.au>
9290
9291 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9292 not go via the plt.
9293
9294 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9295
9296 * archures.c: Tidy up formatting of embedded comments.
9297 * bfd.c: Tidy up formatting of embedded comments.
9298 * bfd-in.h: Fix formatting of comments.
9299 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9300 * section.c: Tidy up formatting of embedded comments.
9301 * syms.c: Tidy up formatting of embedded comments.
9302 * targets.c: Tidy up formatting of embedded comments.
9303
9304 * bfd-in2.h: Regenerate.
9305
9306 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9307
9308 * vms-tir.c (cmd_name): New function.
9309 (tir_cmd_name): New function.
9310 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9311 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9312 Fix formatting.
9313
9314 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9315 translation.
9316 (pe_print_pdata): Rearrange message to aid in translation.
9317
9318 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9319 translation.
9320
9321 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9322
9323 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9324
9325 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9326 message to aid in translation.
9327
9328 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9329 to aid in translation.
9330
9331 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9332
9333 2002-01-30 Philipp Thomas <pthomas@suse.de>
9334
9335 * coff-arm.c, elf32-elf.h: Unify messages.
9336
9337 2002-01-30 Nick Clifton <nickc@redhat.com>
9338
9339 * po/sv.po: Updated translation.
9340
9341 2002-01-30 Philipp Thomas <pthomas@suse.de>
9342
9343 * dwarf2.c (read_abbrev): Use full section name in error message.
9344 (decode_line_info): Likewise.
9345
9346 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9347 message.
9348
9349 2002-01-30 Alan Modra <amodra@bigpond.net.au>
9350
9351 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9352 descriptor symbols for undefined function code syms. Clear
9353 ELF_LINK_NON_ELF so that they can stay weak.
9354
9355 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9356 Mitch Lichtenberg <mpl@broadcom.com>
9357
9358 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9359 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9360 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9361 generation.
9362 * bfd-in2.h: Regenerate.
9363
9364 2002-01-29 Chris Demetriou <cgd@broadcom.com>
9365
9366 * elf32-mips.c: Add additional comments about HI16 relocation
9367 processing.
9368 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9369 pc-relative relocations. (Reverts change made on 2001-10-31.)
9370 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9371 for pc-relative relocations.
9372 (mips_elf_calculate_relocation): Add a comment about a kludge
9373 in the R_MIPS_GNU_REL_HI16 handling.
9374 (_bfd_mips_elf_relocate_section): Implement that kludge;
9375 adjust pc-relative HI16 relocation for difference in HI16 and
9376 LO16 addresses, since it can't easily be done in
9377 mips_elf_calculate_relocation.
9378
9379 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9380
9381 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9382 relocations with PC32 relocations for undefined or weak symbols.
9383 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9384 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9385
9386 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9387
9388 * elfcore.h (elf_core_file_p): Improve comment for last change.
9389
9390 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
9391
9392 * configure: Regenerated.
9393
9394 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9395
9396 * elfcore.h (elf_core_file_p): Set the machine architecture
9397 before processing the program headers.
9398
9399 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9400
9401 * configure.in <64-bit configuration>: If using gcc, check and
9402 emit error for egcs-1.1.2.
9403 * configure: Regenerate.
9404
9405 2002-01-26 Egor Duda <deo@logos-m.ru>
9406
9407 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9408 as possible to avoid stack corruption.
9409
9410 2002-01-26 Richard Henderson <rth@redhat.com>
9411
9412 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9413 for non-allocated sections.
9414
9415 2002-01-25 Mark Kettenis <kettenis@gnu.org>
9416
9417 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9418 prstat.pr_reg even if it is a struct.
9419
9420 2002-01-25 Steve Ellcey <sje@cup.hp.com>
9421
9422 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
9423
9424 2002-01-25 Philipp Thomas <pthomas@suse.de>
9425
9426 * coffgen.c (coff_print_symbol): Don't mark info message
9427 for translation.
9428
9429 2002-01-25 Nick Clifton <nickc@redhat.com>
9430
9431 * po/fr.po: Updated translation.
9432 * po/es.po: Updated translation.
9433
9434 2002-01-25 Philipp Thomas <pthomas@suse.de>
9435
9436 * coff-alpha.c (alpha_relocate_section): Unify warning message
9437 for GP relative relocations without GP defined.
9438 * coff-mips.c (mips_relocate_section): Likewise.
9439
9440 2002-01-25 Alan Modra <amodra@bigpond.net.au>
9441
9442 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9443 unsigned overflow when new_offset < old_offset.
9444
9445 2002-01-24 Philipp Thomas <pthomas@suse.de>
9446
9447 * bfd.c (_bfd_abort): Fix typo.
9448
9449 2002-01-23 Richard Henderson <rth@redhat.com>
9450
9451 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9452 plt entries for undefweak symbols.
9453
9454 2002-01-23 Steve Ellcey <sje@cup.hp.com>
9455
9456 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
9457 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9458 (bfd_elf32_h8300_vec): Ditto.
9459
9460 2002-01-23 Alan Modra <amodra@bigpond.net.au>
9461
9462 * elf64-ppc.c: Remove stale part of ABI comment.
9463 (NO_OPD_RELOCS): Define.
9464 (ppc64_elf_check_relocs): Use it.
9465 (ppc64_elf_relocate_section): Here too.
9466 (build_one_stub): Don't point function syms at the stub. Instead,
9467 hijack plt.offset.
9468 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9469 really go to the stub. Make all dynamic relocs in opd against
9470 locals.
9471 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9472 plt.offset.
9473
9474 2002-01-22 Richard Henderson <rth@redhat.com>
9475
9476 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9477
9478 2002-01-22 Alan Modra <amodra@bigpond.net.au>
9479
9480 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9481 TOC_BASE_OFF adjustment.
9482
9483 * Makefile.am: Run "make dep-am".
9484 * Makefile.in: Regenerate.
9485 * po/SRC-POTFILES.in: Regenerate.
9486
9487 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9488
9489 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9490 host defines.
9491
9492 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
9493
9494 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9495 Check for and emit error if sgot is NULL at this point.
9496
9497 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9498
9499 * config.bfd (ia64*-*-netbsd*): New target.
9500
9501 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9502
9503 * som.c (som_write_space_strings): Comment typo fix.
9504
9505 2002-01-21 Alan Modra <amodra@bigpond.net.au>
9506
9507 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9508 is_func_descriptor fields.
9509 (link_hash_newfunc): Init them.
9510 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9511 dot are candidates for plt entries. When processing .opd relocs,
9512 set function descriptor strings to point inside function code
9513 string, and set new ppc_link_hash_entry fields.
9514 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9515 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9516 function descriptors. It's now done in..
9517 (func_desc_adjust): New.
9518 (ppc64_elf_func_desc_adjust): New.
9519 (define elf_backend_always_size_sections): Define.
9520 (ppc64_elf_hide_symbol): New.
9521 (define elf_backend_hide_symbol): Define.
9522 (allocate_dynrelocs): Remove code looking up function descriptors
9523 as that has been done earlier.
9524 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9525 table.
9526 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9527 up function descriptor.
9528 (build_one_stub): Look up the function code sym. Check for
9529 invalid plt offsets.
9530 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9531 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9532
9533 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9534 boolean param.
9535 (_bfd_elf_link_hash_hide_symbol): Likewise.
9536 * elflink.h (elf_link_add_object_symbols): Adjust call to
9537 elf_backend_hide_symbol.
9538 (elf_fix_symbol_flags): Likewise.
9539 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9540 than bfd_alloc.
9541 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9542 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9543 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9544 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9545 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9546 and adjust to suit.
9547 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9548 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9549 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9550
9551 2002-01-18 Alan Modra <amodra@bigpond.net.au>
9552
9553 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9554 dynamic function descriptor symbol, not the associated function
9555 symbol.
9556
9557 2002-01-17 Eric Christopher <echristo@redhat.com>
9558
9559 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9560
9561 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9562
9563 * po/bfd.pot: Regenerate.
9564 * po/fr.po: Regenerate.
9565
9566 2002-01-17 Alan Modra <amodra@bigpond.net.au>
9567
9568 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9569 Remove "Elf_Internal_Shdr *" param.
9570 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9571 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9572 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9573 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9574 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9575 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9576 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9577 function to override special sections. Remove hdr arg from
9578 backend call, and don't loop.
9579
9580 2002-01-16 Eric Christopher <echristo@redhat.com>
9581
9582 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9583 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9584 relocations requiring gp0 and gp.
9585
9586 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
9587
9588 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
9589 EF_ARM_VFP_FLOAT.
9590 (elf32_arm_print_private_bfd_data): Likewise.
9591
9592 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9593
9594 * po/tr.po: Import new version.
9595
9596 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9597
9598 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9599 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9600 (ORI_R0_R0_0): Correct.
9601
9602 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9603
9604 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9605 when plt_not_loaded.
9606 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9607 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9608 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9609 (ppc64_elf_glink_code): Delete.
9610 (PPC64_ELF_GLINK_SIZE): Delete.
9611 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9612 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9613 ORI_R0_R0_0): Define.
9614 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9615 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9616 (ppc64_elf_link_hash_table_create): Init them.
9617 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9618 Don't copy to shared lib.
9619 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9620 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9621 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9622 room for .stub and .glink code.
9623 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9624 DT_PPC64_GLINK.
9625 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9626 bfd_elf64_bfd_final_link.
9627 (bfd_elf64_bfd_final_link): Don't define.
9628 (ppc64_elf_size_stubs): New.
9629 (build_plt_stub): New.
9630 (build_one_stub): New.
9631 (ppc64_elf_build_stubs): New.
9632 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9633 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9634 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9635 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9636 case output sections not separate. Adjust DT_RELASZ to not
9637 include plt relocs. Set reserved got entry. Set got and plt
9638 entry size.
9639 (elf_backend_got_header_size): Set to 8.
9640 * elf64-ppc.h: New file.
9641
9642 2002-01-16 Alan Modra <amodra@bigpond.net.au>
9643
9644 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9645 sections, use bfd_section_list_remove.
9646 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9647 * elflink.h (elf_link_add_object_symbols): When removing all
9648 sections, use bfd_section_list_clear.
9649
9650 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9651
9652 * po/sv.po: New file: Swedish translation.
9653 * configure.in (ALL_LINGUAS): Add sv.
9654 * configure: Regenerate.
9655
9656 2002-01-15 Jakub Jelinek <jakub@redhat.com>
9657
9658 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9659 * elf.c (merge_sections_remove_hook): New function.
9660 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9661 _bfd_merge_sections.
9662 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9663 * libbfd.h: Rebuilt.
9664 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9665 Call remove_hook if a SEC_EXCLUDE section is encountered.
9666
9667 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9668
9669 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9670 (xstormy16_reloc_map): Initialise new field with correct howto
9671 table.
9672 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9673 howto entry.
9674
9675 2002-01-10 Michael Snyder <msnyder@redhat.com>
9676
9677 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9678 (elfcore_write_pstatus): Use long instead of pid_t;
9679 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9680
9681 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
9682
9683 * elf.c: Update copyright years.
9684 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9685 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9686
9687 2002-01-08 Michael Snyder <msnyder@redhat.com>
9688
9689 Add capability to write corefile note sections, for gdb.
9690 * elf.c (elfcore_write_note): New function.
9691 (elfcore_write_prpsinfo): New function.
9692 (elfcore_write_prstatus): New function.
9693 (elfcore_write_pstatus): New function.
9694 (elfcore_write_prfpreg): New function.
9695 (elfcore_write_prxfpreg): New function.
9696 * elf-bfd.h: Add prototypes for above functions.
9697
9698 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
9699
9700 * elf.c (elf_fake_sections): Propagate errors from
9701 elf_backend_fake_section.
9702
9703 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9704
9705 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9706 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9707 (elf32-sh-nbsd.lo): New rule.
9708 * Makefile.in: Regenerate.
9709 * config.bfd (sh*le-*-netbsdelf*): New target.
9710 (sh*-*-netbsdelf*): New target.
9711 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9712 (bfd_elf32_shnbsd_vec): New vector.
9713 (bfd_elf32_shlnbsd_vec): New vector.
9714 * configure: Regenerate.
9715 * elf32-sh-nbsd.c: New file.
9716 * targets.c: Update copyright years.
9717 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
9718 bfd_elf32_shnbsd_vec.
9719
9720 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
9721
9722 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9723
9724 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
9725
9726 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9727 of a symbol in a section that will be deleted.
9728
9729 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9730
9731 * po/es.po: New file: Spanish translation.
9732 * configure.in (ALL_LINGUAS): Add es.
9733 * configure: Regenerate.
9734
9735 2002-01-06 Steve Ellcey <sje@cup.hp.com>
9736
9737 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9738 argument so we can handle HP-UX specially.
9739 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9740 (elfNN_hpux_backend_section_from_bfd_section): New for support
9741 of SHN_IA_64_ANSI_COMMON.
9742 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9743 (is_unwind_section_name): Add special HP-UX support.
9744 (elfNN_ia64_section_from_shdr): Add support for more sections.
9745 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9746 add support for more sections.
9747 (elfNN_ia64_additional_program_headers): Modify
9748 is_unwind_section_name call.
9749 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9750 only one unwind section in segment.
9751
9752 2002-01-06 Alan Modra <amodra@bigpond.net.au>
9753
9754 * syms.c (_bfd_generic_make_empty_symbol): New function.
9755 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9756 _bfd_generic_make_empty_symbol.
9757 * libbfd.h: Regenerate.
9758 * bfd-in2.h: Regenerate.
9759 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9760 (hppabsd_core_get_symtab_upper_bound): Don't define.
9761 (hppabsd_core_get_symtab): Likewise.
9762 (hppabsd_core_print_symbol): Likewise.
9763 (hppabsd_core_get_symbol_info): Likewise.
9764 (hppabsd_core_bfd_is_local_label_name): Likewise.
9765 (hppabsd_core_get_lineno): Likewise.
9766 (hppabsd_core_find_nearest_line): Likewise.
9767 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9768 (hppabsd_core_read_minisymbols): Likewise.
9769 (hppabsd_core_minisymbol_to_symbol): Likewise.
9770 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9771 Formatting fixes.
9772 * hpux-core.c: Similarly.
9773 * irix-core.c: Similarly.
9774 * osf-core.c: Similarly.
9775 * sco5-core.c: Similarly.
9776 * binary.c (binary_make_empty_symbol): Remove function, define as
9777 _bfd_generic_make_empty_symbol.
9778 * ihex.c (ihex_make_empty_symbol): Likewise.
9779 * mmo.c (mmo_make_empty_symbol): Likewise.
9780 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9781 * srec.c (srec_make_empty_symbol): Likewise.
9782 * versados.c (versados_make_empty_symbol): Likewise.
9783 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9784 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9785 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9786 rather than _bfd_vms_make_empty_symbol.
9787 * vms-misc.c (new_symbol): Likewise.
9788
9789 2002-01-05 Alan Modra <amodra@bigpond.net.au>
9790
9791 * section.c (bfd_section_init): Remove unnecessary initialisations.
9792 (bfd_section_list_clear): New function.
9793 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9794 (_bfd_strip_section_from_output): Use them.
9795 * coffcode.h (coff_set_alignment_hook): Likewise.
9796 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9797 * elf64-mips.c (mips_elf64_final_link): Likewise.
9798 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9799 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9800 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9801 * bfd-in2.h: Regenerate.
9802
9803 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9804 rather than doing our own section handling. Clean up after errors
9805 with bfd_release and bfd_section_list_clear. Handle unexpected
9806 flags.
9807 * aoutf1.h (sunos4_core_file_p): Likewise.
9808 * aix386-core.c (aix386_core_file_p): Likewise.
9809 * cisco-core.c (cisco_core_file_validate): Likewise.
9810 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9811 * trad-core.c (trad_unix_core_file_p): Likewise.
9812
9813 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9814 with bfd_release and bfd_section_list_clear.
9815 * hpux-core.c (hpux_core_core_file_p): Likewise.
9816 * irix-core.c (irix_core_core_file_p): Likewise.
9817 * lynx-core.c (lynx_core_file_p): Likewise.
9818 * osf-core.c (osf_core_core_file_p): Likewise.
9819 * rs6000-core.c (rs6000coff_core_p): Likewise.
9820 * sco5-core.c (sco5_core_file_p): Likewise.
9821
9822 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9823 sign extension adjustments without conditionals.
9824
9825 2002-01-04 Jakub Jelinek <jakub@redhat.com>
9826
9827 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9828 CIE at .eh_frame start is removed due to no FDEs referencing it.
9829
9830 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9831
9832 * config.bfd (x86_64-*-netbsd*): New target.
9833 * configure.in (x86_64-*-netbsd*): Set COREFILE
9834 to netbsd-core.lo.
9835 * configure: Regenerated.
9836
9837 2002-01-03 Tom Rix <trix@redhat.com>
9838
9839 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9840 for recent bfd_make_section_anyway change.
9841
9842 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9843
9844 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9845 R_ARM_THM_PC11 reloc.
9846
9847 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9848
9849 * configure.in (LINGUAS): Add ja.
9850 * configure: Regenerate.
9851 * po/ja.po: Import from translation project's web site.
9852
9853 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9854
9855 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9856 messages to ease translation into other languages.
9857
9858 For older changes see ChangeLog-0001
9859 \f
9860 Local Variables:
9861 mode: change-log
9862 left-margin: 8
9863 fill-column: 74
9864 version-control: never
9865 End:
This page took 0.216441 seconds and 3 git commands to generate.