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