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