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