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