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