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