* elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
[binutils-gdb.git] / bfd / ChangeLog
1 2002-04-03 Jakub Jelinek <jakub@redhat.com>
2
3 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
4 PC relative relocs against hidden symbols.
5 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6
7 2002-04-03 Alan Modra <amodra@bigpond.net.au>
8
9 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
10 LMAs, loop over segments until p_vaddr and p_memsz specify an
11 extent enclosing the section.
12
13 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
14
15 * ihex.c (ihex_write_object_contents): Do not allow records to
16 cross a 64K boundary - wrap if necessary.
17
18 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
19
20 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
21 which caused the returned LWP ID to always be 0.
22
23 2002-04-01 Richard Henderson <rth@redhat.com>
24
25 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
26 (elf32_sparc_relocate_section): Use it to figure out when to
27 initialize .got entries.
28 * elf64-sparc.c: Similarly.
29
30 2002-03-28 Alan Modra <amodra@bigpond.net.au>
31
32 * linker.c (link_action): Ignore duplicate warning syms.
33 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
34 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
35 (elf_adjust_dynamic_symbol): Likewise.
36 (elf_export_symbol): Likewise.
37 (elf_link_find_version_dependencies): Likewise.
38 (elf_link_assign_sym_version): Likewise.
39 (elf_link_sec_merge_syms): Likewise.
40 (elf_link_output_extsym): Likewise.
41 (elf_gc_sweep_symbol): Likewise.
42 (elf_gc_propagate_vtable_entries_used): Likewise.
43 (elf_gc_smash_unused_vtentry_relocs): Likewise.
44 (elf_gc_allocate_got_offsets): Likewise.
45 (elf_collect_hash_codes): Likewise.
46 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
47 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
48 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
49 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
50 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
51 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
52 (elf_cris_discard_excess_dso_dynamics): Likewise.
53 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
54 (mark_PIC_calls): Likewise.
55 (allocate_plt_static): Likewise.
56 (allocate_dynrelocs): Likewise.
57 (readonly_dynrelocs): Likewise.
58 * elf32-i386.c (allocate_dynrelocs): Likewise.
59 (readonly_dynrelocs): Likewise.
60 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
61 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
62 * elf32-mips.c (mips_elf_output_extsym): Likewise.
63 (mips_elf_sort_hash_table_f): Likewise.
64 (mips_elf_check_mips16_stubs): Likewise.
65 * elf32-s390.c (allocate_dynrelocs): Likewise.
66 (readonly_dynrelocs): Likewise.
67 * elf32-sh.c (sh_elf_discard_copies): Likewise.
68 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
69 (xstormy16_relax_plt_realloc): Likewise.
70 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
71 (elf64_alpha_output_extsym): Likewise.
72 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
73 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
74 (mips_elf64_check_mips16_stubs): Likewise.
75 (mips_elf64_output_extsym): Likewise.
76 * elf64-ppc.c (func_desc_adjust): Likewise.
77 (allocate_dynrelocs): Likewise.
78 (readonly_dynrelocs): Likewise.
79 * elf64-s390.c (allocate_dynrelocs): Likewise.
80 (readonly_dynrelocs): Likewise.
81 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
82 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
83 (readonly_dynrelocs): Likewise.
84 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
85 * aoutx.h (aout_link_write_other_symbol): Likewise.
86 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
87 (_bfd_coff_write_global_sym): Likewise.
88 * i386linux.c (linux_tally_symbols): Likewise.
89 * m68klinux.c (linux_tally_symbols): Likewise.
90 * sparclinux.c (linux_tally_symbols): Likewise.
91 * pdp11.c (aout_link_write_other_symbol): Likewise.
92 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
93 * xcofflink.c (xcoff_build_ldsyms): Likewise.
94 (xcoff_write_global_symbol): Likewise.
95
96 * cofflink.c (_bfd_coff_final_link): Formatting.
97 * cpu-mips.c (mips_compatible): Make static, prototype.
98 * elf32-i386.c (elf_i386_check_relocs): Formatting.
99 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
100 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
101 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
102 (mips_elf64_final_link): Likewise.
103 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
104 prototype.
105
106 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
107
108 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
109 (SWAP_OUT_RELOC_OFFSET): Define.
110
111 2002-03-27 Gregory Steuck <greg@nest.cx>
112
113 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
114 terminating NULL if empty symbol table.
115 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
116
117 2002-03-26 H.J. Lu (hjl@gnu.org)
118
119 * elflink.h (elf_link_input_bfd): Revert the last change since
120 the gcc exception handling isn't fixed yet.
121
122 2002-03-26 H.J. Lu (hjl@gnu.org)
123
124 * elflink.h (elf_link_input_bfd): Complain about relocations
125 against local symbols in discarded sections.
126
127 2002-03-26 Alan Modra <amodra@bigpond.net.au>
128
129 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
130
131 2002-03-23 Alan Modra <amodra@bigpond.net.au>
132
133 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
134 section file offset for !SEC_LOAD sections.
135
136 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
137
138 * elf32-arm.h (elf32_arm_final_link_relocate case R_ARM_GOTOFF)
139 (case R_ARM_GOT): Handle relocations to Thumb functions.
140
141 2002-03-21 Alan Modra <amodra@bigpond.net.au>
142
143 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
144 Whitespace changes.
145 * archive.c: Update copyright date.
146 * bfd-in2.h: Regenerate.
147 * libbfd.h: Regenerate.
148 * Makefile.am: Run "make dep-am"
149 * Makefile.in: Regenerate.
150 * po/SRC-POTFILES.in: Regenerate.
151
152 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
153
154 * dwarf2.c (struct funcinfo): Move up.
155 (lookup_address_in_function_table): New argument function_ptr.
156 Set it.
157 (lookup_address_in_line_table): New argument function. If function
158 is non-NULL, use it to handle ``addr'' before the first line note of
159 the function.
160 (comp_unit_find_nearest_line): Update and swap calls to
161 lookup_address_in_function_table and lookup_address_in_line_table.
162 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
163 N_SLINE encountered if we see an N_FUN before any N_SLINE.
164
165 2002-03-20 Tom Rix <trix@redhat.com>
166
167 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
168 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
169 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
170
171 2002-03-19 Tom Rix <trix@redhat.com>
172
173 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
174 dynamic objects in archives.
175
176 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
177
178 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
179 STT_NOTYPE symbols to STT_OBJECT.
180
181 Mon Mar 18 17:38:03 CET 2002 Jan Hubicka <jh@suse.cz>
182
183 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
184
185 2002-03-18 Tom Rix <trix@redhat.com>
186
187 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
188 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
189 * coff-rs6000 (do_pad) : New function for archive padding.
190 (do_copy) : New function for object file copying in archives.
191 (do_shared_object_padding) : New function for padding shared
192 objects to their text section alignment in archives.
193 (bfd_xcoff_ar_achive_set_magic) : Stub.
194 (xcoff_write_armap_big) : Use do_copy and do_pad.
195 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
196 do_copy and do_pad.
197 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
198 bfd_xcoff_magic_number.
199 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
200 fop.
201 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
202 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
203 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
204 * rs6000-core.c : Update copyright date.
205 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
206 csectpp.
207 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
208 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
209 (coff_set_flags) : Use bfd_xcoff_magic_number.
210 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
211 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
212 * Makefile.am : Same.
213 * config.bfd : Same.
214 * targets.c : Same.
215 * configure : Regnerate.
216 * Makefile.in : Same.
217 * bfd-in2.h : Same.
218
219 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
220
221 * po/fr.po: Updated version.
222
223 2002-03-18 Alan Modra <amodra@bigpond.net.au>
224
225 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
226 * libbfd.h: Regenerate.
227 * archive.c (coff_write_armap): Pass on failures from
228 bfd_write_bigendian_4byte_int.
229
230 2002-03-14 H.J. Lu <hjl@gnu.org>
231
232 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
233 error to bfd_error_nonrepresentable_section for reinit_array
234 section in DSO.
235
236 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
237
238 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
239 OR it in rather than replacing previously selected flags.
240
241 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
242 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
243
244 2002-03-14 Alan Modra <amodra@bigpond.net.au>
245
246 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
247 (N): Use the above.
248 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
249 ensure reloc size matches before calling elf_link_input_bfd.
250 Add an assert to check reloc size when counting output relocs.
251
252 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
253
254 * mmo.c (mmo_get_loc): Return NULL rather than false.
255
256 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
257
258 * po/fr.po: Updated version.
259
260 2002-03-13 Alan Modra <amodra@bigpond.net.au>
261
262 * archures.c (bfd_default_compatible): Test bits_per_word.
263 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
264 bfd_default_compatible.
265 * cpu-i370.c (i370_compatible): Likewise.
266 * cpu-sparc.c (sparc_compatible): Likewise.
267 * cpu-h8300.c (compatible): Test in->arch == out->arch.
268
269 * elflink.h: Formatting fixes.
270 (elf_link_output_extsym): Merge undefined and undef weak cases.
271
272 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
273 when word size of input matches output word size.
274
275 2002-03-12 Andreas Jaeger <aj@suse.de>
276
277 * cpu-i386.c (i386_compatible): New. Use it instead of
278 bfd_default_compatible.
279
280 2002-03-07 H.J. Lu (hjl@gnu.org)
281
282 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
283 as the type for bfd_reloc_val.
284
285 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
286
287 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
288 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
289 (elf_hppa_final_link_relocate): Correct relocations for indirect
290 references to local data through the DLT. Fix .opd creation for
291 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
292 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
293 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
294 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
295 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
296 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
297 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
298
299 2002-03-05 Jakub Jelinek <jakub@redhat.com>
300
301 * merge.c (_bfd_merge_sections): Don't segfault if there
302 is nothing to merge due to GC.
303
304 2002-03-05 Alan Modra <amodra@bigpond.net.au>
305
306 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
307 symbols that have been forced local.
308
309 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
310 to output forced local syms for non-shared link.
311 (elf_link_output_extsym): Tweak condition for calling backend
312 adjust_dynamic_symbol so that previous behaviour is kept.
313 Whitespace changes throughout file.
314
315 2002-03-04 H.J. Lu <hjl@gnu.org>
316
317 * elf.c (bfd_section_from_shdr): Handle special sections,
318 .init_array, .fini_array and .preinit_array.
319 (elf_fake_sections): Likewise.
320
321 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
322 DT entry only if the section is in output for .init_array,
323 .fini_array and .preinit_array. Complain about .preinit_array
324 section in DSO.
325 (elf_bfd_final_link): Warn zero size for .init_array,
326 .fini_array and .preinit_array sections.
327
328 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
329 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
330 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
331 .preinit_array.
332
333 2002-03-04 Alan Modra <amodra@bigpond.net.au>
334
335 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
336 * configure: Regenerate.
337
338 2002-03-02 Tom Rix <trix@redhat.com>
339
340 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
341 symbolic equiv.
342 * coff-rs6000.c (xcoff_howto_table): Same.
343
344 2002-03-01 David Mosberger <davidm@hpl.hp.com>
345
346 * elflink.h (size_dynamic_sections): If section named
347 ".preinit_array" exists, create DT_PREINIT_ARRAY and
348 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
349 ".init_array" and ".fini_array".
350 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
351 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
352 DT_FINI_ARRAY.
353
354 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
355
356 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
357 dynsyms.
358
359 2002-02-25 Alan Modra <amodra@bigpond.net.au>
360
361 * elf64-hppa.h: Update copyright date.
362
363 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
364 (ppc64_elf_relocate_section): Don't generate power4 style branch
365 hints for *_BRTAKEN and *_BRNTAKEN relocs.
366
367 2002-02-22 Jakub Jelinek <jakub@redhat.com>
368
369 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
370 last patch.
371 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
372
373 2002-02-21 Andreas Jaeger <aj@suse.de>
374
375 * elf64-x86-64.c: Major rework that introduces all recent changes
376 to the x86-64 backend. Get a closer match to elf32-i386.
377 (struct elf64_x86_64_dyn_relocs): Rename from
378 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
379 all users.
380 (struct elf64_x86_64_link_hash_table): Add short cuts to some
381 sections.
382 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
383 remove casts, initialize new hash members.
384 (create_got_section): New.
385 (elf64_x86_64_create_dynamic_sections): New.
386 (elf64_x86_64_copy_indirect_symbol): New.
387 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
388 relocs, .got or .relgot here but do it in allocate_dynrelocs.
389 Reference count possible .plt and .got entries. Don't test input
390 section SEC_READONLY here to try to avoid copy relocs, and keep
391 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
392 DF_TEXTREL here. Delay setting of variables until needed. Cache
393 pointer to "sreloc" section in elf_section_data. Tweak condition
394 under which .got created. Report files with bad relocation
395 section names.
396 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
397 Reference count possible .plt entries. Don't deallocate .got and
398 .relgot space here.
399 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
400 do copy reloc processing for weakdefs. Remove redundant casts and
401 aborts. Delay setting of vars until needed. Move creation of
402 dynamic symbols and allocation of .plt and .rela.plt to
403 allocate_dynrelocs. Replace BFD_ASSERT with abort.
404 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
405 (allocate_dynrelocs): New.
406 (readonly_dynrelocs): New.
407 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
408 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
409 Zero out the dynamic allocated content space.
410 (elf64_x86_64_discard_copies): Removed.
411 (elf64_x86_64_relocate_section): Make use of dynamic section
412 short-cuts. Localise vars, and delay setting. Better error
413 reporting, replace BFD_ASSERT with abort. Check
414 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
415 regular object file and tread the weak definition as the normal
416 one. Don't discard relocs for undefweak or undefined symbols and
417 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
418 relocs.
419 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
420 symbols that have been forced local. Use same test to decide if
421 we can use a relative reloc for got as relocate_section. Expand
422 SHN_UNDEF comment. Move expressions out of function calls.
423 Replace BFD_ASSERT with abort.
424 (bfd_elf64_bfd_final_link): Removed.
425 (elf_backend_copy_indirect_symbol): Define.
426
427 2002-02-20 Tom Rix <trix@redhat.com>
428
429 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
430 (_bfd_xcoff_reloc_type_lookup): Use it.
431 * coff64-rs6000.c (xcoff64_howto_table): Same.
432 (xcoff64_reloc_type_lookup): Same.
433
434 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
435
436 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
437 little endian.
438
439 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
440
441 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
442 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
443 * bfd-in2.h: Regenerate.
444 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
445 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
446 with "s390:64-bit".
447 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
448 (elf_s390_reloc_type_lookup): Likewise.
449 (elf_s390_check_relocs): Likewise.
450 (elf_s390_gc_sweep_hook): Likewise.
451 (elf_s390_relocate_section): Likewise.
452 (elf_s390_object_p): Use renamed architecture define.
453 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
454
455 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
456
457 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
458
459 2002-02-19 Jakub Jelinek <jakub@redhat.com>
460
461 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
462 absptr -> pcrel optimization for shared libs.
463 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
464 library cannot be converted to pcrel.
465 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
466 relative.
467 * elf32-i386.c (elf_i386_relocate_section): If
468 _bfd_elf_section_offset returned -2, skip, but make sure the
469 relocation is installed.
470 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
471 * elf32-cris.c (cris_elf_relocate_section): Likewise.
472 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
473 * elf32-i370.c (i370_elf_relocate_section): Likewise.
474 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
475 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
476 * elf32-s390.c (elf_s390_relocate_section): Likewise.
477 * elf32-sh.c (sh_elf_relocate_section): Likewise.
478 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
479 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
480 * elf64-s390.c (elf_s390_relocate_section): Likewise.
481 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
482 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
483 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
484 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
485 _bfd_elf_section_offset returning -2 the same way as -1.
486 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
487 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
488 and BFD_ASSERT.
489 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
490
491 2002-02-18 Tom Rix <trix@redhat.com>
492
493 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
494 (bfd_xcoff_size_dynamic_sections): Same.
495 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
496 (bfd_xcoff_size_dynamic_sections): Same.
497 * coff-rs6000.c (xcoff_generate_rtinit): Same.
498 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
499 * libxcoff.h (struct xcoff_backend_data_rec): Same.
500 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
501 * bfd-in2.h: Regenerate.
502
503 2002-02-18 Alan Modra <amodra@bigpond.net.au>
504
505 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
506 (struct ppc_link_hash_table): Add sfpr.
507 (ppc64_elf_link_hash_table_create): Init it.
508 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
509 .glink out to..
510 (create_linkage_sections): ..here. Make .sfpr too.
511 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
512 dynobj early.
513 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
514 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
515 ._restf* functions, and create as needed.
516 (func_desc_adjust): Only force_local for shared libs.
517
518 2002-02-18 David O'Brien <obrien@FreeBSD.org>
519
520 * configure.in: Bump version number post 2.12 branching.
521 * configure: Regenerate.
522
523 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
524
525 * mmo.c: Correct and improve comments.
526 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
527 zero-pad. Use input to fill up non-empty bfd buffer.
528 (mmo_flush_chunk): New function.
529 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
530 changed. Don't emit location specifier if VMA is same as
531 *LAST_VMAP after omitting leading zero contents. Call
532 mmo_flush_chunk before emitting location specifier.
533 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
534 with mmo_write_loc_chunk calls.
535 (mmo_internal_write_section): Call mmo_flush_chunk after
536 mmo_write_chunk.
537 (mmo_write_symbols_and_terminator): Move :Main to first position
538 in symbol array. Add faked one if it does not exist if there are
539 other symbols. Don't add it if there are no symbols at all. Move
540 out test for value of :Main from symbol loop. Rename table
541 fakemain to maintable and variable mainsym to fakemain.
542
543 2002-02-15 Richard Henderson <rth@redhat.com>
544
545 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
546 section with no got matches any got. Simplify error generaion.
547
548 2002-02-15 Alan Modra <amodra@bigpond.net.au>
549
550 Support arbitrary length fill patterns.
551 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
552 (_bfd_default_link_order): Remove bfd_fill_link_order code.
553 Call default_data_link_order.
554 (default_fill_link_order): Delete.
555 (default_data_link_order): New function.
556 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
557 of bfd_fill_link_order with bfd_data_link_order.
558 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
559 * elf64-mips.c (mips_elf64_final_link): Likewise.
560
561 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
562 Correct value returned in "end" for "0x<non-hex>".
563
564 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
565
566 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
567 (scan): Test against 'mach' field in info structure.
568
569 2002-02-14 Alan Modra <amodra@bigpond.net.au>
570
571 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
572
573 2002-02-14 Matt Fredette <fredette@netbsd.org>
574
575 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
576 EF_M68000.
577
578 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
579
580 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
581 non-zero physical addresses when adjusting the LMAs of new
582 sections.
583
584 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
585
586 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
587 from _bfd_elf_hppa_gen_reloc_type.
588 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
589 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
590 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
591 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
592
593 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
594
595 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
596 loading its contents if there's nothing to do in it.
597
598 2002-02-12 Alan Modra <amodra@bigpond.net.au>
599
600 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
601 64k boundary.
602
603 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
604 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
605 (ppc64_elf_finish_dynamic_sections): Set values for them.
606
607 2002-02-11 Michael Snyder <msnyder@redhat.com>
608
609 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
610 * elf.c (elfcore_grok_pstatus): Add prototype.
611 (elfcore_grok_lwpstatus): Add prototype.
612 (elfcore_write_lwpstatus): New function.
613 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
614
615 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
616
617 * elf32-sh.c: Added missing prototypes.
618 * elf32-sh64.c: Likewise.
619 (sh_elf_align_loads): Mark unused args as such.
620 * elf64-sh64.c: Added missing prototypes.
621 (struct elf_sh64_link_hash_entry): Fix typo.
622 (sh_elf64_relocate_section): Fix info argument passed to
623 _bfd_elf_section_offset.
624
625 2002-02-11 Alan Modra <amodra@bigpond.net.au>
626
627 * Makefile.am: "make dep-am".
628 * Makefile.in: Regenerate.
629 * aclocal.m4: Regenerate.
630 * config.in: Regenerate.
631 * configure: Regenerate.
632
633 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
634
635 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
636 variable warnings.
637 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
638 comparison warning.
639 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
640 cast warnings for the common case.
641
642 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
643
644 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
645 vectors.
646 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
647 vectors.
648
649 2002-02-09 Richard Henderson <rth@redhat.com>
650
651 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
652 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
653 (elf64_alpha_relocate_section): Likewise.
654 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
655 * bfd-in2.h, libbfd.h: Rebuild.
656
657 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
658
659 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
660 that base-plus-offset reloc accounting is consistent.
661 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
662 up to date for undefined symbols.
663
664 2002-02-08 Eric Christopher <echristo@redhat.com>
665
666 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
667
668 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
669 sections for the O32 ABI.
670
671 2002-02-08 Chris Demetriou <cgd@broadcom.com>
672
673 * elf32-arm.h: Fix formatting of _("...").
674 * elf32-d10v.c: Likewise.
675 * elf32-m68k.c: Likewise.
676 * elf32-mips.c: Likewise.
677
678 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
679
680 * coff-or32.c: Fix compile time warning messages.
681
682 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
683
684 Contribute sh64-elf.
685 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
686 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
687 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
688 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
689 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
690 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
691 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
692 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
693 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
694 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
695 New relocs.
696 * libbfd.h, bfd-in2.h: Rebuilt.
697 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
698 (sh_reloc_map): Map them.
699 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
700 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
701 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
702 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
703 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
704 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
705 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
706 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
707 datalabel_got_offset.
708 (sh_elf_link_hash_newfunc): Initialize it.
709 (sh_elf_relocate_section): Augment the scope of
710 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
711 GOT and GOTOFF handling to new SHmedia relocation types. Support
712 GOT_BIAS.
713 (sh_elf_check_relocs): Likewise.
714 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
715 PLT entries using movi_shori_putval. Support GOT_BIAS.
716 (sh_elf_finish_dynamic_sections): Likewise.
717 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
718 relocation, it's now done by the caller.
719 (GOT_BIAS): New.
720 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
721 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
722 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
723 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
724 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
725 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
726 sh64_elf64_hash_table): New.
727 (sh_elf64_howto_table): Introduce new relocs.
728 (sh_elf64_info_to_howto): Accept new PIC relocs.
729 (sh_elf64_relocate_section): Augment the scope of
730 seen_stt_datalabel. Support new PIC relocs.
731 (sh_elf64_check_relocs): Support new PIC relocs.
732 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
733 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
734 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
735 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
736 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
737 movi_shori_putval, movi_3shori_putval,
738 sh64_elf64_create_dynamic_sections,
739 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
740 sh64_elf64_size_dynamic_sections,
741 sh64_elf64_finish_dynamic_symbol,
742 sh64_elf64_finish_dynamic_sections): New.
743 (elf_backend_create_dynamic-sections,
744 bfd_elf64_bfd_link_hash_table_create,
745 elf_backend_adjust_dynamic_symbol,
746 elf_backend_size_dynamic_sections,
747 elf_backend_finish_dynamic_symbol,
748 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
749 elf_backend_plt_readonly, elf_backend_want_plt_sym,
750 elf_backend_got_header_size, elf_backend_plt_header_size):
751 Define.
752 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
753 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
754 match official numbers and names; moved unmaching ones to the
755 range 0xf2-0xff.
756 * elf32-sh64.c, elf64-sh64.c: Likewise.
757 2001-03-12 DJ Delorie <dj@redhat.com>
758 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
759 sections.
760 2001-03-12 DJ Delorie <dj@redhat.com>
761 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
762 be aligned.
763 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
764 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
765 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
766 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
767 .cranges section with SEC_SORT_ENTRIES set.
768 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
769 incoming sorted .cranges section.
770 (sh64_bfd_elf_copy_private_section_data): New.
771 (sh64_elf_final_write_processing): Only sort .cranges and modify
772 start address if called by linker.
773 2001-01-08 Ben Elliston <bje@redhat.com>
774 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
775 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
776 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
777 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
778 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
779 line. Add comments before all entries.
780 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
781 comment.
782 (sh_elf64_reloc): Correct head comment.
783 (sh_elf64_relocate_section): Correct spacing.
784 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
785 instead call reloc_dangerous callback.
786 <case R_SH_SHMEDIA_CODE>: New case.
787 (sh_elf64_gc_mark_hook): Correct spacing.
788 (sh_elf64_check_relocs): Ditto.
789 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
790 New case.
791 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
792 functions.
793 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
794 clarify describing comment. Add comments before all entries.
795 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
796 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
797 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
798 Sort .cranges section in final link. Prepare to set bit 0 on
799 entry address.
800 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
801 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
802 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
803 .cranges section.
804 (sh64_backend_section_from_shdr): New, to recognize
805 SHT_SH5_CR_SORTED on incoming .cranges section.
806 (elf_backend_section_from_shdr): Define.
807 (sh64_elf_final_write_processing): Sort outgoing .cranges
808 section. (New, temporarily disabled:) Set bit 0 on entry address
809 according to ISA type.
810 (sh64_find_section_for_address): New.
811 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
812 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
813 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
814 bfd_malloc, not xmalloc.
815 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
816 global.
817 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
818 temporarily disabled) setting bit 0 on entry address.
819 (elf_backend_final_write_processing): Define.
820 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
821 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
822 be a proper relocation for PTA and PTB rather than a marker.
823 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
824 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
825 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
826 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
827 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
828 Zero src_mask.
829 * elf64-sh64.c: Ditto.
830 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
831 * elf32-sh64.c: Include opcodes/sh64-opc.h
832 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
833 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
834 parameters. No unused parameters. Caller changed.
835 <case R_SH_PT_16>: New case.
836 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
837 * Makefile.in: Regenerate.
838 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
839 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
840 all code sections.
841 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
842 (sh64_elf_merge_private_data): Ditto.
843 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
844 to access stored section flags.
845 (sh64_elf_final_write_processing): Return immediately unless
846 called by linker. Use sh64_elf_section_data (cranges) to get size
847 of linker-generated cranges entries.
848 (sh64_elf_copy_private_data): Add missing "return true".
849 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
850 (sh_elf64_merge_private_data): Ditto.
851 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
852 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
853 elf64-sh64.c:sh64_elf_fake_sections.
854 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
855 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
856 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
857 (sh64_elf_final_write_processing): New.
858 (elf_backend_final_write_processing): Define.
859 (sh64_elf_fake_sections): Get header flags from tdata field.
860 (sh64_elf_copy_private_data): Do not call
861 sh64_elf_copy_private_data_internal, just copy e_flags field.
862 (sh64_elf_merge_private_data): Do not call
863 sh64_elf_copy_private_data_internal.
864 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
865 Remove EF_SH64_ABI64, let ELF size make difference.
866 Remove SH64-specific BFD section flag.
867 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
868 containing SHmedia through elf_section_data (asect)->tdata
869 non-zero, not using a BFD section flag.
870 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
871 (sh64_elf_merge_private_data): Similar.
872 (elf_backend_section_flags): Don't define.
873 (sh64_elf_backend_section_flags): Delete.
874 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
875 not EF_SH64_ABI64.
876 (sh_elf64_merge_private_data): Similar.
877 * section.c (Section flags definitions): Don't define
878 SEC_SH_ISA_SHMEDIA.
879 (bfd-in2.h): Regenerate.
880 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
881 Make DataLabel references work with partial linking.
882 * elf32-sh64.c: Fix formatting.
883 (sh64_elf_link_output_symbol_hook): New.
884 (elf_backend_link_output_symbol_hook): Define to
885 sh64_elf_link_output_symbol_hook.
886 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
887 undefined if partial linking. Adjust sanity check.
888 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
889 (elf_backend_link_output_symbol_hook): Define to
890 sh64_elf64_link_output_symbol_hook.
891 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
892 undefined if partial linking. Adjust sanity check.
893 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
894 Implement semantics for inter-file DataLabel references.
895 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
896 (sh64_elf64_add_symbol_hook): New.
897 (sh_elf64_relocate_section): If passing an indirect symbol with
898 st_type STT_DATALABEL on the way to a symbol with st_other
899 STO_SH5_ISA32, do not bitor 1 to the relocation.
900 (elf_backend_add_symbol_hook): Define to
901 sh64_elf64_add_symbol_hook.
902 * elf64-sh32.c: Tweak comments.
903 (DATALABEL_SUFFIX): Define.
904 (sh64_elf_add_symbol_hook): New.
905 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
906 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
907 symbol with st_type STT_DATALABEL on the way to a symbol with
908 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
909 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
910 Pass through STT_DATALABEL.
911 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
912 (elf_backend_get_symbol_type): Define.
913 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
914 (elf_backend_get_symbol_type): Define.
915 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
916 * elf32-sh64.c: Tweak comments.
917 (sh64_elf_copy_private_data_internal): Add prototype.
918 (bfd_elf32_bfd_set_private_flags): Define.
919 (sh64_elf_copy_private_data_internal): Compare machine name, not
920 textual BFD target name, to check whether to copy section flag
921 SHF_SH5_ISA32.
922 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
923 Tweak section-contents-type-mismatch message.
924 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
925 Validize reloc-types.
926 * elf64-sh64.c: New file.
927 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
928 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
929 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
930 Regenerate dependencies.
931 * Makefile.in: Regenerate.
932 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
933 bfd_elf64_sh64l_vec.
934 * configure.in: Handle bfd_elf64_sh64_vec and
935 bfd_elf64_sh64l_vec.
936 * configure: Regenerate.
937 * po/POTFILES.in: Regenerate.
938 * po/bfd.pot: Regenerate.
939 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
940 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
941 anything else but EF_SH64 and EF_SH64_ABI64.
942 (sh64_elf_merge_private_data): Emit error for anything else but
943 EF_SH64 and EF_SH64_ABI64.
944 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
945 from targ_selvecs.
946 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
947 bfd_elf32_sh64l_vec as a temporary measure.
948 * configure: Regenerate.
949 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
950 * cpu-sh.c (arch_info_struct): Include sh5 item
951 unconditionalized.
952 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
953 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
954 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
955 * elf32-sh64.c: Tweak comments.
956 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
957 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
958 (sh64_elf_copy_private_data_internal): Wrap long line.
959 (sh64_elf_merge_private_data): Rewrite to allow objects from
960 SH64 subsets to be linked together.
961 (INCLUDE_SHMEDIA): Define.
962 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
963 Parenthesize plus-expression inside or-expression.
964 <global symbol>: Ditto.
965 (sh_elf_set_mach_from_flags): Remove code refusing
966 deleted EF_SH64_32BIT_ABI flag.
967 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
968 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
969 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
970 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
971 (sh_elf_relocate_section) <local symbol>: Or 1 in
972 calculation of relocation if sym->st_other & STO_SH5_ISA32.
973 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
974 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
975 relocation.
976 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
977 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
978 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
979 Regenerate dependencies.
980 * Makefile.in: Regenerate.
981 * archures.c: Add bfd_mach_sh5.
982 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
983 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
984 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
985 * configure: Regenerate.
986 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
987 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
988 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
989 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
990 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
991 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
992 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
993 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
994 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
995 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
996 in item for SH5.
997 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
998 for SHmedia relocs.
999 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
1000 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
1001 shmedia_prepare_reloc, goto final_link_relocate if it returns
1002 non-zero, else fail as before.
1003 (sh_elf_set_mach_from_flags): Provide function only if not defined
1004 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
1005 (sh_elf_set_private_flags): Provide function only if not defined
1006 as a macro.
1007 (sh_elf_copy_private_data): Similar.
1008 (sh_elf_merge_private_data): Similar.
1009 * section.c (SEC_SH_ISA_SHMEDIA): New.
1010 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
1011 * elf32-sh64.c: New file.
1012 * libbfd.h: Regenerate.
1013 * bfd-in2.h: Regenerate.
1014 * po/POTFILES.in: Regenerate.
1015 * po/bfd.pot: Regenerate.
1016 * bfd-in2.h: Regenerate.
1017 * libbfd.h: Regenerate.
1018
1019 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
1020
1021 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
1022 been included, not drag it in.
1023 * bfd-in2.h: Regenerate.
1024
1025 2002-02-06 H.J. Lu (hjl@gnu.org)
1026
1027 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
1028 the mach and ISA fields if necessary.
1029
1030 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
1031
1032 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
1033 ARM architecture when an F_ARM_5 flag is detected, since we cannot
1034 be sure exactly which architecture this represents.
1035
1036 2002-02-05 Nick Clifton <nickc@redhat.com>
1037
1038 * po/tr.po: Updated translation.
1039
1040 2002-02-05 Alan Modra <amodra@bigpond.net.au>
1041
1042 From Jimi X <jimix@watson.ibm.com>
1043 * archures (bfd_mach_ppc64): Define.
1044 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
1045 (bfd_powerpc_arch): Define.
1046 * bfd-in2.h: Regenerate.
1047 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
1048 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
1049 (bfd_powerpc_archs): Add default powerpc64 arch.
1050
1051 2002-02-05 Alan Modra <amodra@bigpond.net.au>
1052
1053 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
1054 against section syms in readonly sections. Don't do the global
1055 sym check if we find one.
1056 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
1057 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
1058 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
1059 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
1060 (elf_s390_grok_prstatus): Add missing prototype.
1061
1062 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
1063
1064 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
1065 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
1066 Call bfd_get_section_by_name only once. Initialize
1067 bpodata->n_bpo_relocs_this_section.
1068 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
1069 referring to DSOs.
1070 (bpo_reloc_request_sort_fn): Don't use difference of values as
1071 return-value.
1072
1073 2002-02-02 David O'Brien <obrien@FreeBSD>
1074
1075 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
1076 version 4.5 and later the same as 5-CURRENT.
1077 * configure: Re-generate.
1078
1079 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
1080
1081 * config.bfd (hppa*-*-netbsd*): New target.
1082
1083 2002-01-31 Philipp Thomas <pthomas@suse.de>
1084
1085 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
1086 to front of message. Unify messages with elf32-arm.h. Use
1087 commas where neccessary.
1088 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
1089 ERROR in messages. Unify messages with coff-arm.c. Correct
1090 VFP/FPA error message.
1091 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
1092 APCS-32 for translation.
1093
1094 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
1095
1096 Perform on-demand global register allocation from
1097 R_MMIX_BASE_PLUS_OFFSET relocs.
1098 * elf64-mmix.c (struct bpo_reloc_section_info, struct
1099 bpo_reloc_request, struct bpo_greg_section_info): New.
1100 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
1101 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
1102 _bfd_mmix_check_all_relocs,
1103 _bfd_mmix_prepare_linker_allocated_gregs,
1104 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
1105 (elf_mmix_howto_table): Correct src_mask for most relocs.
1106 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
1107 case.
1108 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
1109 case. Fix typo in comment. New label do_mmix_reloc.
1110 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
1111 store first object file with a base-plus-offset reloc. Call
1112 mmix_elf_check_common_relocs for the part common with mmo.
1113 (mmix_elf_final_link): Write out linker-allocated register
1114 contents section.
1115 (elf_backend_gc_sweep_hook): Define.
1116 (bfd_elf64_bfd_relax_section): Define.
1117
1118 * mmo.c: Don't include <ctype.h>
1119 (mmo_init): Correct init-once logic.
1120
1121 2002-02-01 Tom Rix <trix@redhat.com>
1122
1123 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
1124
1125 2002-02-01 Alan Modra <amodra@bigpond.net.au>
1126
1127 * Makefile.am: Run "make dep-am"
1128 * Makefile.in: Regenerate.
1129
1130 2002-01-31 David O'Brien <obrien@FreeBSD>
1131
1132 * configure.in: Recognize the differences in core files from FreeBSD
1133 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
1134 5-CURRENT.
1135 * configure: Regenerate.
1136
1137 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
1138
1139 * coff-or32.c: New file.
1140 * cpu-or32.c: New file.
1141 * elf32-or32.c: New file.
1142 * archures.c: Add support for or32.
1143 * targets.c: Add support for or32.
1144 * bfd-in2.h: Regenerate.
1145 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
1146 coff_write_object_contents): Add support for or32.
1147 * config.bfd: Add target.
1148 * configure.in: Add support for or32.
1149 * configure: Regenerate.
1150 * Makefile.am: Add support for or32.
1151 * Makefile.in: Regenerate.
1152 * po/SRC-POTFILES.in: Add or32 files.
1153 * po/bfd.pot: Regenerate.
1154
1155 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
1156 Don Lindsay <lindsayd@cisco.com>
1157
1158 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
1159 false' with a return of a bfd_reloc_ error code.
1160
1161 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
1162
1163 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
1164 unexport unreferenced symbols when --export-dynamic. Call
1165 _bfd_elf_strtab_delref when unexporting.
1166
1167 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
1168
1169 * bfd-in.h: Include <stdbool.h> if it is available.
1170 * bfd-in2.h: Regenerated.
1171
1172 2002-01-31 Alan Modra <amodra@bigpond.net.au>
1173
1174 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
1175 not go via the plt.
1176
1177 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
1178
1179 * archures.c: Tidy up formatting of embedded comments.
1180 * bfd.c: Tidy up formatting of embedded comments.
1181 * bfd-in.h: Fix formatting of comments.
1182 * reloc.c: Tidy up formatting of ordinary & embedded comments.
1183 * section.c: Tidy up formatting of embedded comments.
1184 * syms.c: Tidy up formatting of embedded comments.
1185 * targets.c: Tidy up formatting of embedded comments.
1186
1187 * bfd-in2.h: Regenerate.
1188
1189 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
1190
1191 * vms-tir.c (cmd_name): New function.
1192 (tir_cmd_name): New function.
1193 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
1194 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
1195 Fix formatting.
1196
1197 * peXXigen.c (pe_print_idata): Rearrange message to aid in
1198 translation.
1199 (pe_print_pdata): Rearrange message to aid in translation.
1200
1201 * libbfd.c (warn_deprecated): Rearrange error message to aid in
1202 translation.
1203
1204 * ihex.c (ihex_write_object_contents): Fix spelling typo.
1205
1206 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
1207
1208 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
1209 message to aid in translation.
1210
1211 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
1212 to aid in translation.
1213
1214 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
1215
1216 2002-01-30 Philipp Thomas <pthomas@suse.de>
1217
1218 * coff-arm.c, elf32-elf.h: Unify messages.
1219
1220 2002-01-30 Nick Clifton <nickc@redhat.com>
1221
1222 * po/sv.po: Updated translation.
1223
1224 2002-01-30 Philipp Thomas <pthomas@suse.de>
1225
1226 * dwarf2.c (read_abbrev): Use full section name in error message.
1227 (decode_line_info): Likewise.
1228
1229 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
1230 message.
1231
1232 2002-01-30 Alan Modra <amodra@bigpond.net.au>
1233
1234 * elf64-ppc.c (func_desc_adjust): Only provide missing function
1235 descriptor symbols for undefined function code syms. Clear
1236 ELF_LINK_NON_ELF so that they can stay weak.
1237
1238 2002-01-29 Chris Demetriou <cgd@broadcom.com>
1239 Mitch Lichtenberg <mpl@broadcom.com>
1240
1241 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
1242 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
1243 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
1244 generation.
1245 * bfd-in2.h: Regenerate.
1246
1247 2002-01-29 Chris Demetriou <cgd@broadcom.com>
1248
1249 * elf32-mips.c: Add additional comments about HI16 relocation
1250 processing.
1251 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
1252 pc-relative relocations. (Reverts change made on 2001-10-31.)
1253 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
1254 for pc-relative relocations.
1255 (mips_elf_calculate_relocation): Add a comment about a kludge
1256 in the R_MIPS_GNU_REL_HI16 handling.
1257 (_bfd_mips_elf_relocate_section): Implement that kludge;
1258 adjust pc-relative HI16 relocation for difference in HI16 and
1259 LO16 addresses, since it can't easily be done in
1260 mips_elf_calculate_relocation.
1261
1262 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
1263
1264 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
1265 relocations with PC32 relocations for undefined or weak symbols.
1266 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
1267 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
1268
1269 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
1270
1271 * elfcore.h (elf_core_file_p): Improve comment for last change.
1272
1273 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
1274
1275 * configure: Regenerated.
1276
1277 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
1278
1279 * elfcore.h (elf_core_file_p): Set the machine architecture
1280 before processing the program headers.
1281
1282 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
1283
1284 * configure.in <64-bit configuration>: If using gcc, check and
1285 emit error for egcs-1.1.2.
1286 * configure: Regenerate.
1287
1288 2002-01-26 Egor Duda <deo@logos-m.ru>
1289
1290 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
1291 as possible to avoid stack corruption.
1292
1293 2002-01-26 Richard Henderson <rth@redhat.com>
1294
1295 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
1296 for non-allocated sections.
1297
1298 2002-01-25 Mark Kettenis <kettenis@gnu.org>
1299
1300 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
1301 prstat.pr_reg even if it is a struct.
1302
1303 2002-01-25 Steve Ellcey <sje@cup.hp.com>
1304
1305 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
1306
1307 2002-01-25 Philipp Thomas <pthomas@suse.de>
1308
1309 * coffgen.c (coff_print_symbol): Don't mark info message
1310 for translation.
1311
1312 2002-01-25 Nick Clifton <nickc@redhat.com>
1313
1314 * po/fr.po: Updated translation.
1315 * po/es.po: Updated translation.
1316
1317 2002-01-25 Philipp Thomas <pthomas@suse.de>
1318
1319 * coff-alpha.c (alpha_relocate_section): Unify warning message
1320 for GP relative relocations without GP defined.
1321 * coff-mips.c (mips_relocate_section): Likewise.
1322
1323 2002-01-25 Alan Modra <amodra@bigpond.net.au>
1324
1325 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
1326 unsigned overflow when new_offset < old_offset.
1327
1328 2002-01-24 Philipp Thomas <pthomas@suse.de>
1329
1330 * bfd.c (_bfd_abort): Fix typo.
1331
1332 2002-01-23 Richard Henderson <rth@redhat.com>
1333
1334 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
1335 plt entries for undefweak symbols.
1336
1337 2002-01-23 Steve Ellcey <sje@cup.hp.com>
1338
1339 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
1340 DEFAULT_VECTOR.
1341 (bfd_elf64_ia64_hpux_big_vec): Ditto.
1342 (bfd_elf32_h8300_vec): Ditto.
1343
1344 2002-01-23 Alan Modra <amodra@bigpond.net.au>
1345
1346 * elf64-ppc.c: Remove stale part of ABI comment.
1347 (NO_OPD_RELOCS): Define.
1348 (ppc64_elf_check_relocs): Use it.
1349 (ppc64_elf_relocate_section): Here too.
1350 (build_one_stub): Don't point function syms at the stub. Instead,
1351 hijack plt.offset.
1352 (ppc64_elf_relocate_section): Check whether REL24 relocs should
1353 really go to the stub. Make all dynamic relocs in opd against
1354 locals.
1355 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
1356 plt.offset.
1357
1358 2002-01-22 Richard Henderson <rth@redhat.com>
1359
1360 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
1361
1362 2002-01-22 Alan Modra <amodra@bigpond.net.au>
1363
1364 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
1365 TOC_BASE_OFF adjustment.
1366
1367 * Makefile.am: Run "make dep-am".
1368 * Makefile.in: Regenerate.
1369 * po/SRC-POTFILES.in: Regenerate.
1370
1371 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
1372
1373 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
1374 host defines.
1375
1376 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
1377
1378 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
1379 Check for and emit error if sgot is NULL at this point.
1380
1381 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
1382
1383 * config.bfd (ia64*-*-netbsd*): New target.
1384
1385 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
1386
1387 * som.c (som_write_space_strings): Comment typo fix.
1388
1389 2002-01-21 Alan Modra <amodra@bigpond.net.au>
1390
1391 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
1392 is_func_descriptor fields.
1393 (link_hash_newfunc): Init them.
1394 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
1395 dot are candidates for plt entries. When processing .opd relocs,
1396 set function descriptor strings to point inside function code
1397 string, and set new ppc_link_hash_entry fields.
1398 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
1399 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
1400 function descriptors. It's now done in..
1401 (func_desc_adjust): New.
1402 (ppc64_elf_func_desc_adjust): New.
1403 (define elf_backend_always_size_sections): Define.
1404 (ppc64_elf_hide_symbol): New.
1405 (define elf_backend_hide_symbol): Define.
1406 (allocate_dynrelocs): Remove code looking up function descriptors
1407 as that has been done earlier.
1408 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
1409 table.
1410 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
1411 up function descriptor.
1412 (build_one_stub): Look up the function code sym. Check for
1413 invalid plt offsets.
1414 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
1415 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
1416
1417 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
1418 boolean param.
1419 (_bfd_elf_link_hash_hide_symbol): Likewise.
1420 * elflink.h (elf_link_add_object_symbols): Adjust call to
1421 elf_backend_hide_symbol.
1422 (elf_fix_symbol_flags): Likewise.
1423 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
1424 than bfd_alloc.
1425 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
1426 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
1427 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
1428 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
1429 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
1430 and adjust to suit.
1431 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
1432 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
1433 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
1434
1435 2002-01-18 Alan Modra <amodra@bigpond.net.au>
1436
1437 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
1438 dynamic function descriptor symbol, not the associated function
1439 symbol.
1440
1441 2002-01-17 Eric Christopher <echristo@redhat.com>
1442
1443 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
1444
1445 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
1446
1447 * po/bfd.pot: Regenerate.
1448 * po/fr.po: Regenerate.
1449
1450 2002-01-17 Alan Modra <amodra@bigpond.net.au>
1451
1452 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
1453 Remove "Elf_Internal_Shdr *" param.
1454 (_bfd_mips_elf_section_from_bfd_section): Ditto.
1455 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
1456 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
1457 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
1458 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
1459 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
1460 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
1461 function to override special sections. Remove hdr arg from
1462 backend call, and don't loop.
1463
1464 2002-01-16 Eric Christopher <echristo@redhat.com>
1465
1466 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
1467 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
1468 relocations requiring gp0 and gp.
1469
1470 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
1471
1472 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
1473 EF_ARM_VFP_FLOAT.
1474 (elf32_arm_print_private_bfd_data): Likewise.
1475
1476 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
1477
1478 * po/tr.po: Import new version.
1479
1480 2002-01-16 Alan Modra <amodra@bigpond.net.au>
1481
1482 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
1483 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
1484 (ORI_R0_R0_0): Correct.
1485
1486 2002-01-16 Alan Modra <amodra@bigpond.net.au>
1487
1488 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
1489 when plt_not_loaded.
1490 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
1491 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
1492 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
1493 (ppc64_elf_glink_code): Delete.
1494 (PPC64_ELF_GLINK_SIZE): Delete.
1495 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
1496 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
1497 ORI_R0_R0_0): Define.
1498 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
1499 (struct ppc_link_hash_table): Add sstub and plt_overflow.
1500 (ppc64_elf_link_hash_table_create): Init them.
1501 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
1502 Don't copy to shared lib.
1503 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
1504 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
1505 (allocate_dynrelocs <plt>): Don't change function sym here. Make
1506 room for .stub and .glink code.
1507 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
1508 DT_PPC64_GLINK.
1509 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
1510 bfd_elf64_bfd_final_link.
1511 (bfd_elf64_bfd_final_link): Don't define.
1512 (ppc64_elf_size_stubs): New.
1513 (build_plt_stub): New.
1514 (build_one_stub): New.
1515 (ppc64_elf_build_stubs): New.
1516 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
1517 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
1518 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
1519 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
1520 case output sections not separate. Adjust DT_RELASZ to not
1521 include plt relocs. Set reserved got entry. Set got and plt
1522 entry size.
1523 (elf_backend_got_header_size): Set to 8.
1524 * elf64-ppc.h: New file.
1525
1526 2002-01-16 Alan Modra <amodra@bigpond.net.au>
1527
1528 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
1529 sections, use bfd_section_list_remove.
1530 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
1531 * elflink.h (elf_link_add_object_symbols): When removing all
1532 sections, use bfd_section_list_clear.
1533
1534 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
1535
1536 * po/sv.po: New file: Swedish translation.
1537 * configure.in (ALL_LINGUAS): Add sv.
1538 * configure: Regenerate.
1539
1540 2002-01-15 Jakub Jelinek <jakub@redhat.com>
1541
1542 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
1543 * elf.c (merge_sections_remove_hook): New function.
1544 (_bfd_elf_merge_sections): Pass it as 3rd argument to
1545 _bfd_merge_sections.
1546 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
1547 * libbfd.h: Rebuilt.
1548 * merge.c (_bfd_merge_sections): Add remove_hook argument.
1549 Call remove_hook if a SEC_EXCLUDE section is encountered.
1550
1551 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
1552
1553 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
1554 (xstormy16_reloc_map): Initialise new field with correct howto
1555 table.
1556 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
1557 howto entry.
1558
1559 2002-01-10 Michael Snyder <msnyder@redhat.com>
1560
1561 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
1562 (elfcore_write_pstatus): Use long instead of pid_t;
1563 * elf-bfd.h: Change prototypes to use long instead of pid_t;
1564
1565 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
1566
1567 * elf.c: Update copyright years.
1568 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
1569 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
1570
1571 2002-01-08 Michael Snyder <msnyder@redhat.com>
1572
1573 Add capability to write corefile note sections, for gdb.
1574 * elf.c (elfcore_write_note): New function.
1575 (elfcore_write_prpsinfo): New function.
1576 (elfcore_write_prstatus): New function.
1577 (elfcore_write_pstatus): New function.
1578 (elfcore_write_prfpreg): New function.
1579 (elfcore_write_prxfpreg): New function.
1580 * elf-bfd.h: Add prototypes for above functions.
1581
1582 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
1583
1584 * elf.c (elf_fake_sections): Propagate errors from
1585 elf_backend_fake_section.
1586
1587 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
1588
1589 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
1590 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
1591 (elf32-sh-nbsd.lo): New rule.
1592 * Makefile.in: Regenerate.
1593 * config.bfd (sh*le-*-netbsdelf*): New target.
1594 (sh*-*-netbsdelf*): New target.
1595 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
1596 (bfd_elf32_shnbsd_vec): New vector.
1597 (bfd_elf32_shlnbsd_vec): New vector.
1598 * configure: Regenerate.
1599 * elf32-sh-nbsd.c: New file.
1600 * targets.c: Update copyright years.
1601 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
1602 bfd_elf32_shnbsd_vec.
1603
1604 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
1605
1606 * coff-rs6000.c (READ20): Use bfd_scan_vma.
1607
1608 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
1609
1610 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
1611 of a symbol in a section that will be deleted.
1612
1613 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
1614
1615 * po/es.po: New file: Spanish translation.
1616 * configure.in (ALL_LINGUAS): Add es.
1617 * configure: Regenerate.
1618
1619 2002-01-06 Steve Ellcey <sje@cup.hp.com>
1620
1621 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
1622 argument so we can handle HP-UX specially.
1623 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
1624 (elfNN_hpux_backend_section_from_bfd_section): New for support
1625 of SHN_IA_64_ANSI_COMMON.
1626 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
1627 (is_unwind_section_name): Add special HP-UX support.
1628 (elfNN_ia64_section_from_shdr): Add support for more sections.
1629 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
1630 add support for more sections.
1631 (elfNN_ia64_additional_program_headers): Modify
1632 is_unwind_section_name call.
1633 (elfNN_ia64_modify_segment_map): Remove assumption that there is
1634 only one unwind section in segment.
1635
1636 2002-01-06 Alan Modra <amodra@bigpond.net.au>
1637
1638 * syms.c (_bfd_generic_make_empty_symbol): New function.
1639 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
1640 _bfd_generic_make_empty_symbol.
1641 * libbfd.h: Regenerate.
1642 * bfd-in2.h: Regenerate.
1643 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
1644 (hppabsd_core_get_symtab_upper_bound): Don't define.
1645 (hppabsd_core_get_symtab): Likewise.
1646 (hppabsd_core_print_symbol): Likewise.
1647 (hppabsd_core_get_symbol_info): Likewise.
1648 (hppabsd_core_bfd_is_local_label_name): Likewise.
1649 (hppabsd_core_get_lineno): Likewise.
1650 (hppabsd_core_find_nearest_line): Likewise.
1651 (hppabsd_core_bfd_make_debug_symbol): Likewise.
1652 (hppabsd_core_read_minisymbols): Likewise.
1653 (hppabsd_core_minisymbol_to_symbol): Likewise.
1654 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
1655 Formatting fixes.
1656 * hpux-core.c: Similarly.
1657 * irix-core.c: Similarly.
1658 * osf-core.c: Similarly.
1659 * sco5-core.c: Similarly.
1660 * binary.c (binary_make_empty_symbol): Remove function, define as
1661 _bfd_generic_make_empty_symbol.
1662 * ihex.c (ihex_make_empty_symbol): Likewise.
1663 * mmo.c (mmo_make_empty_symbol): Likewise.
1664 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
1665 * srec.c (srec_make_empty_symbol): Likewise.
1666 * versados.c (versados_make_empty_symbol): Likewise.
1667 * vms.c (_bfd_vms_make_empty_symbol): Remove.
1668 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
1669 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
1670 rather than _bfd_vms_make_empty_symbol.
1671 * vms-misc.c (new_symbol): Likewise.
1672
1673 2002-01-05 Alan Modra <amodra@bigpond.net.au>
1674
1675 * section.c (bfd_section_init): Remove unnecessary initialisations.
1676 (bfd_section_list_clear): New function.
1677 (bfd_section_list_remove, bfd_section_list_insert): New macros.
1678 (_bfd_strip_section_from_output): Use them.
1679 * coffcode.h (coff_set_alignment_hook): Likewise.
1680 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
1681 * elf64-mips.c (mips_elf64_final_link): Likewise.
1682 * elf64-mmix.c (mmix_elf_final_link): Likewise.
1683 * sunos.c (sunos_add_dynamic_symbols): Likewise.
1684 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
1685 * bfd-in2.h: Regenerate.
1686
1687 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
1688 rather than doing our own section handling. Clean up after errors
1689 with bfd_release and bfd_section_list_clear. Handle unexpected
1690 flags.
1691 * aoutf1.h (sunos4_core_file_p): Likewise.
1692 * aix386-core.c (aix386_core_file_p): Likewise.
1693 * cisco-core.c (cisco_core_file_validate): Likewise.
1694 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
1695 * trad-core.c (trad_unix_core_file_p): Likewise.
1696
1697 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
1698 with bfd_release and bfd_section_list_clear.
1699 * hpux-core.c (hpux_core_core_file_p): Likewise.
1700 * irix-core.c (irix_core_core_file_p): Likewise.
1701 * lynx-core.c (lynx_core_file_p): Likewise.
1702 * osf-core.c (osf_core_core_file_p): Likewise.
1703 * rs6000-core.c (rs6000coff_core_p): Likewise.
1704 * sco5-core.c (sco5_core_file_p): Likewise.
1705
1706 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
1707 sign extension adjustments without conditionals.
1708
1709 2002-01-04 Jakub Jelinek <jakub@redhat.com>
1710
1711 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
1712 CIE at .eh_frame start is removed due to no FDEs referencing it.
1713
1714 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
1715
1716 * config.bfd (x86_64-*-netbsd*): New target.
1717 * configure.in (x86_64-*-netbsd*): Set COREFILE
1718 to netbsd-core.lo.
1719 * configure: Regenerated.
1720
1721 2002-01-03 Tom Rix <trix@redhat.com>
1722
1723 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
1724 for recent bfd_make_section_anyway change.
1725
1726 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
1727
1728 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
1729 R_ARM_THM_PC11 reloc.
1730
1731 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
1732
1733 * configure.in (LINGUAS): Add ja.
1734 * configure: Regenerate.
1735 * po/ja.po: Import from translation project's web site.
1736
1737 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
1738
1739 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
1740 messages to ease translation into other languages.
1741
1742 For older changes see ChangeLog-0001
1743 \f
1744 Local Variables:
1745 mode: change-log
1746 left-margin: 8
1747 fill-column: 74
1748 version-control: never
1749 End: