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