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